Added human player

This commit is contained in:
2024-06-10 08:37:21 +02:00
parent 59d1d28357
commit d5b86b057e
4 changed files with 78 additions and 28 deletions
+10
View File
@@ -14,9 +14,19 @@ class APlayer(object):
def set_debug(self, with_debug):
pass
@staticmethod
def get_potential_moves(state: np.array) -> np.array:
st = state.reshape(state.size)
indices = [idx for idx, s in enumerate(st) if '-' in s]
return np.array(indices)
def move(self, state: np.array):
return state, False
def state_from_move(self, state: np.array, field):
state.reshape(state.size)[field] = self.mark
return state
def reward(self, value):
pass