added base classes for mcts and strategy
This commit is contained in:
21
i_mcts.py
Normal file
21
i_mcts.py
Normal 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
|
||||
Reference in New Issue
Block a user