Skip to main content

CNF/SAT-based information-theoretic online action model learning

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

information_gain_aml-0.3.0.tar.gz (64.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

information_gain_aml-0.3.0-py3-none-any.whl (72.9 kB view details)

Uploaded Python 3

File details

Details for the file information_gain_aml-0.3.0.tar.gz.

File metadata

  • Download URL: information_gain_aml-0.3.0.tar.gz
  • Upload date:
  • Size: 64.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for information_gain_aml-0.3.0.tar.gz
Algorithm Hash digest
SHA256 78b30672383a3e815fe92989889b03d4446871c7541375234d232d795d319d43
MD5 8b9c70f6713bbd3709e8ffcad4e49e76
BLAKE2b-256 5ee4dc0c232d5ab11ec2b95c83e5baf24f3798c4b4d6af1b2a671407fa9ece49

See more details on using hashes here.

Provenance

The following attestation bundles were made for information_gain_aml-0.3.0.tar.gz:

Publisher: publish.yml on omereliy/online_model_learning

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file information_gain_aml-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for information_gain_aml-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 098b4ad2a2cf864989c958148f65aac9ed23e5bcdfaea5e84a37df5d4066b4d3
MD5 bac2cbe5b34a9d1076b5565f426de862
BLAKE2b-256 9e32c2cb6bff5c06c86691d3e4bfb614cd17302f2030173f48d909cf649d513c

See more details on using hashes here.

Provenance

The following attestation bundles were made for information_gain_aml-0.3.0-py3-none-any.whl:

Publisher: publish.yml on omereliy/online_model_learning

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page