This repository contains models of board games for an undergraduate research project started in Fall 2015, carried out under the direction and supervision of Falk Lieder, Elizabeth Kon, and Dr. Tom Griffiths of the Computational Cognitive Science Lab at UC Berkeley.
The 10 games selected for analysis based on ratings pulled from this database. The relevant files for each game are also listed.
- Peg Solitaire (
peg_solitaire.py
peg_markov.py
) - Solitaire/Patience
- Wolfpack
- Jasper and Zot (
JasperAndZot.py
) - Legions of Darkness
- B-29 Superfortress
- Utopia Engine (
UtopiaEngine.py
minigame.py
currently in progress) - Field Commander: Napoleon
- Where There is Discord: War in the South Atlantic
- Thunderbolt Apache Leader
A model of a 2x2 game of Tic-Tac-Toe is also included in this repository as a bonus. (TicTacToe.py
Markov.py
)
Besides downloading the relevant files for the game, you will also need NumPy ver1.9 or later. It is recommended that you download it as part of the Anaconda package to ensure that further instructions work for you.
The UC Berkeley python library datascience is also necessary in order to run Features.py
.
Once you have Anaconda installed, go ahead and run
pip install datascience
To run any file in interactive mode, use the command python -i
followed by the name of the file.
Once you are running the main game file (the file that doesn't have "markov" in the title) in interactive mode, type in play()
hit Enter and enjoy. Refer to code comments for further instructions on how to run learning algorithms on our models.
(Functionally equivalent functions are listed on the same line)
create_states
state_space
next_states
create_state_tree
board2state
state2board
state_transition
action_space
,possible_actions
legal_actions
transition_prob
state_transition
,simulate_transition
transition_prob_matrix
reward_function
,reward
- Fall 2015 - Spring 2017: Priyam Das, David Lu
- Fall 2015 - Fall 2016: Jackie Dong