We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b17ec18 commit c9143f2Copy full SHA for c9143f2
tests/test_negamax.py
@@ -1,5 +1,5 @@
1
from easyAI import AI_Player, Negamax
2
-from easyAI.games import ConnectFour
+from easyAI.games import ConnectFour, Nim
3
import numpy as np
4
5
@@ -29,4 +29,10 @@ def test_negamax_saves_the_next_turn_even_in_a_desperate_situation():
29
[0, 0, 0, 0, 0, 0, 0],
30
]
31
)
32
- assert ai_algo(game) == 1
+ assert ai_algo(game) == 1
33
+
34
35
+def test_nim_strategy_is_good():
36
+ ai_algo = Negamax(6)
37
+ game = Nim(piles=(4, 4))
38
+ assert ai_algo(game) == "1,1"
0 commit comments