/experiments-automated-gameplay-results-processing

Scripts to process the results of the experiments from "MAP-Elites to Generate a Team of Agents that Elicits Diverse Automated Gameplay"

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

MAP-Elites to Generate a Team of Agents that Elicits Diverse Automated Gameplay: Scripts and results processing

This repository contains the scripts to process the experiments resulting from the work described in MAP-Elites to Generate a Team of Agents that Elicits Diverse Automated Gameplay.

For more information, refer to the Github repository with the code to run the experiments and OSF repository containing the experiments results and data.

The scripts implemented allow automatising and processing the resulting JSON files as follows:

  • jsonDataMethods.py Process and map resulting MAP-Elites JSON file.

  • mapElitesData.py Generate png files with the heatmaps representing the resulting MAP-Elites containing the team of agents. These images have been used in the paper. The whole collection generated can be found in the OSF repository.

  • mergeTempJson.py Merge experiment config and temporary JSON file into one, with the format of the final results of the experiment. This was needed for the experiments that took a long time and didn't reach the initial number of iterations set (D5 and Z5).

  • generateAutomatedGameplayConfigs.py Generate config files to be provided to "automatedGameplay" for each member of the team generated in the MAP-Elites. This allows triggering automated gameplay of the games using the configuration describing each of the agents generated in the experiments.

  • recordGameplays.sh Run and record automated gameplays for Butterflies, Zelda and Digdug games. The description of the agent used to run the automated gameplay is provided on a JSON config file. During the execution of the game, we make a call to record-screen.sh. This runs screencapture and has been included in the automatedGameplay folder.

  • mergeAll.sh Convert all the Z5 and D5 temp files into their final ones at once.

  • generateAll.sh Generate all heatmaps at once.

Credits

We use Plotly Python to generate the graphs and ttab to be able to run screencapture while executing the game.

License

Copyright (C) 2021 Cristina Guerrero-Romero

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.