Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 451 Bytes

state_action_to_string.md

File metadata and controls

20 lines (14 loc) · 451 Bytes

OpenSpiel state methods: action_to_string

Back to Core API reference

action_to_string(player: int, action: int)

Returns a string representation of the specified player's action.

Examples:

import pyspiel

game = pyspiel.load_game("breakthrough")
state = game.new_initial_state()
player = state.current_player()
for action in state.legal_actions():
  print(state.action_to_string(player, action))