Skip to main content

Online Learning of Action Models (OLAM).

Project description

Online Learning of Action Models for PDDL Planning

This repository contains the refactored code of the Online Learning of Action Models (OLAM) algorithm presented at IJCAI 2021, for details about the method please see the paper. The previous code used for the paper experiments is available at this link.

Example Usage

import unified_planning
from unified_planning.io import PDDLReader
from unified_planning.shortcuts import SequentialSimulator
from amlgym.util.util import empty_domain
from olam.OLAM import OLAM

# Disable printing of planning engine credits
unified_planning.shortcuts.get_environment().credits_stream = None

domain_ref_path = "olam/benchmarks/domains/blocksworld.pddl"
problem_path = "olam/benchmarks/problems/blocksworld/1_p00_blocksworld_gen.pddl"
empty_domain_path = empty_domain(domain_ref_path) # remove preconditions/effects
olam = OLAM(empty_domain_path)

sim_problem = PDDLReader().parse_problem(domain_ref_path,
                                         problem_path)
simulator = SequentialSimulator(sim_problem)
learned_domain_str, trajectory = olam.run(simulator, max_steps=100)

print(f"Generated a trajectory with {len(trajectory.observations)} states")
print(f"Domain learned: {learned_domain_str}")

Installation for developers

Clone this repository and install in developer mode:

pip install -e .

Citations

@inproceedings{ijcai2021-566,
  title     = {Online Learning of Action Models for PDDL Planning},
  author    = {Lamanna, Leonardo and Saetti, Alessandro and Serafini, Luciano and Gerevini, Alfonso and Traverso, Paolo},
  booktitle = {Proceedings of the Thirtieth International Joint Conference on
               Artificial Intelligence, {IJCAI-21}},
  publisher = {International Joint Conferences on Artificial Intelligence},
  pages     = {4112--4118},
  year      = {2021},
  doi       = {10.24963/ijcai.2021/566},
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

This code has been refactored with the help of Ejdis Gjinika

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

olam-1.0.1.tar.gz (96.7 kB view details)

Uploaded Source

Built Distribution

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

olam-1.0.1-cp310-cp310-macosx_11_0_arm64.whl (243.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file olam-1.0.1.tar.gz.

File metadata

  • Download URL: olam-1.0.1.tar.gz
  • Upload date:
  • Size: 96.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for olam-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3767347eb6f6eef95274f350393267ccdc9bb5a2cbb6e332da46fa0311805c09
MD5 61a75a16c56286c919a604f96a0bd37b
BLAKE2b-256 2caea0e95ad3545e5e3f5125f4bc4a0c59fcc2c278f8fcf6d7a902d8009ec9bd

See more details on using hashes here.

File details

Details for the file olam-1.0.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for olam-1.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ffd245f4098ad9feb81145818289a9e33cda56ae90f51a2acda0b1f7d20f1a69
MD5 abfcc338a881b980afdf21fc1a5b1af5
BLAKE2b-256 109ef65361d90beaa084fd9b30795b384b0cf704f5d5c8f5f0f7160557be5184

See more details on using hashes here.

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