Skip to content

Commit c9143f2

Browse files
committed
[SKIP] added one test for negamax on Nim
1 parent b17ec18 commit c9143f2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/test_negamax.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from easyAI import AI_Player, Negamax
2-
from easyAI.games import ConnectFour
2+
from easyAI.games import ConnectFour, Nim
33
import numpy as np
44

55

@@ -29,4 +29,10 @@ def test_negamax_saves_the_next_turn_even_in_a_desperate_situation():
2929
[0, 0, 0, 0, 0, 0, 0],
3030
]
3131
)
32-
assert ai_algo(game) == 1
32+
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

Comments
 (0)