-
Notifications
You must be signed in to change notification settings - Fork 936
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
Adding game german_whist_foregame #1171
Adding game german_whist_foregame #1171
Conversation
Lots of changes, currently endgame compiles but does not run which is an issue
All works
removed dependence on bmi2 intrinsics and x86intrin.h
I hadn't added the game name to the pyspiel tests expected games. |
Removed MTD as it slows generation of tablebase. Removed move ordering heuristics from legalactions as it slows tablebase generation. Hacky move ordering heuristics remain for speeding up verification. Tablebase generation is 50% faster
Modified bzhi bithack so it will compile to bzhi when __bmi2__ is defined. Modified pext bithack so it will call _pext_u64 when __bmi2__ is defined, otherwise it will use the bithack. LoadTTable now warns on failing to load and sets TTable to default value(all 0)
@lanctot Should I remove ismcts_gwhist from the PR? |
No it's ok, you can leave it. Good to have an example and it's in the right place. |
I don't know what is going on but the tests keep failing repeatedly after your last commit. Can you pull changes from master and push the merge commit? (maybe make an inconsequential change to one of your files if necessary to trigger the tests) Apologies on the lateness in looking at this, I will take a look as soon as the tests pass. |
|
||
inline const std::array<uint64_t, 4> kSuitMasks = { bzhi_u64(~0,kNumRanks),bzhi_u64(~0,2 * kNumRanks) ^ bzhi_u64(~0,kNumRanks),bzhi_u64(~0,3 * kNumRanks) ^ bzhi_u64(~0,2 * kNumRanks),bzhi_u64(~0,4 * kNumRanks) ^ bzhi_u64(~0,3 * kNumRanks) }; | ||
|
||
|
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.
Can you add some high-level comments to these structures and methods, just generally to explain what they are used for and what they do?
void SetChar(size_t i,size_t j,char value); | ||
char Get(size_t i,size_t j) const; | ||
void Set(size_t i,size_t j,char value); | ||
}; |
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.
Maybe take a quick look at Google C++ style. Each line should be at most 80 characters. There are automated linters you can use (see the docs for adding a game, step 9)
Also should be blank lines between definitions of classes and functions (see the other game implementations for examples)
to pass api_test
My apologies for the delay in getting back to you, I have issues getting the python tests to run on my device due to some issues with absl. |
Added playthrough with incorrect tablebase value. Checks for InfoStateString and ObservationString
6727aee
to
a705df1
Compare
Sorry for taking so long to address some of the issues. **Traceback (most recent call last): ======================================================================
|
91dbb2b
to
4cd3016
Compare
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.
Hi @willmcgowan, sorry but I missed a few things that are critical. I had started the import but the changes required are non-trivial. Apologies for the delay.
open_spiel/games/german_whist_foregame/german_whist_foregame.cc
Outdated
Show resolved
Hide resolved
Apologies for the delays.. the summer ended up a bit busier than I expected! Should finally be merged some time soon (today or next few days). |
Hi @willmcgowan, we had to remove the game because it was crashing in the playthrough test. I tried a few things but ultimately could not fix it. I believe it might be due to the game construction trying to read the transposition table from disk or maybe taking up too much memory constructing the initial TTable. Here's the commit: a66063d We should have a version of the game that will work without a transposition table, i.e. make it optional by default. If you want to take a look please start from the fixed version in this commit above. I had to make a number of changes for it to fit our internal style and the version above includes all of them. If you find and fix it, then please resubmit as a new PR. |
German Whist is a 2 player imperfect information trick-taking card game. The rules are outlined here https://en.wikipedia.org/wiki/German_whist#:~:text=German%20whist%20is%20a%20variant,is%20probably%20of%20British%20origin.
Modified from previous pull request, no longer requires x86intrin.h or bmi2 support.