added mcts and strategy base classes

This commit is contained in:
2024-01-26 18:02:44 +01:00
parent e4fa09bac3
commit 662da27f72
5 changed files with 29 additions and 33 deletions

View File

@@ -1,6 +1,6 @@
import chess
from abc import ABC, abstractmethod
from IStrategy import IStrategy
from i_strategy import IStrategy
class IMcts(ABC):
@@ -10,12 +10,26 @@ class IMcts(ABC):
@abstractmethod
def sample(self, runs: int = 1000) -> None:
"""
Run the MCTS simulation
:param runs: number of runs
:return:
"""
pass
@abstractmethod
def apply_move(self, move: chess.Move) -> None:
"""
Apply the move to the chess board
:param move: move to apply
:return:
"""
pass
@abstractmethod
def get_children(self) -> list['Mcts']:
"""
Return the immediate children of the root node
:return: list of immediate children of mcts root
"""
pass