PPDDL plan evalutation simulator
C++ C Shell Common Lisp
Switch branches/tags
Clone or download
Permalink
Failed to load latest commit information.
examples Changed to Apache License; changed version to 2.2. Oct 7, 2007
port Moved getopt.h from ./ to port/ to avoid include confusion with syste… Oct 13, 2007
AUTHORS Changed to Apache License; changed version to 2.2. Oct 7, 2007
COPYING Changed to Apache License; changed version to 2.2. Oct 7, 2007
ChangeLog Changed to Apache License; changed version to 2.2. Oct 7, 2007
INSTALL Changed to Apache License; changed version to 2.2. Oct 7, 2007
LICENSE Changed to Apache License; changed version to 2.2. Oct 7, 2007
Makefile.am Simplified configuration of CUDDDIR (no need to place library files i… Nov 3, 2007
NEWS Changed date for release of version 2.2. Oct 9, 2007
NOTICE Changed to Apache License; changed version to 2.2. Oct 7, 2007
README Updated protocol description in README. Oct 21, 2007
aclocal.m4 Changed to Apache License; changed version to 2.2. Oct 7, 2007
actions.cc Added missing actions.* files; updated NEWS with information on lates… Oct 7, 2007
actions.h Added missing actions.* files; updated NEWS with information on lates… Oct 7, 2007
client.cc MDPSim made compatible with gcc 4.3.2 (which requires more includes). Dec 23, 2008
client.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
comp.cfg Changed to Apache License; changed version to 2.2. Oct 7, 2007
configure.ac Changed to Apache License; changed version to 2.2. Oct 7, 2007
depcomp Changed to Apache License; changed version to 2.2. Oct 7, 2007
domains.cc Changed to Apache License; changed version to 2.2. Oct 7, 2007
domains.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
effects.cc MDPSim made compatible with gcc 4.3.2 (which requires more includes). Dec 23, 2008
effects.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
expressions.cc Memory leak fixed in strxml.cc . Dec 7, 2007
expressions.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
formulas.cc Changed to Apache License; changed version to 2.2. Oct 7, 2007
formulas.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
functions.cc Changed to Apache License; changed version to 2.2. Oct 7, 2007
functions.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
getopt.c Changed to Apache License; changed version to 2.2. Oct 7, 2007
getopt1.c Changed to Apache License; changed version to 2.2. Oct 7, 2007
install-sh Changed to Apache License; changed version to 2.2. Oct 7, 2007
mdpclient.cc MDPSim made compatible with gcc 4.3.2 (which requires more includes). Dec 23, 2008
mdpcommon.h MDPSim made compatible with gcc 4.3.2 (which requires more includes). Dec 23, 2008
mdpserver.cc MDPSim made compatible with gcc 4.3.2 (which requires more includes). Dec 23, 2008
mdpserver.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
mdpsim.cc MDPSim made compatible with gcc 4.3.2 (which requires more includes). Dec 23, 2008
missing Changed to Apache License; changed version to 2.2. Oct 7, 2007
mkinstalldirs Changed to Apache License; changed version to 2.2. Oct 7, 2007
mtbdd.cc Simplified configuration of CUDDDIR (no need to place library files i… Nov 3, 2007
mtbdd.h Simplified configuration of CUDDDIR (no need to place library files i… Nov 3, 2007
mtbddclient.cc Simplified configuration of CUDDDIR (no need to place library files i… Nov 3, 2007
parser.yy Changed to Apache License; changed version to 2.2. Oct 7, 2007
predicates.cc Changed to Apache License; changed version to 2.2. Oct 7, 2007
predicates.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
problems.cc Changed to Apache License; changed version to 2.2. Oct 7, 2007
problems.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
rational.cc MDPSim made compatible with gcc 4.3.2 (which requires more includes). Dec 23, 2008
rational.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
refcount.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
requirements.cc Changed to Apache License; changed version to 2.2. Oct 7, 2007
requirements.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
states.cc Changed to Apache License; changed version to 2.2. Oct 7, 2007
states.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
strxml.cc Memory leak fixed in strxml.cc . Dec 7, 2007
strxml.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
terms.cc Changed to Apache License; changed version to 2.2. Oct 7, 2007
terms.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
tokenizer.ll Changed to Apache License; changed version to 2.2. Oct 7, 2007
types.cc Changed to Apache License; changed version to 2.2. Oct 7, 2007
types.h Changed to Apache License; changed version to 2.2. Oct 7, 2007
ylwrap Changed to Apache License; changed version to 2.2. Oct 7, 2007

README

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 client `mdpclient'.

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'.
  See `config.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):

<end-round>
 <state>
  <atom><predicate>has-soap</predicate></atom>
  <atom><predicate>has-soccer-ball</predicate></atom>
  <atom><predicate>shower-is-on</predicate></atom>
  <fluent><function>reward</function><value>14</value></fluent>
 </state>
 <time-spent>3</time-spent>
 <turns-used>5662</turns-used>
</end-round>

<end-round>
 <state>
  <atom><predicate>has-soap</predicate></atom>
  <atom><predicate>has-soccer-ball</predicate></atom>
  <fluent><function>reward</function><value>-30</value></fluent>
 </state>
 <time-spent>3</time-spent>
 <turns-used>7861</turns-used>
</end-round>

<end-session>
 <sessionID>62</sessionID>
 <rounds>2</rounds>
 <goals>
  <failed>2</failed>
  <reached><successes>0</successes></reached>
 </goals>
 <metric-average>-8</metric-average>
</end-session>

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:

  <session-request>
    <name> -some arbitrary identifier- </name>
    <problem> -the name of the problem to work on- </problem>
  </session-request>

The server will respond with:

  <session-init>
    <sessionID> -some number- </sessionID>
    <setting>
      <rounds> -the times you can try the problem- </rounds>
      <allowed-time> -time limit- </allowed-time>
      <allowed-turns> -turn limit- </allowed-turns>
    </setting>
  </session-init>


The client will then send:

  <round-request/>


The server responds with:

  <round-init>
    <sessionID> -that same  number- </sessionID>
    <round> -the count of how many rounds you've done- </round>
    <time-left> -time remaining until time limit is reached- </time-left>
    <rounds-left> -rounds remaining- </rounds-left>
  </round-init>

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

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

  <end-round>
    <sessionID> -that same number- </sessionID>
    <round> -the count of how many rounds you've done- </round>
    -state-
    <goal-reached/> (this will only appear if the goal has been met)
    <time-spent> -time spend in this round- </time-spent>
    <turns-used> -turns used in this round- </turns-used>
  </end-round>

  <state>
    <is-goal/> (this will only appear if the goal has been met)
    -atoms-
    -fluents-
  </state>

An atom:

  <atom>
    <predicate> -the name of the predicate- </predicate>
    <term> -a term- </term>  (0 or more of these)
    <term> -another term- </term>
  </atom>

A fluent:

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

The client responds to state messages with actions:

  <act>
    <action>
      <name> -the name of the action- </name>
      <term> -a term- </term>  (0 or more of these)
      <term> -another term- </term>
    </action>
  </act>

After the last round, the server sends a final message summarizing the
session:

  <end-session>
    <sessionID> -that same number- </sessionID>
    <rounds> -number of rounds- </rounds>
    <goals>
      <failed> -number of failed rounds- </failed>
      <reached>
        <successes> -number of successful rounds- </successes>
        <time-average> -time average per successful round- </time-average>
        <turn-average> -turn average per successful round- </turn-average>
      </reached>
    </goal>
    <metric-average> -metric average over all rounds- </metric-average>
  </end-session>

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=<location of cudd files>

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.