This repository contains the official code of the Noisy Offline Learning of Action Models (NOLAM) algorithm.
The following instructions have been tested on macOS Sonoma 14.5
- Clone this repository:
git clone https://github.com/LamannaLeonardo/OffLAM.git
- Create a Python 3.9 virtual environment using conda (or venv):
conda create -n nolam python=3.9
- Activate the environment with conda (or venv):
conda activate nolam
- Install dependencies:
pip install numpy pandas matplotlib openpyxl
- Check everything is correctly installed by running
main.py
script.
The NOLAM algorithm can be run for learning from traces with noisy states with a noise ratio varying from 0 to 1.
To run NOLAM on all domains in "Analysis/Input traces/NOLAM/", and all noise ratios in [0, 1], run the main.py
script.
When you execute NOLAM, a new directory with all logs and results is created in the Results/NOLAM/noisy_states
folder. For instance, when you run NOLAM for the first time, the logs and results are stored in the folder Results/NOLAM/noisy_states/run0
. For each considered domain (e.g. blocksworld), a subdirectory is created (e.g. Results/NOLAM/noisy_states/run0/blocksworld
), which consists of a log file and learned action model for each noise ratio in [0, 1].
In particular, each domain directory contain one subdirectory for every considered noise ratio (e.g. Analysis/Results/NOLAM/noisy_states/run0/blocksworld/0.2
),
where you can find three files:
- log: contains some debugging information
- model.pddl: the learned model
- op_stats.json: for each operator and potential precondition/effect of the operator, we store the counting of transitions where the ground atom is true/false after/before executing an instantiation of the operator.
Finally, each run directory contains the detailed results over all domains in a pandas dataframe named nolam_results.xlsx
.
For every domain and noise ratio in [0,1], the set of traces generated for evaluating NOLAM can be found in the directory Analysis/Input traces/NOLAM/
.
If you find this repository useful, please consider citing the related paper.
@article{lamanna2024action,
title={Lifted Action Models Learning from Partial Traces},
author={Lamanna, Leonardo and Serafini, Luciano},
booktitle={Proceedings of the International Conference on Automated Planning and Scheduling},
volume={34},
pages={342--350},
year={2024}
}
This project is licensed under the MIT License - see the LICENSE file for details.