TPP PDDL Solver
SkillFiles & storageSolve TPP (Travelling Purchase Problem) PDDL planning tasks. Use when you need to read a problem.json config file, parse PDDL domain/problem files, generate valid plans using pyperplan via unified_planning, format actions as function-call strings, write plan output files, and serialize plans as pickle. Handles the complete pipeline from JSON config to validated plan output.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the TPP PDDL Solver skill
What this skill tells your AI
The instructions your AI receives, as published by openlair/openskill in tasks-evolved/pddl-tpp-planning/environment/skills/evo-tpp-solver/SKILL.md and read by ahel’s review.
Solves Travelling Purchase Problem (TPP) planning tasks encoded in PDDL using pyperplan via the unified_planning framework.
When to use this skill
- You have a
problem.jsonfile listing TPP planning tasks - Each task specifies a PDDL domain file, problem file, and output path
- You need to generate valid plans and write them as formatted text files
- You need pickle-serialized plans for validation compatibility
Quick Start
Run the solver script directly:
cd /app
python -m environment.skills.evo-tpp-solver.scripts.solve
Or use the solver from Python:
from pathlib import Path
import sys
sys.path.insert(0, "/app/environment/skills/evo-tpp-solver")
from scripts.solve import solve_all_tasks
solve_all_tasks(Path("/app/problem.json"), Path("/app"))
Pipeline Overview
- Load config — Read
problem.jsonto get the list of tasks (each has domain path, problem path, output filename) - Parse PDDL — Use
unified_planning.io.PDDLReaderto parse domain + problem files into a Problem object - Solve — Use
OneshotPlanner(name="pyperplan")with configurable search/heuristic. Default:gbf/hfffor speed. Falls back towastar/haddif the fast config fails. - Format actions — Each action is formatted as
action_name(arg1, arg2, ...)usingstr(action_instance)which already produces this format - Write plan — One action per line to the output text file
- Serialize — Pickle the plan actions list for validation compatibility
Key Implementation Details
Action Format
The str() representation of a unified_planning ActionInstance already produces the required format:
drive(truck1, depot1, market1)
buy(truck1, goods1, market1, level0, level1, level0, level1)
All identifiers are lowercase (PDDL is case-insensitive; PDDLReader normalizes to lowercase).
Solver Configuration
pyperplan supports these search/heuristic combinations via OneshotPlanner params:
- Search:
gbf,astar,wastar,bfs,ehs,ids - Heuristic:
hff,hadd,hmax,hsa,blind,lmcut,landmark
The default UP-pyperplan config is wastar/hadd. For faster solving, use gbf/hff.
Fallback Strategy
If the primary solver config fails or times out:
- Try
gbf/hff(fast, satisficing) - Try
wastar/hadd(UP default) - Try
astar/hff(optimal but slower) - Try
bfs/blind(complete but slowest)
TPP Domain Structure
The TPP domain uses :strips :typing requirements with these actions:
drive(?t, ?from, ?to)— move truck between placesbuy(?t, ?g, ?m, ?l1, ?l2, ?l3, ?l4)— purchase goods at marketload(?g, ?t, ?m, ?l1, ?l2, ?l3, ?l4)— load goods onto truckunload(?g, ?t, ?d, ?l1, ?l2, ?l3, ?l4)— unload goods at depot
Levels (level0, level1, ...) encode quantities propositionally since pyperplan only supports STRIPS.
Script Reference
scripts/solve.py— Main solver module with all pipeline functions. Run directly or import.
Key Functions
load_task_config(config_path)— Parse problem.json, return list of task dictssolve_task(domain_path, problem_path, configs)— Parse PDDL and solve with fallbackformat_action(action_instance)— Format a single action asname(arg1, arg2, ...)write_plan(actions, output_path)— Write formatted plan to text file + picklesolve_all_tasks(config_path, base_dir)— End-to-end: load config, solve all, write all
Signals
- GitHub stars
- 91
- Forks
- 4
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
evo-tpp-solver- Source
- github.com/openlair/openskill