Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on line 26 #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
error on line 26
changed the string to integer due to out of index error on line 28.
KUEE1080 authored Nov 8, 2019
commit 89a8b8bc24e3c1907a023bb459da4af784ac7d0a
4 changes: 2 additions & 2 deletions agent.py
Original file line number Diff line number Diff line change
@@ -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]
self.mcts.root = self.mcts.tree[state.id]