This is a simple demonstration of a maze task.
The robot is an omniwheel mobile robot. The robot can move in any direction on a 2-dimensional plane ([-1,1]x[-1,1]).
This task is performed in simulation. The state of the robot is its global position which is expressed as
x = (x1, x2) ,
and its control input is the state transition in a time step dt=0.01 which is expressed as
u = (Dx1, Dx2) .
In this environment, there is some wind that changes the behavior of the robot in the direction of the arrows as shown in the above figure. There are also walls which the robot can not pass through.
The objective of the navigation task is to acquire a path from the start to the goal. According to this objective, the reward function is designed as follows: 1 for goal, a small step cost, and a penalty for going out of the plane.
Execute:
$ cd benchmarks/maze2d $ make
See Documentation/Installation Guide for the detail.
Execute as follows:
$ ./maze2d.out -path ../cmn,m -agent AGENT_FILE -outdir OUT_DIR
Here, AGENT_FILE is an agent script in which a reinforcement learning method and the other conditions are slected. Available agent scripts are listed below. OUT_DIR is a result directory into which the program store some data. You need to create OUT_DIR before running; if non-existet directory is specified, no result is stored.
For example, execute the following:
$ mkdir -p result/rl1 $ ./maze2d.out -path ../cmn,m -agent ql_da1 -outdir result/rl1
You can see the output like:
random seed = 1306343562 episode 0... episode 1... episode 2... episode 3... episode 4... ... episode 997... episode 998... episode 999...
In OUT_DIR (result/rl1), following files are stored:
So, for example, use gnuplot to plot the learning curve as:
$ gnuplot gnuplot> plot 'result/rl1/log-eps-ret.dat' w l
The following files can be specified as AGENT_FILE.
In order to specify the random seed, just append an agent file as follows:
$ ./maze2d.out -path ../cmn,m -agent ql_da1,seed0 -outdir result/rl1
Here, seed0 is m/seed0.agent; in this file, the random seed is set to be zero. By specifying the random seed, we can obtain the same result in every run.