AttributeError: 'NoneType' object has no attribute 'state'
CreamyLong opened this issue · comments
CreamyLong commented
Hi, Thanks for your great work. When I run your example NaughtsAndCrossesState, I get the info that is AttributeError: 'NoneType' object has no attribute 'state'
CreamyLong commented
I found that when I set timeLimit or iterationLimit low the program was ok, but when the values are high the error comes out
WhymustIhaveaname commented
This is because he uses the same name for class mcts
and the object mcts
.
mcts = mcts(timeLimit=1000)
bestAction = mcts.search(initialState=initialState)
Change it into
searcher = mcts(timeLimit=1000)
action = searcher.search(initialState=initialState)
will solve this issue. I also correct this in pull request #13.