Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
hfoffani committed Jan 20, 2022
1 parent e9dacb6 commit 4806690
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is enough for the user to focus on the implementation of state-space or pla

The development of this tool was inspired from Univerty of Edinburgh's Artificial Intelligence Planning course by Dr. Gerhard Wickler and Prof. Austin Tate. The terms used in this API (and the API itself) closely resembles the ones proposed by the lecturers.

As of today it supports Python 3.
As of today it supports Python 3.8 and up.

The orginal grammar file was authored by Zeyn Saigol from University of Birmingham. I cleaned up it, made it language agnostic and upgraded to ANTLR 4.

Expand Down Expand Up @@ -49,29 +49,29 @@ Using the library is easy.

```
~hernan$ python
Python 3.4.3 (default, Feb 25 2015, 21:28:45)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Python 3.8.0 (default, Nov 20 2019, 14:40:03)
[Clang 11.0.0 (clang-1100.0.33.12)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> import pddlpy
>>> domprob = pddlpy.DomainProblem('domain-03.pddl', 'problem-03.pddl')
>>>
>>> domprob.initialstate()
{('adjacent', 'loc2', 'loc1'), ('unloaded', 'robr'), ('atl', 'robr', 'loc1'), ('unloaded', 'robq'), ('in', 'conta', 'loc1'), ('atl', 'robq', 'loc2'), ('adjacent', 'loc1', 'loc2'), ('in', 'contb', 'loc2')}
{('unloaded', 'robr'), ('adjacent', 'loc2', 'loc1'), ('unloaded', 'robq'), ('in', 'conta', 'loc1'), ('in', 'contb', 'loc2'), ('atl', 'robr', 'loc1'), ('atl', 'robq', 'loc2'), ('adjacent', 'loc1', 'loc2')}
>>>
>>> list( domprob.operators() )
['load', 'unload', 'move']
['move', 'load', 'unload']
>>>
>>> list( domprob.ground_operator('move') )
[<pddlpy.pddl.Operator object at 0x10a968438>, <pddlpy.pddl.Operator object at 0x10a968438>, <pddlpy.pddl.Operator object at 0x10a968438>, <pddlpy.pddl.Operator object at 0x10a968438>, <pddlpy.pddl.Operator object at 0x10a968438>, <pddlpy.pddl.Operator object at 0x10a968438>, <pddlpy.pddl.Operator object at 0x10a968438>, <pddlpy.pddl.Operator object at 0x10a968438>]
[<pddlpy.pddl.Operator object at 0x1089830a0>, <pddlpy.pddl.Operator object at 0x108983130>, <pddlpy.pddl.Operator object at 0x108983190>, <pddlpy.pddl.Operator object at 0x1089830d0>, <pddlpy.pddl.Operator object at 0x1089831c0>, <pddlpy.pddl.Operator object at 0x1089835b0>, <pddlpy.pddl.Operator object at 0x1089835e0>, <pddlpy.pddl.Operator object at 0x108983610>]
>>>
>>> list( domprob.ground_operator('move') )[0].precondition_pos
{('atl', 'robq', 'loc1'), ('adjacent', 'loc1', 'loc1')}
>>>
{('atl', 'robq', 'loc2'), ('adjacent', 'loc2', 'loc2')}
>>>
```
The pddl files are examples obtained from the course material.

Expand All @@ -88,7 +88,7 @@ There are wonderful material at the the University of Edinburgh:
### Future development ###

* Implement the `:requirements` directive.
* Add more examples (a simple planner maybe?).
* Add more examples (time durataion, a simple planner maybe?).
* Add API documentation.
* More unit tests.

Expand Down

0 comments on commit 4806690

Please sign in to comment.