Skip to content
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

Fix MaxGameLength of TTT variants #1314

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion open_spiel/games/phantom_ttt/phantom_ttt.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class PhantomTTTGame : public Game {
// These will depend on the obstype parameter.
std::vector<int> InformationStateTensorShape() const override;
std::vector<int> ObservationTensorShape() const override;
int MaxGameLength() const override { return tic_tac_toe::kNumCells * 2 - 1; }
int MaxGameLength() const override { return game_->MaxGameLength() * 2 - 1; }

ObservationType obs_type() const { return obs_type_; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class UltimateTTTGame : public Game {
tic_tac_toe::kNumRows, tic_tac_toe::kNumCols};
}
int MaxGameLength() const override {
return tic_tac_toe::kNumCells * kNumSubgames;
return ttt_game_->MaxGameLength() * kNumSubgames;
}

const tic_tac_toe::TicTacToeGame* TicTacToeGame() const {
Expand Down
Loading