aboutsummaryrefslogtreecommitdiff
path: root/tests/test_monteCarlo.py
blob: 8fe6f471fd5c23d0c2704c82db24103e7b74fffe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""Tests for the MonteCarlo algorithm."""

import unittest

from imago.gameLogic.gameBoard import GameBoard
from imago.gameLogic.gameMove import GameMove
from imago.engine.monteCarlo import MCTSNode

TEST_BOARD_SIZE = 19

class TestMonteCarlo(unittest.TestCase):
    """Test MonteCarlo algorithm."""

    def testSimulation(self):
        """Test calculation of group liberties."""
        board = GameBoard(TEST_BOARD_SIZE, TEST_BOARD_SIZE)
        move = GameMove(board)
        node = MCTSNode(move, None)
        node.simulation()

if __name__ == '__main__':
    unittest.main()