Skip to content

Commit

Permalink
Fix state_distribution_test when ACPC is not enabled.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 287344253
Change-Id: I6f05e6105626b8cc1debe9d81f69f1f11801d5a1
  • Loading branch information
DeepMind Technologies Ltd authored and open_spiel@google.com committed Dec 27, 2019
1 parent f76d74e commit cabb506
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions open_spiel/algorithms/state_distribution_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ constexpr absl::string_view kHUNLGameString =
"1,numSuits=4,numRanks=13,numHoleCards=2,numBoardCards=0 3 1 "
"1,raiseSize=100 100 100 100)");

void HULIncrementalTest() {
void HUNLIncrementalTest() {
std::shared_ptr<const Game> game = LoadGame(std::string(kHUNLGameString));
UniformPolicy policy;
std::unique_ptr<State> state = game->NewInitialState();
Expand All @@ -150,5 +150,10 @@ namespace algorithms = open_spiel::algorithms;
int main(int argc, char** argv) {
algorithms::KuhnStateDistributionTest();
algorithms::LeducStateDistributionTest();
algorithms::HULIncrementalTest();

// ACPC is an optional dependency. Only test HUNL if it is registered.
if (open_spiel::IsGameRegistered(std::string(algorithms::kHUNLGameString))) {
algorithms::HUNLIncrementalTest();
}

}

0 comments on commit cabb506

Please sign in to comment.