Common usage of running the demo programs is described here.
Build the Demo Program †
Execute:
$ cd benchmarks/DEMO_DIR
$ make
Here, DEMO_DIR is each demo directory.
See Documentation/Installation Guide for the detail.
Running Command †
Execute as follows:
$ ./DEMO_PRG -path PATH_LIST -agent AGENT_FILE -outdir OUT_DIR
Here, the demo-specific elements are:
- DEMO_PRG
- Demo program whose name is *.out.
- PATH_LIST
- Comma separated path list for the demo program to search agent scripts.
- AGENT_FILE
- Comma separated agent script(s) in which a reinforcement learning module and the other modules are configured.
- OUT_DIR
- 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.
Result Analysis †
In OUT_DIR (result/rl1), the following files are stored:
- cmdline
- Command line of the execution.
- before.agent, after.agent
- A whole agent script generated by the program (before the execution and after the execution, respectively).
- ext_sto
- External storage directory (maybe not used in this case).
- included
- Directory to store the copy of every included agent file.
- log-eps-ret.dat
- Log file of (episode number, return in the episode).
- log-action-res.dat
- Log file of each action.
For example, use gnuplot to plot the learning curve as:
$ gnuplot
gnuplot> plot 'log-eps-ret.dat' w l
Miscellaneous †
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.