Skip to content

How does this work again?

Matheus Vieira Portela edited this page Mar 30, 2016 · 3 revisions

Multiagent RL is a system to execute and evaluate multiple simulated robotic agents and have them learn to select appropriate behaviors in a stochastic environment. Currently, the approach is tested in a predator-prey problem using a modified version of the Pac-Man game with introduced uncertainties. Therefore, this simplified multi-agent situation aims to answer the following question: can the ghosts learn to get the Pac-Man?

In order to run the system, two processes are necessary: one that implements agents intelligence, in our case controller.py, and another that provides an interface to the real agents. Since we are using the Pacman simulator, we interface it in the module simulator.py.

First, it's necessary to run the controller.py script, which will launch a server that listens to simulator messages, process them by learning with new information, and returns actions for each agent.

python controller.py

Next, we can launch the Pac-Man simulation with default settings by invoking the command below.

python simulator.py

The simulation may be customized with several implemented flags. Check all available settings by executing:

python simulator.py -h

If configured to save results into a file, the plot.py script can be used to visualize simulation results. For instance, the following command plots all graphs for a results.txt file.

python plot.py -i results.txt
Clone this wiki locally