CS221 Course Project on developing a Crazy Eights playing AI
Edit arguments in run.py and run
python run.py
or use evaluate.py:
Example: play a game against PruningAgent
python evaluate.py -n 1 -a KeyboardAgent,PruningAgent -v 5
Example: run 100 games between PruningAgent and oracle
python evaluate.py -n 100 -a PruningAgent,OracleAgent -v 3
Contains code capable of running multiple games, and evaluate the results. Can be called from the terminal, or run from run.py, if you don't want to add arguments to the call.
Script used to call on evaluate.py with predefined arguments.
Contains the classes CrazyEightsGame, GameState, Observer, together with code used by these classes.
Contains the code that is needed to run one instance of a game. Creates a CrazyEightsGame object that keeps track of the state of the game, and orders the agents to make moves.
Contains different sets of rules a game can have. ClassicGameRules is the most common rules to be used.
Contains the abstract class Agent, used by all agents.
Contains all logic behind the baseline.
Contains all logic behind the oracle.
Contains all logic behind KeyboardAgent.
Contains all logic behind BasicMinimaxAgent.
Contains all logic behind RLAgent.
Contains all logic behind PruningAgent.
Contains the unfinished work for the Q-learning agent.
Contains all code used to learn the parameters for both the evaluation function used by RLAgent, and for the state-action probability estimator used by PruningAgent.
Similar to learner.py this file contains the functions to learn the Q-values for the Q-learning agent.
Contains helper functions used by many of the agents.
Contains the weights used by the evaluation function used by RLAgent. Readable by pickle.
Contains the weights used by the state-action probability estimator used by PruningAgent. Readable by pickle.
Contains the weights used by the state-action probability estimator used by PruningAgent. Readable by pickle.