AI-Planning / tarski-lite

Small wrapper for tarski to do common STRIPS-like stuff.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tarski-lite

A tiny wrapper for STRIPS-like functionality of the tarski library.

Installing

For now, just place the tarskilite.py file in whatever project you need. If this grows large enough, we'll put it on PyPI.

Usage

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'])

Requirements

Just tarski with clingo option installed.

Citing This Work

Coming soon...

About

Small wrapper for tarski to do common STRIPS-like stuff.

License:MIT License


Languages

Language:Python 100.0%