Skip to content

Commit

Permalink
Fix PhantomTTT::MaxGameLength
Browse files Browse the repository at this point in the history
The max game length of an phantom TTT relies on the max length
of its underlying TTT game. Encapsulate this instead of re-
implementing TicTacToe::MaxGameLenth in PhantomTTT::MaxGameLenth.

Signed-off-by: odanrc <odanrc@yahoo.com.br>
  • Loading branch information
odanrc committed Feb 27, 2025
1 parent 9b9482c commit 96f217a
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 96f217a

Please sign in to comment.