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

[Go] Tidy signatures #1145

Merged
merged 1 commit into from
Jan 8, 2024
Merged
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
4 changes: 2 additions & 2 deletions pgx/_src/games/go.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ def is_neighbor_ok(xy):
)
return jnp.append(legal_action_mask, True) # pass is always legal

def is_terminal(self, state: GameState):
def is_terminal(self, state: GameState) -> Array:
two_consecutive_pass = state.consecutive_pass_count >= 2
return two_consecutive_pass | state.is_psk

def returns(self, state: GameState):
def returns(self, state: GameState) -> Array:
score = _count_point(state, self.size)
reward_bw = jax.lax.select(
score[0] - self.komi > score[1],
Expand Down
Loading