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 Organization},
  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.0.tar.gz (96.6 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.0-cp310-cp310-macosx_11_0_arm64.whl (243.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: olam-1.0.0.tar.gz
  • Upload date:
  • Size: 96.6 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.0.tar.gz
Algorithm Hash digest
SHA256 635dc8e228992bafa658fd797228b8af21907f48def4b1b03a7b59f64339f8aa
MD5 95cff3c589fef2566e06d02cd5e65783
BLAKE2b-256 b0245188b553031d7cee5730905951561f9c2354fcd200c3bba1459cc8a8dc3f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for olam-1.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 304a30f7836b55ddeade183b19969f89eac607b74c637402eb756d2735bb473d
MD5 0e816e513b85200a3fd6177458f623a5
BLAKE2b-256 477b5e68b8c134f508a49bf6b46c8213065407ebe583b8a03b2040e08a479c0b

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