- refactored learning function

- remove state_last, use state instead
- added episode history
This commit is contained in:
2024-06-11 09:00:41 +02:00
parent 73f59f25fc
commit 53e4d91ff8
4 changed files with 47 additions and 28 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ class HumanPlayer(APlayer):
state_next = self.to_state(state.copy(), move)
return state_next, has_moved
def reward(self, value):
def end_game(self, value):
if value > 0:
print(f"{self.name}, Du hast gewonnen, super!")
else:
@@ -57,4 +57,4 @@ if __name__ == '__main__':
if not has_moved:
break
p.reward(1.0)
p.end_game(1.0)