-
Notifications
You must be signed in to change notification settings - Fork 950
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 Spades #1233
Adding Spades #1233
Conversation
Spades implementation is largely based off of the Bridge implementation. Runs a single round and returns the points earned/lost from the round (not the overall team's score). Note that currently the parameters use_mercy_rule, mercy_threshold, and win_threshold are not actually used at the moment. They will most likely be moved to and managed by the training script. However, score_partnership_0 and score_partnership_1 are needed in order to determine if a bag penalty is earned from the round.
Can you generate a new playthrough and add it to the PR? (Tests are failing without it) |
Ok, I ran generate_new_playthrough.sh and added the resulting spades.txt - that's the only file needed from this, right? |
Correct, yes. Thanks! |
Seems like there's a seg fault, there might be a memory issue (buffer overrun or similar). Try building in debug mode (see the flag in the main CMakeLists.txt) and running the test under valgrind or gdb, it should catch memory out-of-bound issues. |
@lanctot Going to run some more tests, but after setting build mode to Debug and running build_and_run_tests.sh, it shows a SEGFAULT error with the dou dizhu test: (If I run with --test_only=spades everything passes.) |
Huh, we'll that's interesting. Ok let me do some checks on my end and get back to you. (Actually I can even do those checks with the Spade implementation imported.) I'm quite loaded at the moment though, so it might be a few days. |
Hmm, ok I did some memory sanitizing checks and there appear to be no problems with Spades nor Dou Dizhu. Thinking this is a fluke. Sometimes github CI has random issues. I've imported it and will push to github momentarily. I expect it'll be fine. Thanks again for the great addition! And will nicely slip right into the repos for the release next week. Edit: can't explain dou_dizhu failing with debug build on your end, though. Worked fine in debug build + memory sanitizer checks on my side. |
Cool! I'll make another PR eventually as I've been adding game specific functions and tweaking the code a bit to deal with a adding a reward bonus for winning to the returns and such, but glad to have a working version in for now! |
Spades implementation is largely based off of the Bridge implementation. Runs a single round and returns the points earned/lost from the round (not the overall team's score). Note that currently the parameters use_mercy_rule, mercy_threshold, and win_threshold are not actually used at the moment. They will most likely be moved to and managed by the training script. However, score_partnership_0 and score_partnership_1 are needed in order to determine if a bag penalty is earned from the round.