Commit 297c2780 authored by LARIVIERE Axel's avatar LARIVIERE Axel
Browse files

fin du SARSA

parent 7aa6799c
......@@ -132,10 +132,10 @@ class Agent(Player):
return self.greedy(Q, s)
def SARSA(self, game, lr=0.01, num_episode=10000, eps=0.5, gamma=0.95, eps_decay=0.001):
n_a = ar.array[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
n_a = [1, 2, 3, 4, 5, 6, 7, 8, 9]
n_s = game.getBoardGame()
Q = np.zeros((n_s, n_a))
Q = np.zeros((len(n_s), len(n_a)))
for ep in range(num_episode):
actual_board = game.getBoardGame()
......@@ -184,7 +184,7 @@ class Agent(Player):
def takeDecision(self, game):
print("\nAu tour du joueur " + str(game.actualPlayer) + ", l'IA joue")
pass # TODO IA
self.SARSA(game)
class Window(QMainWindow):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment