Added human player
This commit is contained in:
+10
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user