From 89a8b8bc24e3c1907a023bb459da4af784ac7d0a Mon Sep 17 00:00:00 2001 From: KUEE1080 Date: Fri, 8 Nov 2019 22:47:24 +0900 Subject: [PATCH] error on line 26 changed the string to integer due to out of index error on line 28. --- agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent.py b/agent.py index a6e5d01a..24dd2abd 100644 --- a/agent.py +++ b/agent.py @@ -23,7 +23,7 @@ def __init__(self, name, state_size, action_size): self.action_size = action_size def act(self, state, tau): - action = input('Enter your chosen action: ') + action = int(input('Enter your chosen action: ')) pi = np.zeros(self.action_size) pi[action] = 1 value = None @@ -225,4 +225,4 @@ def buildMCTS(self, state): def changeRootMCTS(self, state): lg.logger_mcts.info('****** CHANGING ROOT OF MCTS TREE TO %s FOR AGENT %s ******', state.id, self.name) - self.mcts.root = self.mcts.tree[state.id] \ No newline at end of file + self.mcts.root = self.mcts.tree[state.id]