OpenSpiel game methods: observation_tensor_shape and observation_tensor_size¶
observation_tensor_shape()
observation_tensor_size()
(1) Returns the observation tensor’s shape: a list of integers representing the size of each dimension.
(2) Returns the total number of values used to represent the observation tensor.
Examples:¶
import pyspiel
game = pyspiel.load_game("tic_tac_toe")
print(game.observation_tensor_shape())
print(game.observation_tensor_size())
# Output:
# [3, 3, 3]
# 27