added base classes for mcts and strategy

This commit is contained in:
2024-01-26 18:01:11 +01:00
parent 62410d239f
commit e4fa09bac3
6 changed files with 1240 additions and 40 deletions

21
i_mcts.py Normal file
View File

@@ -0,0 +1,21 @@
import chess
from abc import ABC, abstractmethod
from IStrategy import IStrategy
class IMcts(ABC):
def __init__(self, board: chess.Board, strategy: IStrategy):
self.board = board
@abstractmethod
def sample(self, runs: int = 1000) -> None:
pass
@abstractmethod
def apply_move(self, move: chess.Move) -> None:
pass
@abstractmethod
def get_children(self) -> list['Mcts']:
pass