Skip to content

Commit

Permalink
Adding Spades
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
i-Madsen committed May 22, 2024
1 parent 7d3a355 commit 3cb3d06
Show file tree
Hide file tree
Showing 7 changed files with 1,072 additions and 0 deletions.
8 changes: 8 additions & 0 deletions open_spiel/games/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ set(GAME_SOURCES
skat/skat.h
solitaire/solitaire.cc
solitaire/solitaire.h
spades/spades.cc
spades/spades.h
spades/spades_scoring.cc
spades/spades_scoring.h
stones_and_gems/stones_and_gems.cc
stones_and_gems/stones_and_gems.h
tarok/tarok.cc
Expand Down Expand Up @@ -579,6 +583,10 @@ add_executable(solitaire_test solitaire/solitaire_test.cc ${OPEN_SPIEL_OBJECTS}
$<TARGET_OBJECTS:tests>)
add_test(solitaire_test solitaire_test)

add_executable(spades_test spades/spades_test.cc ${OPEN_SPIEL_OBJECTS}
$<TARGET_OBJECTS:tests>)
add_test(spades_test spades_test)

add_executable(stones_and_gems_test stones_and_gems/stones_and_gems_test.cc
${OPEN_SPIEL_OBJECTS}
$<TARGET_OBJECTS:tests>)
Expand Down
Loading

0 comments on commit 3cb3d06

Please sign in to comment.