Tarski

raw JSON →
0.9.1 verified Sat May 09 auth: no python

Tarski is a framework for the specification, modeling and manipulation of AI planning problems. It provides tools for parsing PDDL, grounding actions, and interfacing with planners. Current version: 0.9.1. Release cadence: irregular, with minor updates roughly every 2-3 months.

pip install tarski
error ImportError: cannot import name 'TarskiWorld' from 'tarski'
cause TarskiWorld is not a top-level export.
fix
Use: from tarski import tarski_model as tarski
error ModuleNotFoundError: No module named 'tarski.io'
cause Outdated Tarski version (<0.7.0) that does not have the io submodule.
fix
Upgrade Tarski: pip install --upgrade tarski
error AttributeError: module 'tarski' has no attribute 'parse_problem'
cause parse_problem is not in top-level tarski, but in io submodule.
fix
Use: from tarski.io import parse_problem
breaking Version 0.9.0 dropped support for Python <3.10. Upgrade Python if needed.
fix Use Python 3.10+ or stay on 0.8.x if you need older Python.
gotcha The 'TarskiWorld' class is not directly importable from the top-level tarski package. Many tutorials show the wrong import.
fix Use: from tarski import tarski_model as tarski
deprecated The 'ground' method from older versions has been moved to the 'operations' module.
fix Use: from tarski.operations import ground
pip install tarski[dev]

Parse a PDDL domain and problem file, then print basic info.

from tarski.io import parse_problem

# Parse a PDDL domain and problem
problem = parse_problem('/path/to/domain.pddl', '/path/to/problem.pddl')
print(problem.name)
print('Actions:', list(problem.actions))
print('Objects:', list(problem.objects))