Skip to main content

information-gain-aml

A CNF/SAT-based information-theoretic approach for online action model learning in PDDL planning domains.

The algorithm maintains uncertainty over preconditions and effects using CNF formulas, selects actions that maximize expected information gain, and converges toward the true action model through online interaction with the environment.

Installation

pip install information-gain-aml

Quick Start

from information_gain_aml.algorithms.information_gain import InformationGainLearner

learner = InformationGainLearner(
    domain_file="path/to/domain.pddl",
    problem_file="path/to/problem.pddl",
)

# Select an action based on expected information gain
action_name, objects = learner.select_action(current_state)

# After observing the outcome, update the model
learner.update_model()

Key Features

  • CNF-based uncertainty representation -- precondition and effect knowledge encoded as SAT formulas
  • Information-theoretic action selection -- picks actions that maximize expected information gain
  • Lifted learning -- learns at the operator level, generalizing across object instances
  • Object subset selection -- scales to large domains by focusing on relevant object subsets
  • Parallel gain computation -- optional multiprocessing for large action spaces
  • MCTS-based action selection -- lookahead and full UCT strategies for deeper exploration

Action Selection Strategies

Strategy Description Speed
greedy Selects the action with the highest immediate information gain Fast (default)
lookahead Bounded depth-limited lookahead with discounted future gain Moderate
mcts Full UCT-based Monte Carlo Tree Search Slow (see note below)

Performance note: The mcts strategy performs SAT solving during rollouts, which makes it significantly slower than other strategies. For large domains it may be impractical. Performance improvements are planned for a future release. Use lookahead for a balance between exploration depth and speed.

Configuration

learner = InformationGainLearner(
    domain_file="domain.pddl",
    problem_file="problem.pddl",
    max_iterations=1000,                  # max learning iterations
    use_object_subset=True,               # object subset selection (default: True)
    spare_objects_per_type=2,             # extra objects per type beyond minimum
    num_workers=None,                      # parallel workers (None=auto, 0=sequential)
    learn_negative_preconditions=True,    # include negative precondition candidates
    selection_strategy="greedy",          # "greedy", "lookahead", or "mcts"
    lookahead_depth=2,                    # depth for lookahead strategy
    mcts_iterations=50,                   # iterations for mcts strategy
    mcts_rollout_depth=5,                # rollout depth for mcts strategy
)

Requirements

License

MIT

Metadata

Release files for information-gain-aml 0.3.1

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

Source distribution (sdist)

Source distribution for information-gain-aml 0.3.1
File Size Uploaded Provenance Actions
information_gain_aml-0.3.1.tar.gz 60.6 kB With provenance Details for information_gain_aml-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for information-gain-aml 0.3.1
File Interpreter ABI Platform Actions
information_gain_aml-0.3.1-py3-none-any.whl Python 3 none any Details for information_gain_aml-0.3.1-py3-none-any.whl

Total release size: 128.3 kB

Release files / information_gain_aml-0.3.1.tar.gz

Download URL information_gain_aml-0.3.1.tar.gz
Size 60.6 kB
Tags Source
SHA-256 checksum
How to use checksums
698c393d0c44f267df7e011ae163781b14e3966457bdfa39a933b65a12eb6447
BLAKE2b-256 checksum
How to use checksums
0b7c5752f9070255421d922567b390e44f967186fad27ae9c360bcab731e1535
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 22, 2026.

Transparency log

Release files / information_gain_aml-0.3.1-py3-none-any.whl

Download URL information_gain_aml-0.3.1-py3-none-any.whl
Size 67.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9cd8cf84208f5cddeed6991139dcd8b5371b4ab7cd434a9c3dc1b46fa903e50
BLAKE2b-256 checksum
How to use checksums
647decb54cd299ed0b7ff66e3f386fa1f363ac4d6002b4f99c3866c0c241d0bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 22, 2026.

Transparency log

Security for information-gain-aml 0.3.1

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for information_gain_aml-0.3.1.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 Mar 22, 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.

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