The assignment handouts contain details for running RISK matches and viewing games. The .tex source is included so that you can easily adapt the assignments if desired. This file will describe how to run a tournament and compile the results.
Setting up for the tournament
Take the AI python scripts that the different students provide and put them in the ai folder. Make sure each AI script has a unique name. Any supplemental files that are used by any of the AIs should normally be put in the main RISK_AI directory.
Choosing a tournament type - There are two different types of tournaments that can be run, depending on how many AI agents are submitted and how many players you want in each game. You can run the simulator with anywhere between 2 and 8 players. With 2 or 3 player games you can run a full round robin tournament, where each combination of agents plays a match. This is done using the script: run_rr_tournament.py. Tournament results are saved to the tournaments folder. You can run the script from the command line, passing in a list of the AI files and their names, then the number of players in each game, then the number of games to have in each match (each combination of agents). Individual game logs are not saved, to save on space. Typically what you can do to have results to show the class is once you know who won the tournament you can run individual matches between teams that you want to show. If all logs are saved then there is just a lot of game logs. If you want to change this though you can change one of the Falses to True when play_risk_ai() is called to run the individual matches, and then it will save out the logs.
When running a tournament with more than 3 players in each game, the number of matches to do the full round robin quickly becomes prohibitive. In this case, you can use the script: run_sampled_tournament.py. This script runs a sampled tournament. This means that before each match, the participating agents are randomly selected from the all of the AIs. The mean points obtained across all matches is stored for every AI and can be used to rank their performance. This is very useful for variants of RISK with between four and eight players. The results of these tournaments are stored in the tournaments folder and will display the final ranking of the players. Intermediate results are saved with a different name then the final results, in case all of the matches can't finish in time. These results can then just used to determine who did best in the competition.Processing tournament results
To process the results of a round robin tournament, you can use one of three scripts, each of which simply takes the tournament results file in as command line input and outputs a .csv file or .txt file with the results of the tournament. These scripts are as follows: