Refactored

This commit is contained in:
2024-06-10 20:48:50 +02:00
parent 285549568d
commit 61d1ab0431
4 changed files with 47 additions and 44 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ import numpy as np
from a_player import APlayer
from helper import to_state_string, create_empty_state, create_test_state
from state import get_potential_moves
class HumanPlayer(APlayer):
@@ -29,7 +30,7 @@ class HumanPlayer(APlayer):
continue
move = int(choice) - 1
if not move in self.get_potential_moves(state):
if not move in get_potential_moves(state):
print("Feld is bereits belegt!")
print("Versuche es nochmal")
continue
@@ -38,7 +39,7 @@ class HumanPlayer(APlayer):
has_moved = True
break
state_next = self.state_from_move(state.copy(), move)
state_next = self.to_state(state.copy(), move)
return state_next, has_moved
def reward(self, value):