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

AttributeError: 'NoneType' object has no attribute 'state' #11

Closed
CreamyLong opened this issue Jun 16, 2020 · 2 comments
Closed

AttributeError: 'NoneType' object has no attribute 'state' #11

CreamyLong opened this issue Jun 16, 2020 · 2 comments

Comments

@CreamyLong
Copy link

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
Copy link
Author

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants