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]