-
Notifications
You must be signed in to change notification settings - Fork 949
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
Add game: EinStein würfelt nicht! #1289
Add game: EinStein würfelt nicht! #1289
Conversation
Nice!! Thanks! |
Error looks unrelated to your changes and broken in some of our code. We'll look to get this fixed and let you know when master is up to date with fixes! |
Thank you for the heads up. I was planning to dive deeper into this in the next few days, but I was also confused, because tests pass for macos-14, but not for the others. |
Ok fixes applied. Can you pull the most recent changes from master and push the merge commit? |
Done. |
Some jobs are still failing. Could this still be problem unrelated to these changes? It's a bit difficult to understand what is the root cause from the logs. Though, there is one test failing for which the reason is clear, specifically: build_and_test / build (ubuntu-22.04, 3.10, OFF, OFF, OFF). This test fails because the initial board setup differs from the one in the playthrough file. In this game implementation, the position of the cubes on the board is initialized randomly, controlled by a random seed passed as an argument. If the seed is set to -1, it’s taken from the clock; otherwise, the default value is 42. This is done before the first move, at the constructor level. If this is the case, I might need to modify the implementation so that the board starts empty, and the first random action is to set up the board. This concept seems similar to what you're doing in Backgammon here. |
I modified the logic for the initial board setup. Previously, the board was initialized randomly using std::shuffle() within the constructor. Now, the allocation of cubes is determined by the values from the chance outcomes, removing the random behavior based on the environment. @lanctot could you please let the CI/CD run again to see if it passes this time? |
Sorry I had missed your last comment. This is indeed the right way to do the random starting board (via chance nodes). |
Yes. I didn't realised this initially. But the integration issue above forced me to look at implementation of other similar games and I understood what was wrong. |
Something weird is happening with Github Actions CI. The output is odd... Python 3.11 is listing as available via brew but then won't install. Not sure what's going on. I'll try it again in a few days. (Could be that something changed in the CI images, but likely just a blip) |
Ahh, I know why... one of my hacks stopped working on github actions CI. That happens 😅 I'm a bit busy at the moment but I'll fix it mid week and update you when it's done. Apologies. |
No problem at all. Thank you for looking into it. |
Ok, the fix is now in the master branch. Can you pull changes from master and push the merge commit to trigger the CI tests again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks very good, thanks!
I have only one major requested change about how the chance node works.
Here's my implementation of the game EinStein würfelt nicht!
I've implemented only the basic version of the game with a 5x5 board, as described in the wiki https://en.wikipedia.org/wiki/EinStein_w%C3%BCrfelt_nicht!. I'm not familiar with the other versions, so for now I decided to stick with the simplest version.
There is a common variant where a player wins the game after winning a total of 3 games. In this implementation, winning a single match means winning the game.
Feedbacks are appreciated. Hopefully this game is a fit for open_spiel.