A tiny wrapper for STRIPS-like functionality of the tarski library.
For now, just place the tarskilite.py
file in whatever project you need. If this grows large enough, we'll put it on PyPI.
import tarskilite as tl
problem = tl.STRIPS('domain.pddl', 'problem.pddl')
# Set of Fluent objects
problem.fluents
# Easy progression / regression
s0 = problem.init
act = list(problem.actions)[0]
s1 = tl.progress(s0, act)
s2 = tl.regress(problem.goal, act)
# Easy action/fluent lookup
act = problem.action('move loc1 loc2')
fluent = problem.fluent('connected loc1 loc2')
assert fluent == problem.fluent('(connected loc1 loc2)')
# parses plans from file, string, or list
plan = problem.parse_plan('plan.ipc')
plan = problem.parse_plan('(move loc1 loc2)\n(move loc2 loc3)')
plan = problem.parse_plan(['move loc1 loc2', 'move loc2 loc3'])
Just tarski with clingo option installed.
Coming soon...