hlsyounes / mdpsim

PPDDL plan evalutation simulator
Apache License 2.0
14 stars 5 forks source link

Instructions for Building and Running the PPDDL MDP Simulator

This package has been prepared with the GNU build tools. See `INSTALL' for generic instruction on how to build the MDP simulator.

On most systems you should be able to build the server and a simple client in two easy steps:

  1. Type `./configure' to configure the package for your system.

  2. Type `make' to compile the package.

If all goes well, this should produce two executables: the server mdpsim' and a simple clientmdpclient'.

Run `./mdpsim --help' for brief information on how to run the MDP server.

To test, first start a server (we specify a time limit of 10 seconds instead of using the default time limit of 15 minutes):

./mdpsim --port=2323 --time-limit=10000 examples/john.pddl &

Next, start a simple client:

./mdpclient --host=localhost --port=2323 examples/john.pddl

The client should print information on the simulation runs and exit. To stop the server, kill the associated process.

Troubleshooting

The package has been successfully compiled on the following platforms using various versions of GCC:

RedHat Linux 6.2 [GCC 2.95.3] RedHat Linux 7.1 [GCC 3.2.3] RedHat Linux 9.0 [GCC 3.2.2, 4.0.1] SunOS 5.7 [GCC 3.2.3] SunOS 5.9 [GCC 4.0.0]

If you see something like

... checking whether the C++ compiler works... configure: error: cannot run C++ compiled programs. If you meant to cross compile, use --host'. Seeconfig.log' for more details.

when you run `./configure', then make sure that libstdc++.so.* is in the search path for shared libraries. You may have to set the environment variable LD_LIBRARY_PATH before running the configure script.

If you encounter any other problems when configuring or compiling the package, send the output produced by the configure script, including the file `config.log', or the output generated by make to hyounes@tempastic.org.

Bug reports and feature requests should be filed online:

http://code.google.com/p/mdpsim/issues/list

Interpreting the Test Output

The server tests the sample planner (mdpclient, which executes random legal actions) on the domain defined in the file examples/john.pddl on the problem `john-problem' defined there. It executes the domain twice---this parameter is set in the configuration file comp.cfg (the second number on the first line).

Here is an example output (newlines added for clarity):

has-soap has-soccer-ball shower-is-on reward14 3 5662 has-soap has-soccer-ball reward-30 3 7861 62 2 2 0 -8

It shows the final state of two rounds for this domain (positive literals are listed). It also reports the reward value for each round, the time spent, and the number of steps taken. A final report gives the average value of the reward score ((+14-30)/2 = -8) as well the number of successful vs. unsuccessful rounds.

Communication Protocol

Upon connecting to the server, the client issues a message of the form:

-some arbitrary identifier- -the name of the problem to work on-

The server will respond with:

-some number- -the times you can try the problem- -time limit- -turn limit-

The client will then send:

The server responds with:

-that same number- -the count of how many rounds you've done- -time remaining until time limit is reached- -rounds remaining-

At this point the client may do any calculations, as the clock is running.

The server will send a state or end-round message:

-that same number- -the count of how many rounds you've done- -state- (this will only appear if the goal has been met) -time spend in this round- -turns used in this round- (this will only appear if the goal has been met) -atoms- -fluents-

An atom:

-the name of the predicate- -a term- (0 or more of these) -another term-

A fluent:

-the name of the function- -a term- (0 or more of these) -another term- -fluent value-

The client responds to state messages with actions:

-the name of the action- -a term- (0 or more of these) -another term- After the last round, the server sends a final message summarizing the session: -that same number- -number of rounds- -number of failed rounds- -number of successful rounds- -time average per successful round- -turn average per successful round- -metric average over all rounds- Time and turn average is present only if there is at least one successful round. For more details on the communication protocol, see: Håkan L. S. Younes, Michael L. Littman, David Weissman, and John Asmuth. 2005. "The first probabilistic track of the international planning competition." Journal of Artificial Intelligence Research 24: 851-887. Conversion to ADD/MTBDD Representation -------------------------------------- The file `mtbdd.cc' contains code for constructing ADD/MTBDD representations of transition probability matrices and reward vectors for PPDDL actions. The code uses the CUDD package for decision diagram manipulation, which can be obtained at the following location: http://vlsi.colorado.edu/~fabio/ You can build a simple client program that uses the converter with `make mtbddclient', but before doing so you need to install the CUDD link libraries and headers in a single directory and configure the package with the following command: ./configure CUDDDIR= The default value of CUDDDIR is `./cudd'. To set up CUDD, try the following: wget ftp://vlsi.colorado.edu/pub/cudd-2.4.1.tar.gz gunzip cudd-2.4.1.tar.gz tar xvf cudd-2.4.1.tar ln -s cudd-2.4.1/cudd cd cudd-2.4.1 [hand-edit the makefile] make To test the MTBDD client, first start a server: ./mdpsim --port=2323 --config=comp.cfg examples/coffee-domain.pddl examples/coffee-problem.pddl & Next, start the client: ./mtbddclient -v1 --host=localhost --port=2323 examples/coffee-domain.pddl examples/coffee-problem.pddl You can increase the verbosity level by using -v2 or -v3 instead of -v1. This will provide more detailed output from the conversion to MTBDDs and the progress of value iteration.