Skip to content

Commit

Permalink
Merge pull request #40 from Gregory-Eales:master
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 268729686
Change-Id: I4103c7692a809685e6d7b8acf3e355b0be73799e
  • Loading branch information
lanctot committed Sep 12, 2019
2 parents 436827b + 728d20b commit d569abb
Show file tree
Hide file tree
Showing 3 changed files with 6,382 additions and 6,339 deletions.
12 changes: 10 additions & 2 deletions open_spiel/games/go.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ const GameType kGameType{
GameType::RewardModel::kTerminal,
/*max_num_players=*/2,
/*min_num_players=*/2,
/*provides_information_state=*/false,
/*provides_information_state=*/true,
/*provides_information_state_as_normalized_vector=*/false,
/*provides_observation=*/false,
/*provides_observation=*/true,
/*provides_observation_as_normalized_vector=*/false,
/*parameter_specification=*/
{
Expand Down Expand Up @@ -86,6 +86,14 @@ GoState::GoState(int board_size, float komi, int handicap)
ResetBoard();
}

std::string GoState::InformationState(int player) const {
return HistoryString();
}

std::string GoState::Observation(int player) const {
return ToString();
}

std::vector<Action> GoState::LegalActions() const {
std::vector<Action> actions = {kPass};

Expand Down
3 changes: 3 additions & 0 deletions open_spiel/games/go.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ class GoState : public State {

bool IsTerminal() const override;

std::string InformationState(int player) const override;
std::string Observation(int player) const override;

std::vector<double> Returns() const override;

std::unique_ptr<State> Clone() const override;
Expand Down

0 comments on commit d569abb

Please sign in to comment.