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

Incorrect worm selected #84

Closed
Quiescent opened this issue Aug 30, 2019 · 4 comments · Fixed by #87
Closed

Incorrect worm selected #84

Quiescent opened this issue Aug 30, 2019 · 4 comments · Fixed by #87
Assignees
Labels
bug Something isn't working game engine This requires changes in the game engine

Comments

@Quiescent
Copy link
Contributor

Quiescent commented Aug 30, 2019

Hi all. I think that I've found a bug in the game engine.

Scenario:

  • Player two has worms 1, 2 and 3 alive.
  • It is currently worm 2's turn for player 2.
  • Player two and player one make non-select moves.

Outcome:

  • Player two's current worm after the turn is complete becomes 1.

Expectation:

  • I would have expected it to be worm 3's turn for player 2.

Investigation:
I've attached the global state and the state from both players perspective (I had to change the extensions to "txt" in order for Github to accept them). All of it seems wrong. The global state goes from worm 1 to 3 and the player state goes from 2 to 1(!?)

This bug has serious consequences to the correctness of any algorithm which predicts a few moves into the future. Please can it be fixed as a matter of urgency.

GlobalState-round-160.txt
GlobalState-round-161.txt
Player-1-state-round-160.txt
Player-1-state-round-161.txt
Player-2-state-round-160.txt
Player-2-state-round-161.txt

System information:

  • NixOs 18
  • Running game engine built from develop.
    (Not sure what else is relevant. Please let me know if you need any more information.)
@Quiescent Quiescent changed the title Incorrect worm selected after death Incorrect worm selected Aug 30, 2019
@Mistborn94
Copy link
Collaborator

The difference between the global state and the player state is because player state is written at the beginning of the round while global state is written at the end of the round. This might not have been indicated clearly since the global state was primarily intended for visualizers.

However, if I understand your post correctly that is not the only issue. We will investigate this.

@Quiescent
Copy link
Contributor Author

Thanks for clarifying @Mistborn94 and yes, your understanding is correct. There does appear to be another problem here.

@Mistborn94 Mistborn94 added bug Something isn't working game engine This requires changes in the game engine labels Aug 31, 2019
@Mistborn94 Mistborn94 self-assigned this Aug 31, 2019
@Mistborn94
Copy link
Collaborator

I think I have this one pinned down: The issue occurs specifically when the current worm dies during the round. A fix should be implemented early next week.

@Quiescent
Copy link
Contributor Author

Thanks for getting to the bottom of this! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working game engine This requires changes in the game engine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants