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

Possible bug #263

Open
pavolkacej opened this issue Dec 7, 2021 · 1 comment
Open

Possible bug #263

pavolkacej opened this issue Dec 7, 2021 · 1 comment

Comments

@pavolkacej
Copy link
Contributor

pavolkacej commented Dec 7, 2021

I believe this commit causes regression: 28331bb

It does not make sense to multiply result of getGameEnded with currentPlayer.
After some debugging, I believe this should be changed to original. Please see print few lines above: https://github.com/suragnair/alpha-zero-general/blob/master/Arena.py#L63

If you try printing this line after every game, you will find out, that the sums of won / lost games, compared to prints will not be the same.

I am speaking about othello - which is currently used in Main. Maybe some games may need it the way it is, but, just logically this makes bad winning counts during the pitting with previous version. We want to compare the result always based on white player (player 1), so it is uniform. Note that board is used (which is never mirrored, compared to canonicalBoard), so it makes sense to put 1 rigidly as input to getGameEnded()

@rlronan
Copy link
Contributor

rlronan commented Jan 6, 2022

I believe this issue is from the Othello implementation. Please see: getGameEnded definition.

In game.py the specification for getGameEnded is:

 def getGameEnded(self, board, player):
        """
        Input:
            board: current board
            player: current player (1 or -1)
        Returns:
            r: 0 if game has not ended. 1 if player won, -1 if player lost,
               small non-zero value for draw.
        """ 

But, Othello is implemented with a different function specification: " return 0 if not ended, 1 if player 1 won, -1 if player 1 lost".

However, that print result you reference may be incorrect, but I would need to think on that more.

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