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

2p Othello: undetected game end #2

Open
soliton- opened this issue Nov 28, 2019 · 4 comments
Open

2p Othello: undetected game end #2

soliton- opened this issue Nov 28, 2019 · 4 comments

Comments

@soliton-
Copy link

A24703CF-9B4F-4488-8999-B42A78E61008

The game didn’t end when no legal move was left.

Btw, impressive you implemented an AI for this and it seems not entirely bad even! 😃

@trewe
Copy link
Owner

trewe commented Dec 12, 2019

even after ending turn? the ai should check a valid move when just ending the turn and pass a "cannot play" flag if there is none. It could made maybe a bit cleaner, but don't think there is a sensible way to check in-turn ...

@soliton-
Copy link
Author

It seems I have no autosave or anything so I'll try to reproduce this.

From the image you can see it's turn 35 though and a game should only last 30 turn or so?

@soliton-
Copy link
Author

So when I reproduced a similar ending with one spot left open I simply ended my turn and that indeed triggered the victory. That probably just didn't occur to me last time since the other turns end automatically.

I did play with the updated version though so the commit didn't help. Probably because side played is still yes which makes sense. Perhaps easiest would be to check at the start of the players turn if he has no moves.

@trewe
Copy link
Owner

trewe commented Dec 30, 2019

mmh, ok. To check at start at turn, I would actually have to refactor the code which will need to wait until later.

A match in othello lasts 32 turns plus the amount of forfeit ones.

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