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

AssertionError - assert(gn_current.board().turn == 0) #6

Open
rayexar opened this issue Dec 24, 2015 · 7 comments
Open

AssertionError - assert(gn_current.board().turn == 0) #6

rayexar opened this issue Dec 24, 2015 · 7 comments

Comments

@rayexar
Copy link

rayexar commented Dec 24, 2015

I'm getting AssertionErrors when trying to run play.py, with the output looking like this:

maxd 1.000000 maxn 278.426311
Traceback (most recent call last):
  File "C:\Users\Lol\Desktop\deep-pink-master\deep-pink-master\play.py", line 226, in game
    gn_current = player.move(gn_current)
  File "C:\Users\Lol\Desktop\deep-pink-master\deep-pink-master\play.py", line 119, in move
    assert(gn_current.board().turn == 0)
AssertionError

and keeps repeating itself. Any idea on how to fix this?

@erikbern
Copy link
Owner

The model can only play one of the sides (i don't remember which but I think black)

Are you running it off the shelf or did you make any modifications? I haven't touched this code in a year+ so I don't remember exactly how it works

@rayexar
Copy link
Author

rayexar commented Dec 27, 2015

I'm running it off the shelf. It looks like with sunfish the player plays as white by default (although the pieces are displayed as black for some reason).

@vyasgiridhar
Copy link
Contributor

How did you solve the infinite assersion errors? @rayexar

@rayexar
Copy link
Author

rayexar commented Mar 27, 2016

@vyasgiridhar I didn't manage to fix that...

@vyasgiridhar
Copy link
Contributor

@rayexar I found the mistake
The problem is at gn_current.board().turn. It returns a boolean, not a integer.

@erikbern
Copy link
Owner

great if you want to submit a pull request and fix it

@erikbern
Copy link
Owner

just do assert(not gn_current.board()) should be enough

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

3 participants