macq


Namemacq JSON
Version 0.3.9 PyPI version JSON
download
home_pagehttps://github.com/ai-planning/macq
SummaryAction model acquisition from state trace data.
upload_time2024-03-04 04:05:08
maintainer
docs_urlNone
authorEthan Callanan, Rebecca De Venezia, Victoria Armstrong, Alison Parades, Tathagata Chakraborti, Christian Muise
requires_python>=3.9
licenseMIT
keywords planning model acquisition trace
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # MAcq: The Model Acquisition Toolkit

[![CI](https://github.com/ai-planning/macq/actions/workflows/check.yml/badge.svg)](https://github.com/ai-planning/macq/actions)
[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/haz/03ac305b42d7c9ad4ef3213341bf3f2f/raw/macq__heads_main.json?cacheSeconds=3600)](https://github.com/ai-planning/macq/actions)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![License](https://img.shields.io/badge/license-MIT-purple)](https://github.com/ai-planning/macq/blob/main/LICENSE)

This library is a collection of tools for planning-like action model acquisition from state trace data. It contains a reimplementation from many existing works, and generalizes some of them to new settings.

## Usage

```python
from macq import generate, extract
from macq.observation import IdentityObservation, AtomicPartialObservation

# get a domain-specific generator: uses api.planning.domains problem_id/
# generate 100 traces of length 20 using vanilla sampling
traces = generate.pddl.VanillaSampling(problem_id = 123, plan_len = 20, num_traces = 100).traces

traces.generate_more(10)

action = traces[0][0].action
traces.get_usage(action)
[0.05, 0.05, ..., 0.05]

trace = traces[0]
len(trace)
20

trace.fluents
trace.actions
trace.get_pre_states(action) # get the state before each occurance of action
trace.get_post_states(action) # state after each occurance of action
trace.get_total_cost()
```

## Survey

You can find the full scope of papers considered in the survey (implemented and otherwise) at http://macq.planning.domains . This repository of model acquisition techniques will be added to over time.

## Survey Papers

- [A Review of Machine Learning for Automated Planning](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.231.4901&rep=rep1&type=pdf) (see Fig 2)
- [A Review of Learning Planning Action Models](https://hal.archives-ouvertes.fr/hal-02010536/document) (see Tbl 3)

## Citing this work

```latex
@inproceedings{macq-keps-2022,
  author    = {Ethan Callanan and Rebecca De Venezia and Victoria Armstrong and Alison Paredes and Tathagata Chakraborti and Christian Muise},
  title     = {MACQ: A Holistic View of Model Acquisition Techniques},
  booktitle = {The ICAPS Workshop on Knowledge Engineering for Planning and Scheduling (KEPS)},
  year      = {2022}
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ai-planning/macq",
    "name": "macq",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "planning model acquisition trace",
    "author": "Ethan Callanan, Rebecca De Venezia, Victoria Armstrong, Alison Parades, Tathagata Chakraborti, Christian Muise",
    "author_email": "christian.muise@queensu.ca",
    "download_url": "https://files.pythonhosted.org/packages/be/67/ecaa6538ea292737ea510e560dc617c3a839c4379e938e33361f52a815cd/macq-0.3.9.tar.gz",
    "platform": null,
    "description": "# MAcq: The Model Acquisition Toolkit\n\n[![CI](https://github.com/ai-planning/macq/actions/workflows/check.yml/badge.svg)](https://github.com/ai-planning/macq/actions)\n[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/haz/03ac305b42d7c9ad4ef3213341bf3f2f/raw/macq__heads_main.json?cacheSeconds=3600)](https://github.com/ai-planning/macq/actions)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![License](https://img.shields.io/badge/license-MIT-purple)](https://github.com/ai-planning/macq/blob/main/LICENSE)\n\nThis library is a collection of tools for planning-like action model acquisition from state trace data. It contains a reimplementation from many existing works, and generalizes some of them to new settings.\n\n## Usage\n\n```python\nfrom macq import generate, extract\nfrom macq.observation import IdentityObservation, AtomicPartialObservation\n\n# get a domain-specific generator: uses api.planning.domains problem_id/\n# generate 100 traces of length 20 using vanilla sampling\ntraces = generate.pddl.VanillaSampling(problem_id = 123, plan_len = 20, num_traces = 100).traces\n\ntraces.generate_more(10)\n\naction = traces[0][0].action\ntraces.get_usage(action)\n[0.05, 0.05, ..., 0.05]\n\ntrace = traces[0]\nlen(trace)\n20\n\ntrace.fluents\ntrace.actions\ntrace.get_pre_states(action) # get the state before each occurance of action\ntrace.get_post_states(action) # state after each occurance of action\ntrace.get_total_cost()\n```\n\n## Survey\n\nYou can find the full scope of papers considered in the survey (implemented and otherwise) at http://macq.planning.domains . This repository of model acquisition techniques will be added to over time.\n\n## Survey Papers\n\n- [A Review of Machine Learning for Automated Planning](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.231.4901&rep=rep1&type=pdf) (see Fig 2)\n- [A Review of Learning Planning Action Models](https://hal.archives-ouvertes.fr/hal-02010536/document) (see Tbl 3)\n\n## Citing this work\n\n```latex\n@inproceedings{macq-keps-2022,\n  author    = {Ethan Callanan and Rebecca De Venezia and Victoria Armstrong and Alison Paredes and Tathagata Chakraborti and Christian Muise},\n  title     = {MACQ: A Holistic View of Model Acquisition Techniques},\n  booktitle = {The ICAPS Workshop on Knowledge Engineering for Planning and Scheduling (KEPS)},\n  year      = {2022}\n}\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Action model acquisition from state trace data.",
    "version": "0.3.9",
    "project_urls": {
        "Homepage": "https://github.com/ai-planning/macq"
    },
    "split_keywords": [
        "planning",
        "model",
        "acquisition",
        "trace"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31f9739852a2ddff926152ac56c39f0d802362f94cf44d45ce7b5fefe79901a3",
                "md5": "e23303867e0865271bfca1c00327ca3f",
                "sha256": "6fccc7f8a25a45cff6ad22a65a4f290e66014eee4bb57fa6917c68a6c10d1bc5"
            },
            "downloads": -1,
            "filename": "macq-0.3.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e23303867e0865271bfca1c00327ca3f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 88395,
            "upload_time": "2024-03-04T04:05:06",
            "upload_time_iso_8601": "2024-03-04T04:05:06.177330Z",
            "url": "https://files.pythonhosted.org/packages/31/f9/739852a2ddff926152ac56c39f0d802362f94cf44d45ce7b5fefe79901a3/macq-0.3.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "be67ecaa6538ea292737ea510e560dc617c3a839c4379e938e33361f52a815cd",
                "md5": "1d5e632124585260615482e3e18718e8",
                "sha256": "7ef25bbe31139607b1ff875124fa8ccd3165f088032de7def10d095e33994675"
            },
            "downloads": -1,
            "filename": "macq-0.3.9.tar.gz",
            "has_sig": false,
            "md5_digest": "1d5e632124585260615482e3e18718e8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 71783,
            "upload_time": "2024-03-04T04:05:08",
            "upload_time_iso_8601": "2024-03-04T04:05:08.055805Z",
            "url": "https://files.pythonhosted.org/packages/be/67/ecaa6538ea292737ea510e560dc617c3a839c4379e938e33361f52a815cd/macq-0.3.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-04 04:05:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ai-planning",
    "github_project": "macq",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "macq"
}
        
Elapsed time: 0.19570s