GithubHelp home page GithubHelp logo

gdaplanner's Introduction

Goal Directed Action Planner

To compile the software package, run this:

mkdir build
cd build
cmake ..
make

Run (must be run from within bin at the moment):

cd bin
./GDAPlanner-bin

Testing the code

To see whether a current implementation suffices all automated tests, after compiling, run this from the build/ directory:

make test

Included Examples

  • data/tablesetting-domain.pddl: Table setting example domain file written in PDDL
  • data/tablesetting-problem.pddl: Table setting example problem file written in PDDL (fits the accompanying example domain)
  • data/test/*: Numerous PDDL domain and problem definitions for testing the PDDL parser

Regenerating the Doxygen Documentation

To regenerate the Doxygen documentation, you will need Doxygen:

sudo apt-get install doxygen

From the project's root directory, run Doxygen like so:

doxygen doc/Doxyfile

This will generate a doc/html directory, containing all source code documentation. View it starting from the index.html contained therein:

google-chrome doc/html/index.html

Online Documentation

Be sure to check the Wiki! There are tutorials and further explanations of the concepts and code pieces there.

gdaplanner's People

Contributors

fairlight1337 avatar mpomarlan avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

gdaplanner's Issues

Typing is not used yet

Although present in the Action class and parsed by the PDDL parser, the type information of variables is not yet used. As pointed out in #34, this leads to a tremendously large search space for planners.

Ergo: Typing needs to be implemented into the Prolog class properly.

World state accessible from Prolog predicates

We need new predicates to access the world state object from within Prolog. This includes:

(assert <some-fact>)
(retract <some-fact>)
(holds <some-fact>)

Where assert adds a new fact to the world, retract removes it, and holds checks whether the fact currently holds.

Also, we need predicates for accessing world categories: Init sequences for PDDL domain problem specifications, available action predicates, etc.

Recursion+backtracking doesn't work

Try the following:

prolog->addPredicate("(apred ?x ?y)",
"(= ?x ?y)",
"(member ?x (0 2))");
prolog->addPredicate("(apred ?x ?y)",
"(= ?x ?y)",
"(member ?x (1 3))");
prolog->addPredicate("(apred ?x)",
"(apred ?x 2)");

solPrior = prolog->query("(apred ?x)", solPrior);
if(solPrior.valid())
std::cout << "BINDINGS " << solPrior.bindings().toString() << "\n";
}

Expected output: binding of ?x = 2. Produced output: no bindings (no valid solution found). This doesn't change if we switch the order of the predicate additions like this, however:

prolog->addPredicate("(apred ?x ?y)",
"(= ?x ?y)",
"(member ?x (1 3))");
prolog->addPredicate("(apred ?x ?y)",
"(= ?x ?y)",
"(member ?x (0 2))");
prolog->addPredicate("(apred ?x)",
"(apred ?x 2)");

so it's probably a recursion issue.

The next call (essentially, an unwrapping of the branch of apred that should work):

solPrior = prolog->query("(and (= ?x 2) (member ?x (0 2)))", solPrior);
if(solPrior.valid())
std::cout << "BINDINGS " << solPrior.bindings().toString() << "\n";
}

produces the expected binding of ?x = 2

(once ...) predicate missing

(once ...) would cut off all solutions after the first one (if any). This is applicable for situations in which only a truth value is required, for example >=:

(<- (>= ?a ?b)
  (or (> ?a ?b)
      (= ?a ?b)))

When resolving this, it yields two solutions if both, > and = are met, instead of only one expected. The final predicate would be used like this:

(<- (>= ?a ?b)
  (once (or (> ?a ?b)
            (= ?a ?b)))

Loading files from other .plg files requires path relative to executable

When loading the GDA Prolog Standard Library, subsequent files loaded from those files require the same relative path (relative to the binary of the program loading the library).

prolog_tool loads the stdlib from ../data/lib/std/main.plg. In main.plg there needs to be this line to properly include math.plg residing in the same directory:

(load "../data/lib/std/math.plg")

Ideally, it would only require this:

(load "math.plg")

This can be done by cutting the original file's relative path from its filename, and appending the now-to-load file to that path.

Meaning of index is not defined consistently

The index vector in the Solution class has different meanings for different predicates (or facts), and will ultimately lead to problems when not consistently defined over all areas.

Mentioned here: #34

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.