Giter Site home page Giter Site logo

offlam's Introduction

Lifted Action Models Learning from Partial Traces

DOI License: MIT

This repository contains the official code of the Offline Learning of Action Models (OffLAM) algorithm. The learned models used in the paper experimental evaluation can be downloaded from this link.

Installation

The following instructions have been tested on macOS Ventura 13.3.1

  1. Clone this repository:
 git clone https://github.com/LamannaLeonardo/OffLAM.git
  1. Create a Python 3.9 virtual environment using conda (or venv):
 conda create -n offlam python=3.9
  1. Activate the environment with conda (or venv):
 conda activate offlam
  1. Install dependencies:
pip install numpy pandas matplotlib openpyxl
  1. Download the validator VAL binary files into the directory Util/Grounding, the files already provided in this repository work with macOS. Alternatively, you can compile VAL and copy into the directory Util/Grounding the following files: Analyse, Instantiate, Parser and libVAL.so.

  2. Check everything is correctly installed by running main.py script.

Execution

Running OffLAM

The OffLAM algorithm can be run for learning from traces with partially observable states, partially observable actions, and partially observable states and actions. The experiment can be changed by setting the EXP variable in Configuration.py.

e.g. to run OffLAM on the task of learning from traces with partial states, set EXP = PARTIAL_STATE_EXP in Configuration.py

Log and results

When you execute OffLAM, a new directory with all logs and results is created in the Results/10 traces/OffLAM folder. For instance, when you run OffLAM for the first time, the logs and results are stored in the folder Results/10 traces/OffLAM/EXP/run0. For each considered domain (e.g. blocksworld), a subdirectory is created (e.g. Results/10 traces/OffLAM/EXP/run0/blocksworld), which consists of a log file and learned action model for each degree of observability in [0.1, 1].

OffLAM traces

For every domain and observability degree considered in the paper, the set of traces generated for evaluating OffLAM can be downloaded from this link. To reproduce the paper results, download the OffLAM traces, unzip them into the directory Analysis, and run OffLAM.

Custom domain learning

For running OffLAM on a custom domain (e.g. "testworld"), you need to provide an input domain file Analysis/Benchmarks/testworld.pddl and a set of input plan traces with one file for each plan trace in the directory Analysis/Input traces/testworld/$EXP where the value of EXP can be set in Configuration.py (default value corresponds to plan traces with partially observable states). The input planning domain must contain at least the predicates, object types, and operator signatures, an example of (empty) input planning domain is Analysis/Benchmarks/testworld.pddl. Examples of input plan traces with partial states can be found in the directory Analysis/Input traces/testworld/partial_states, notice that OffLAM can learn a planning domain from plan traces of different environments (e.g. it is possible to learn a planning domain from small environments and exploit the learned domain in large environments).

To run OffLAM on the custom domain "testworld" run the command python test.py -d testworld

Citations (paper to be published)

@article{lamanna2024lifted,
  title={Lifted Action Models Learning from Partial Traces},
  author={Lamanna, Leonardo and Serafini, Luciano and Saetti, Alessandro and Gerevini, Alfonso and Traverso, Paolo},
  journal={Artificial Intelligence},
  volume={},
  pages={},
  year={2024},
  publisher={Elsevier}
}

License

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

offlam's People

Contributors

lamannaleonardo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.