dannyhammer / TwoPlayerGames

Undergraduate research into the mechanics of simple two-player games.
3 stars 2 forks source link

Rewrite the return value(s) of `game` #45

Closed dannyhammer closed 3 years ago

dannyhammer commented 3 years ago

Rewrite the return value(s) of game so that the csv files contain easily-parsable and usable information

You could see all of the possible states for a particular game by generating a range of numbers from 0 to the initial state.

For each possible state i, you could record “player_state_i” and “move_state_i” as columns in the .csv file. You can also record winning_player.

For instance, with 3 toothpicks, you would have 7 columns: player_state_3, move_state_3, player_state_2, move_state_2, player_state_1, move_state_1, and winning_player. (Please generate these in a for loop rather than hard-coding them.) If the state did not occur, you can put “none” in player_state_i and “0” in move_state_i.