Skip to content

Conversation

@jhtschultz
Copy link
Member

Updates count_all_states example to use GetAllHistories.

@lanctot this should address the issues raised in your last comment in #402.

It handles both perfect and imperfect information games. Tic tac toe is now included, and we get the correct number of total states: 4520 nonterminal + 958 terminal = 5478 total. The outputs for the other games agree with the current version of the file.

Game: tic_tac_toe, num_histories: 549946, num_terminal_histories: 255168, num_chance_nodes: 0, num_nonterminal_states: 4520, num_terminal_states: 958
Game: kuhn_poker, num_histories: 58, num_terminal_histories: 30, num_chance_nodes: 4, num_nonterminal_states: 12, num_terminal_states: 30
Game: leduc_poker, num_histories: 9457, num_terminal_histories: 5520, num_chance_nodes: 157, num_nonterminal_states: 936, num_terminal_states: 5520
Game: liars_dice, num_histories: 294883, num_terminal_histories: 147420, num_chance_nodes: 7, num_nonterminal_states: 24576, num_terminal_states: 147420
Game: turn_based_simultaneous_game(game=goofspiel(imp_info=true,num_cards=4,players=2,points_order=descending,returns_type=win_loss)), num_histories: 1077, num_terminal_histories: 576, num_chance_nodes: 0, num_nonterminal_states: 162, num_terminal_states: 576
Game: turn_based_simultaneous_game(game=goofspiel(imp_info=true,num_cards=5,players=2,points_order=descending,returns_type=win_loss)), num_histories: 26931, num_terminal_histories: 14400, num_chance_nodes: 0, num_nonterminal_states: 2124, num_terminal_states: 14400
Game: turn_based_simultaneous_game(game=goofspiel(imp_info=true,num_cards=6,players=2,points_order=descending,returns_type=win_loss)), num_histories: 969523, num_terminal_histories: 518400, num_chance_nodes: 0, num_nonterminal_states: 34482, num_terminal_states: 518400

@google-cla google-cla bot added the cla: yes label Oct 11, 2020
@lanctot
Copy link
Collaborator

lanctot commented Oct 12, 2020

Perfect, looks good! Thanks @jhtschultz

@lanctot lanctot self-requested a review October 12, 2020 09:16
@lanctot lanctot self-assigned this Oct 12, 2020
@OpenSpiel OpenSpiel merged commit 75d5806 into google-deepmind:master Oct 13, 2020
@jhtschultz jhtschultz deleted the count_all_states branch October 13, 2020 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants