Skip to content

OLD MADRaS API

Sohan Rudra edited this page Dec 13, 2018 · 4 revisions

Currently we still support the old API of MADRaS at the branch Version1.

Install MADRaS by following these instructions.

Simulator Configuration

Before running an experiment make sure that TORCS is configured with the desired settings.

STEPS:

  1. Open a new terminal window and run torcs.
  2. Select Race -> Quick Race -> Configure Race.

This opens the torcs quick race config window.

NOTE:(After each tab press accept to save the settings)

  • Select the desired track
  • Select Driver (NOTE: Any number of drivers can be selected but you must select scr-server<X> as it is where the agents connect to the simulator. Select as many scr-server<X> as many trainable agents are required. The final selected roster will be shown in the selected table)
  • Finally select the number of laps.

When you are satisfied with the final selection close torcs.

Running Experiments

The examples are currently located in the example_controllers folder.

Behavior Reflex

foo@bar~$ python3 -m MADRaS.example_controllers.behavior_reflex.playGame_DDPG 3001 #for single agent training
foo@bar~$ python3 -m MADRaS.example_controllers.behavior_reflex.multi_agent #for multi agent training

PID

foo@bar~$ python3 -m MADRaS.example_controllers.pid.playGame_DDPG_pid 3001 #for single agent training
foo@bar~$ python3 -m MADRaS.example_controllers.pid.multi_agent #for multi agent training

NOTE:

For multiple agents training in the multi_agent.py file set up the number of agents by changing num_workers variable.