-
Notifications
You must be signed in to change notification settings - Fork 0
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
Timeout bugs in parallel variant #231
Comments
About the Scenario with 4 players, one times out <- I've tested this in the past, and it used to work. I'm not sure what exactly is going wrong, it looks like all 4 players time out at (almost) the same time for some reason. |
I have found out the reason for this bug. The new function MakeTransition takes the move as input parameter. However in parallel time control, a move from any player may trigger a round transition. At this point we don't know the moves of other players, and it seems that the transition (with this move) is used for all players. In the event that the move is "timeout", the transition sets all player times to 0. Then all players immediately time out. |
I'm not sure how to fix it without disrupting your bigger PR. |
Ohh oh no! Thank you for root causing. And sorry for breaking it 😬
Should I go ahead and land it then? Or I am also okay with dealing with some merge conflicts if we need to fix before landing |
Please go ahead and land the PR (when you are ready). All in all, I think It'll be easier to fix it afterwards.
No problem! 😆 |
This rules out any issues with the variant itself. (debugging #231)
I believe the second issue "two players time out in the same round" is a race condition. It is very easy to trigger if it happens in the first timed round, but otherwise shouldn't happen often. To repro:
Results: It appears that the timeout for player 3 is overwritten or never occurs. If there is a race, it means that neither timeout will detect that the round ends. Timeout in round two, simultaneous, BAD:
On the other hand, if the timeouts happen at different times, the round will get reset accordingly: Here's a timeout in round 3, GOOD:
|
Linking related issue #226, which also needs a solution to race conditions |
This rules out any issues with the variant itself. (debugging #231)
Scenario: 4 players, two players time out in the same round -> round freezes
Scenario: 4 players, one player times out -> game ends and says Player 0 wins!
I've looked at the code a bit, and this appears to be a bug in the way the variant handles "timeout", not the time system itself.
So it's unrelated to recent changes in time control.The text was updated successfully, but these errors were encountered: