Skip to main content

Klimax logo

up-klimax

CI License: Apache-2.0 Python 3.10 or newer Status: in development

Klimax, an HTN planner for HDDL, as an engine of the Unified Planning Framework.

from unified_planning.shortcuts import OneshotPlanner, PlanValidator
import up_klimax

up_klimax.register()  # until UPF lists it among its engines

with OneshotPlanner(name="klimax") as planner:
    result = planner.solve(problem, timeout=10)  # a HierarchicalProblem
print(result.plan.action_plan)    # the actions
print(result.plan.decomposition)  # each task, its method and its subtasks

with PlanValidator(name="klimax-val") as validator:
    print(validator.validate(problem, result.plan).status)

What it gives

  • klimax, a oneshot planner for hierarchical problems. The plan is a HierarchicalPlan: the sequence of actions and, for every task, the method applied, the values of its parameters and what each of its subtasks became. Every plan is verified, independently of the search, before it is returned. When there is no plan it says so as a proof (UNSOLVABLE_PROVEN).

  • The same engine as an anytime planner (AnytimePlanner(name="klimax")): after the first plan it gives better ones as it finds them: shorter (MinimizeSequentialPlanLength, or no metric), cheaper (MinimizeActionCosts) or with a better value at the end (MinimizeExpressionOnFinalState, MaximizeExpressionOnFinalState). When Klimax proves that the plan is the best, the status is SOLVED_OPTIMALLY: it does for the shortest, and for the cheapest when every action has a cost above zero that does not depend on the state. The value of the metric for the plan is in result.metrics["klimax_metric"].

  • klimax-replanner and klimax-repairer: Replanner(problem, name="klimax-replanner") keeps the problem, takes changes to it (initial values, goals, actions) and plans again; PlanRepairer(name="klimax-repairer") gives a plan back as it is if it is still valid for the problem, and plans again if not. UPF's own replanner does not take hierarchical problems.

  • klimax-val, a validator of hierarchical plans: it checks the decomposition, not only that the actions can be executed, and gives what the plan is worth by the metric of the problem (metric_evaluations).

  • klimax-htn-usertype-fluents-remover, a compiler for any HTN engine: a hierarchical problem with fluents whose value is an object, as one with predicates only. UPF's own compiler for it does not take problems with tasks. up_klimax.plan_back(problem, plan) takes a plan of the result back to the problem, methods included.

What it plans with

Tasks and methods with preconditions; totally and partially ordered task networks; variables in the initial task network; constraints between the parameters of a method or of the initial network; negative, disjunctive, existential and universal conditions; equalities; conditional and universal effects; flat and hierarchical typing; fluents whose value is an object; fluents whose value is a number (integer or real), compared in conditions and assigned, increased or decreased in effects; as quality metrics, the length of the plan, action costs (constants, static fluents or fluents of the state, integer or real) and the value of an expression at the end; durative actions (with durations that are constants, fluents or intervals) and timed effects, for which the plan is a TimeTriggeredPlan inside the HierarchicalPlan: actions that neither the hierarchy nor what they read and write order run at once. Each one is tested (tests/test_kinds.py).

Not yet: orderings between the starts and the ends of tasks (TASK_ORDER_TEMPORAL: Klimax reads them in HDDL, but UPF does not write them), problems that need actions to overlap, numbers with bounds and oversubscription.

HDDL has no words for some of these. They are rewritten before Klimax reads the problem, keeping every name, so that the plan is a plan of the problem as given (up_klimax/convert.py): fluents with object values become predicates, and constraints that are not = or its negation become part of a precondition.

Install

From source, with Klimax's Python module built (klimax-planner) and on the path:

pip install unified-planning
pip install -e .
pytest

Metadata

Release files for up-klimax 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for up-klimax 1.0.0
File Size Uploaded Provenance Actions
up_klimax-1.0.0.tar.gz 27.9 kB With provenance Details for up_klimax-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for up-klimax 1.0.0
File Interpreter ABI Platform Actions
up_klimax-1.0.0-py3-none-any.whl Python 3 none any Details for up_klimax-1.0.0-py3-none-any.whl

Total release size: 50.3 kB

Release files / up_klimax-1.0.0.tar.gz

Download URL up_klimax-1.0.0.tar.gz
Size 27.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9513841e4026e155e1eec1ecaed897dc5e7b0b6833c3d70809a83bbe1d4367da
BLAKE2b-256 checksum
How to use checksums
a2cd38d8897bf7145bc1f7e4ce5721cbb165c4d989f15f6264043595d1a3bd91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / up_klimax-1.0.0-py3-none-any.whl

Download URL up_klimax-1.0.0-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60441f5f9b01faf591429a60311664197c2ac86251e21fe519f113ac877c8cb4
BLAKE2b-256 checksum
How to use checksums
88d3374419184776ef8deaa0b6d41fa5ad7117b7f85f4f6568b89d499edab54b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for up-klimax 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for up_klimax-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page