gtpyhop


Namegtpyhop JSON
Version 1.2.0 PyPI version JSON
download
home_pageNone
SummaryA Goal-Task-Network planning package written in Python
upload_time2025-07-12 05:04:08
maintainerNone
docs_urlNone
authorNone
requires_python>=3
licenseClear BSD License
keywords artificial intelligence automated planning htn planning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GTPyhop

GTPyhop is a task-planning system based on [Pyhop](https://bitbucket.org/dananau/pyhop/src/master/), but generalized to plan for both goals and tasks.

[Dana Nau](https://www.cs.umd.edu/~nau/) is the original developper of GTPyhop.

## The pip Branch

[This pip branch](https://github.com/PCfVW/GTPyhop/tree/pip) is forked from [Dana Nau's GTPyhop main branch](https://github.com/dananau/GTPyhop) and refactored for PyPI distribution.

The file tree structure of [this pip branch](https://github.com/PCfVW/GTPyhop/tree/pip), produced with the help of [_GithubTree](https://github.com/mgks/GitHubTree), is the following:

```
πŸ“„ LICENSE.txt
πŸ“„ pyproject.toml
πŸ“„ README.md
πŸ“ src/
    └── πŸ“ gtpyhop/
        β”œβ”€β”€ πŸ“„ __init__.py
        β”œβ”€β”€ πŸ“ examples/
            β”œβ”€β”€ πŸ“„ __init__.py
            β”œβ”€β”€ πŸ“backtracking_htn.py
            β”œβ”€β”€ πŸ“blocks_goal_splitting/
                β”œβ”€β”€ πŸ“„ __init__.py
                β”œβ”€β”€ πŸ“„ actions.py
                β”œβ”€β”€ πŸ“„ examples.py
                β”œβ”€β”€ πŸ“„ methods.py
                └── πŸ“„ README.txt
            β”œβ”€β”€ πŸ“ blocks_gtn/
                β”œβ”€β”€ πŸ“„ __init__.py
                β”œβ”€β”€ πŸ“„ actions.py
                β”œβ”€β”€ πŸ“„ examples.py
                β”œβ”€β”€ πŸ“„ methods.py
                └── πŸ“„ README.txt
            β”œβ”€β”€ πŸ“ blocks_hgn/
                β”œβ”€β”€ πŸ“„ __init__.py
                β”œβ”€β”€ πŸ“„ actions.py
                β”œβ”€β”€ πŸ“„ examples.py
                └── πŸ“„ methods.py
            β”œβ”€β”€ πŸ“ blocks_htn/
                β”œβ”€β”€ πŸ“„ __init__.py
                β”œβ”€β”€ πŸ“„ actions.py
                β”œβ”€β”€ πŸ“„ examples.py
                └── πŸ“„ methods.py
            β”œβ”€β”€ πŸ“„ logistics_hgn.py
            β”œβ”€β”€ πŸ“„ pyhop_simple_travel_example.py
            β”œβ”€β”€ πŸ“„ regression_tests.py
            β”œβ”€β”€ πŸ“„ simple_hgn.py
            β”œβ”€β”€ πŸ“„ simple_htn_acting_error.py
            └── πŸ“„ simple_htn.py
        β”œβ”€β”€ πŸ“„ main.py
        └── πŸ“ test_harness/
            β”œβ”€β”€ πŸ“„ __init__.py
            └── πŸ“„ test_harness.py
```

## Installation from PyPI (soon available)

Open a terminal and type the following:

```bash
pip install gtpyhop
```

[uv](https://docs.astral.sh/uv/) can of course be used if you prefer:

```bash
uv pip install gtpyhop
```

## Installation from github

Alternatively, you can directly install from github:

```bash
git clone -b pip https://github.com/PCfVW/GTPyhop.git
cd GTPyhop
pip install .
```

## Testing your installation

We suggest you give gtpyhop a try straight away; start an interactive python session:
```bash
python
```

.. and import gtpyhop to run the regression tests:

```python
# Import the main GTPyhop planning system
import gtpyhop
```

The following should be printed in your terminal:

```code
Imported GTPyhop version 1.2.0
Messages from find_plan will be prefaced with 'FP>'.
Messages from run_lazy_lookahead will be prefaced with 'RLL>'.
Using iterative seek_plan.
```

Now import the regression tests module:

```python
from gtpyhop.examples import regression_tests
```

Be prepared to see a lot of information on the screen about the examples and how to solve them, with different levels of verbosity; with this in mind, run the regression tests:

```python
regression_tests.main()
```

The last lines printed in your terminal should be:

```code
-----------------------------------------------------------------------
Created the domain 'gtpyhop.examples.simple_htn_acting_error'. To run the examples, type this:
gtpyhop.examples.simple_htn_acting_error.main()

Finished without error.
```

Happy Planning!

## Usage

You have successfully installed and tested gtpyhop; it's time to declare your own planning problems in gtpyhop.

Please read [Dana's additional information](https://github.com/dananau/GTPyhop/blob/main/additional_information.md) of how to implement:
- [States](https://github.com/dananau/GTPyhop/blob/main/additional_information.md#states)
- [Actions](https://github.com/dananau/GTPyhop/blob/main/additional_information.md#actions)
- [Tasks and task methods](https://github.com/dananau/GTPyhop/blob/main/additional_information.md#3-tasks-and-task-methods)
- [Goals and goal methods](https://github.com/dananau/GTPyhop/blob/main/additional_information.md#4-goals-and-goal-methods)
- ...and much more about GTPyhop!

## New Features

### Iterative Planning Strategy

[This pip branch](https://github.com/PCfVW/GTPyhop/tree/pip) introduces a new iterative planning strategy that enhances the planner's capabilities for large planning scenarios; it is the default strategy.

Once gtpyhop is imported, Dana Nau's original recursive strategy can be set calling:

```python
set_recursive_strategy(True)  # Planning strategy now is recursive
```

### New Functions

The following functions have been added to Dana's original code:

- `print_domain_names`
- `find_domain_by_name`, `is_domain_created`
- `set_current_domain`, `get_current_domain`
- `set_recursive_planning`, `get_recursive_planning`, `reset_planning_strategy`
- `set_verbose_level`, `get_verbose_level`
- `seek_plan_iterative`,
  - `refine_multigoal_and_continue_iterative`
  - `refine_unigoal_and_continue_iterative`
  - `refine_task_and_continue_iterative`
  - `apply_action_and_continue_iterative`

### Renaming

`_recursive` has been added at the end of the identifiers of the original functions involved in seeking for a plan: 

- seek_plan → `seek_plan_recursive`
- _apply_action_and_continue → `apply_action_and_continue_recursive`
- _refine_multigoal_and_continue → `refine_multigoal_and_continue_recursive`
- _refine_unigoal_and_continue → `refine_unigoal_and_continue_recursive`
- _refine_task_and_continue → `refine_task_and_continue_recursive`


## Version History

> **1.2.0** -- Uploaded to PyPI: https://pypi.org/project/gtpyhop/

> 1.2.0rc1 -- Uploaded to Test PyPI: https://test.pypi.org/project/gtpyhop/1.2.0rc1/

> 1.2.0b2 -- This tested refactored version will soon be ready to be indexed on TestPyPI as 1.2.0rc1

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gtpyhop",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": null,
    "keywords": "Artificial Intelligence, Automated Planning, HTN, Planning",
    "author": null,
    "author_email": "Eric Jacopin <eric.jacopin@protonmail.com>, Dana Nau <nau@umd.edu>",
    "download_url": "https://files.pythonhosted.org/packages/c2/1b/0a8e86f2398f90216812a6d93e83b80663af9e8976db2e2b774a3fd62013/gtpyhop-1.2.0.tar.gz",
    "platform": null,
    "description": "# GTPyhop\n\nGTPyhop is a task-planning system based on [Pyhop](https://bitbucket.org/dananau/pyhop/src/master/), but generalized to plan for both goals and tasks.\n\n[Dana Nau](https://www.cs.umd.edu/~nau/) is the original developper of GTPyhop.\n\n## The pip Branch\n\n[This pip branch](https://github.com/PCfVW/GTPyhop/tree/pip) is forked from [Dana Nau's GTPyhop main branch](https://github.com/dananau/GTPyhop) and refactored for PyPI distribution.\n\nThe file tree structure of [this pip branch](https://github.com/PCfVW/GTPyhop/tree/pip), produced with the help of [_GithubTree](https://github.com/mgks/GitHubTree), is the following:\n\n```\n\ud83d\udcc4 LICENSE.txt\n\ud83d\udcc4 pyproject.toml\n\ud83d\udcc4 README.md\n\ud83d\udcc1 src/\n    \u2514\u2500\u2500 \ud83d\udcc1 gtpyhop/\n        \u251c\u2500\u2500 \ud83d\udcc4 __init__.py\n        \u251c\u2500\u2500 \ud83d\udcc1 examples/\n            \u251c\u2500\u2500 \ud83d\udcc4 __init__.py\n            \u251c\u2500\u2500 \ud83d\udcc1backtracking_htn.py\n            \u251c\u2500\u2500 \ud83d\udcc1blocks_goal_splitting/\n                \u251c\u2500\u2500 \ud83d\udcc4 __init__.py\n                \u251c\u2500\u2500 \ud83d\udcc4 actions.py\n                \u251c\u2500\u2500 \ud83d\udcc4 examples.py\n                \u251c\u2500\u2500 \ud83d\udcc4 methods.py\n                \u2514\u2500\u2500 \ud83d\udcc4 README.txt\n            \u251c\u2500\u2500 \ud83d\udcc1 blocks_gtn/\n                \u251c\u2500\u2500 \ud83d\udcc4 __init__.py\n                \u251c\u2500\u2500 \ud83d\udcc4 actions.py\n                \u251c\u2500\u2500 \ud83d\udcc4 examples.py\n                \u251c\u2500\u2500 \ud83d\udcc4 methods.py\n                \u2514\u2500\u2500 \ud83d\udcc4 README.txt\n            \u251c\u2500\u2500 \ud83d\udcc1 blocks_hgn/\n                \u251c\u2500\u2500 \ud83d\udcc4 __init__.py\n                \u251c\u2500\u2500 \ud83d\udcc4 actions.py\n                \u251c\u2500\u2500 \ud83d\udcc4 examples.py\n                \u2514\u2500\u2500 \ud83d\udcc4 methods.py\n            \u251c\u2500\u2500 \ud83d\udcc1 blocks_htn/\n                \u251c\u2500\u2500 \ud83d\udcc4 __init__.py\n                \u251c\u2500\u2500 \ud83d\udcc4 actions.py\n                \u251c\u2500\u2500 \ud83d\udcc4 examples.py\n                \u2514\u2500\u2500 \ud83d\udcc4 methods.py\n            \u251c\u2500\u2500 \ud83d\udcc4 logistics_hgn.py\n            \u251c\u2500\u2500 \ud83d\udcc4 pyhop_simple_travel_example.py\n            \u251c\u2500\u2500 \ud83d\udcc4 regression_tests.py\n            \u251c\u2500\u2500 \ud83d\udcc4 simple_hgn.py\n            \u251c\u2500\u2500 \ud83d\udcc4 simple_htn_acting_error.py\n            \u2514\u2500\u2500 \ud83d\udcc4 simple_htn.py\n        \u251c\u2500\u2500 \ud83d\udcc4 main.py\n        \u2514\u2500\u2500 \ud83d\udcc1 test_harness/\n            \u251c\u2500\u2500 \ud83d\udcc4 __init__.py\n            \u2514\u2500\u2500 \ud83d\udcc4 test_harness.py\n```\n\n## Installation from PyPI (soon available)\n\nOpen a terminal and type the following:\n\n```bash\npip install gtpyhop\n```\n\n[uv](https://docs.astral.sh/uv/) can of course be used if you prefer:\n\n```bash\nuv pip install gtpyhop\n```\n\n## Installation from github\n\nAlternatively, you can directly install from github:\n\n```bash\ngit clone -b pip https://github.com/PCfVW/GTPyhop.git\ncd GTPyhop\npip install .\n```\n\n## Testing your installation\n\nWe suggest you give gtpyhop a try straight away; start an interactive python session:\n```bash\npython\n```\n\n.. and import gtpyhop to run the regression tests:\n\n```python\n# Import the main GTPyhop planning system\nimport gtpyhop\n```\n\nThe following should be printed in your terminal:\n\n```code\nImported GTPyhop version 1.2.0\nMessages from find_plan will be prefaced with 'FP>'.\nMessages from run_lazy_lookahead will be prefaced with 'RLL>'.\nUsing iterative seek_plan.\n```\n\nNow import the regression tests module:\n\n```python\nfrom gtpyhop.examples import regression_tests\n```\n\nBe prepared to see a lot of information on the screen about the examples and how to solve them, with different levels of verbosity; with this in mind, run the regression tests:\n\n```python\nregression_tests.main()\n```\n\nThe last lines printed in your terminal should be:\n\n```code\n-----------------------------------------------------------------------\nCreated the domain 'gtpyhop.examples.simple_htn_acting_error'. To run the examples, type this:\ngtpyhop.examples.simple_htn_acting_error.main()\n\nFinished without error.\n```\n\nHappy Planning!\n\n## Usage\n\nYou have successfully installed and tested gtpyhop; it's time to declare your own planning problems in gtpyhop.\n\nPlease read [Dana's additional information](https://github.com/dananau/GTPyhop/blob/main/additional_information.md) of how to implement:\n- [States](https://github.com/dananau/GTPyhop/blob/main/additional_information.md#states)\n- [Actions](https://github.com/dananau/GTPyhop/blob/main/additional_information.md#actions)\n- [Tasks and task methods](https://github.com/dananau/GTPyhop/blob/main/additional_information.md#3-tasks-and-task-methods)\n- [Goals and goal methods](https://github.com/dananau/GTPyhop/blob/main/additional_information.md#4-goals-and-goal-methods)\n- ...and much more about GTPyhop!\n\n## New Features\n\n### Iterative Planning Strategy\n\n[This pip branch](https://github.com/PCfVW/GTPyhop/tree/pip) introduces a new iterative planning strategy that enhances the planner's capabilities for large planning scenarios; it is the default strategy.\n\nOnce gtpyhop is imported, Dana Nau's original recursive strategy can be set calling:\n\n```python\nset_recursive_strategy(True)  # Planning strategy now is recursive\n```\n\n### New Functions\n\nThe following functions have been added to Dana's original code:\n\n- `print_domain_names`\n- `find_domain_by_name`, `is_domain_created`\n- `set_current_domain`, `get_current_domain`\n- `set_recursive_planning`, `get_recursive_planning`, `reset_planning_strategy`\n- `set_verbose_level`, `get_verbose_level`\n- `seek_plan_iterative`,\n  - `refine_multigoal_and_continue_iterative`\n  - `refine_unigoal_and_continue_iterative`\n  - `refine_task_and_continue_iterative`\n  - `apply_action_and_continue_iterative`\n\n### Renaming\n\n`_recursive` has been added at the end of the identifiers of the original functions involved in seeking for a plan: \n\n- seek_plan &rarr; `seek_plan_recursive`\n- _apply_action_and_continue &rarr; `apply_action_and_continue_recursive`\n- _refine_multigoal_and_continue &rarr; `refine_multigoal_and_continue_recursive`\n- _refine_unigoal_and_continue &rarr; `refine_unigoal_and_continue_recursive`\n- _refine_task_and_continue &rarr; `refine_task_and_continue_recursive`\n\n\n## Version History\n\n> **1.2.0** -- Uploaded to PyPI: https://pypi.org/project/gtpyhop/\n\n> 1.2.0rc1 -- Uploaded to Test PyPI: https://test.pypi.org/project/gtpyhop/1.2.0rc1/\n\n> 1.2.0b2 -- This tested refactored version will soon be ready to be indexed on TestPyPI as 1.2.0rc1\n",
    "bugtrack_url": null,
    "license": "Clear BSD License",
    "summary": "A Goal-Task-Network planning package written in Python",
    "version": "1.2.0",
    "project_urls": {
        "Documentation": "https://github.com/dananau/GTPyhop/blob/main/additional_information.md",
        "Homepage": "https://github.com/PCfVW/GTPyhop/tree/pip",
        "Issues": "https://github.com/PCfVW/GTPyhop/issues",
        "Repository": "https://github.com/PCfVW/GTPyhop.git"
    },
    "split_keywords": [
        "artificial intelligence",
        " automated planning",
        " htn",
        " planning"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b1109496381db24ca7417d14cc349aad708ef2a3b0e5aa504b783a60f5906c63",
                "md5": "04e5dfa60c79fa4684332ffb8fbb4c42",
                "sha256": "2f90d1438e90ab22cbda4e2d772ca65f49a186a52c6da0c48e1822ca88cca872"
            },
            "downloads": -1,
            "filename": "gtpyhop-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "04e5dfa60c79fa4684332ffb8fbb4c42",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 63397,
            "upload_time": "2025-07-12T05:04:07",
            "upload_time_iso_8601": "2025-07-12T05:04:07.292888Z",
            "url": "https://files.pythonhosted.org/packages/b1/10/9496381db24ca7417d14cc349aad708ef2a3b0e5aa504b783a60f5906c63/gtpyhop-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c21b0a8e86f2398f90216812a6d93e83b80663af9e8976db2e2b774a3fd62013",
                "md5": "57b03ff0cc67efd9026b173b372aef24",
                "sha256": "f12c9dea9d55682cbaac8d7658fa2247e0af416cf227309bd1fab2ab0c2b4775"
            },
            "downloads": -1,
            "filename": "gtpyhop-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "57b03ff0cc67efd9026b173b372aef24",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 36588,
            "upload_time": "2025-07-12T05:04:08",
            "upload_time_iso_8601": "2025-07-12T05:04:08.696269Z",
            "url": "https://files.pythonhosted.org/packages/c2/1b/0a8e86f2398f90216812a6d93e83b80663af9e8976db2e2b774a3fd62013/gtpyhop-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-12 05:04:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dananau",
    "github_project": "GTPyhop",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "gtpyhop"
}
        
Elapsed time: 0.72526s