spade-bdi


Namespade-bdi JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/javipalanca/spade_bdi
SummaryPlugin for SPADE 3 MAS platform to implement BDI Agents.
upload_time2024-02-06 14:58:38
maintainer
docs_urlNone
authorSergio Frayle Pérez
requires_python
licenseMIT License v3
keywords spade_bdi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            =========
Spade-BDI
=========

.. image:: https://img.shields.io/pypi/v/spade_bdi.svg
        :target: https://pypi.python.org/pypi/spade

.. image:: https://img.shields.io/pypi/pyversions/spade_bdi.svg
    :target: https://pypi.python.org/pypi/spade_bdi

.. image:: https://img.shields.io/pypi/l/spade_bdi
    :target: https://opensource.org/licenses/MIT
    :alt: MIT License

.. image:: https://pepy.tech/badge/spade_bdi
    :target: https://pepy.tech/project/spade_bdi
    :alt: Downloads

.. image:: https://readthedocs.org/projects/spade_bdi/badge/?version=latest
        :target: https://spade-bdi.readthedocs.io?badge=latest
        :alt: Documentation Status

.. image:: https://img.shields.io/pypi/format/spade_bdi.svg
    :target: https://pypi.python.org/pypi/spade_bdi


Create hybrid agents with a BDI layer for the SPADE MAS Platform.


* Free software: GNU General Public License v3
* Documentation: https://spade-bdi.readthedocs.io. (to be completed)


Features
--------

* Create agents that parse and execute an ASL file written in AgentSpeak.
* Supports Agentspeak-like BDI behaviours.
* Add custom actions and functions.
* Send TELL, UNTELL and ACHIEVE  KQML performatives.

Examples
--------

basic.py::

    import getpass
    from spade_bdi.bdi import BDIAgent

    server = input("Please enter the XMPP server address: ")
    password = getpass.getpass("Please enter the password: ")

    a = BDIAgent("BasicAgent@" + server, password, "basic.asl")
    a.start()

    a.bdi.set_belief("car", "blue", "big")
    a.bdi.print_beliefs()

    print(a.bdi.get_belief("car"))
    a.bdi.print_beliefs()

    a.bdi.remove_belief("car", 'blue', "big")
    a.bdi.print_beliefs()

    print(a.bdi.get_beliefs())
    a.bdi.set_belief("car", 'yellow')


basic.asl::

    !start.

    +!start <-
        +car(red);
        .a_function(3,W);
        .print("w =", W);
        literal_function(red,Y);
        .print("Y =", Y);
        .custom_action(8);
        +truck(blue).

    +car(Color)
     <- .print("The car is ",Color).


Examples
--------

basic.py::

    import getpass
    from spade_bdi.bdi import BDIAgent

    server = input("Please enter the XMPP server address: ")
    password = getpass.getpass("Please enter the password: ")

    a = BDIAgent("BasicAgent@" + server, password, "basic.asl")
    a.start()

    a.bdi.set_belief("car", "blue", "big")
    a.bdi.print_beliefs()

    print(a.bdi.get_belief("car"))
    a.bdi.print_beliefs()

    a.bdi.remove_belief("car", 'blue', "big")
    a.bdi.print_beliefs()

    print(a.bdi.get_beliefs())
    a.bdi.set_belief("car", 'yellow')


basic.asl::

    !start.

    +!start <-
        +car(red);
        .a_function(3,W);
        .print("w =", W);
        literal_function(red,Y);
        .print("Y =", Y);
        .custom_action(8);
        +truck(blue).

    +car(Color)
     <- .print("The car is ",Color).


Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

0.3.1 (2024-01-06)
------------------

* Added new examples
* Added documentation
* Updated to SPADE 3.3.2

0.3.0 (2023-06-13)
------------------

* Updated to SPADE 3.3.0.

0.2.2 (2022-06-03)
------------------

* Added exception when belief is not initialized.
* Improved examples.
* Improved documentation.

0.2.1 (2020-04-13)
------------------

* Fixed a bug when updating beliefs.
* Upgraded spade version to 3.1.4.

0.2.0 (2020-02-24)
------------------

* Created add_custom_actions method.
* Added example for actions.
* Improved documentation.
* Added some helpers like pause_bdi, resume_bdi.
* Now the asl file in the constructor is mandatory.

0.1.4 (2019-07-10)
------------------

* Allow to send messages to JIDs stored as beliefs.

0.1.3 (2019-07-08)
------------------

* Allow .send to a list of receivers.
* Allow to receive messages with lists of lists.
* Fixed readme.

0.1.1 (2019-06-18)
------------------

* Moved from pyson to python-agentspeak
* Added some helpers like pause_bdi, resume_bdi.
* Now the asl file in the constructor is mandatory.
* Allow to send tell messages with no args.
* Allow sending messages with variables.
* Extended the examples.

0.1.0 (2019-03-09)
------------------

* First release on PyPI.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/javipalanca/spade_bdi",
    "name": "spade-bdi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "spade_bdi",
    "author": "Sergio Frayle P\u00e9rez",
    "author_email": "sfp932705@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/70/31/9d8f493f0f30e4ebff0f4474e8b4c3792e1526bd74b83da063d297d65baf/spade_bdi-0.3.1.tar.gz",
    "platform": null,
    "description": "=========\nSpade-BDI\n=========\n\n.. image:: https://img.shields.io/pypi/v/spade_bdi.svg\n        :target: https://pypi.python.org/pypi/spade\n\n.. image:: https://img.shields.io/pypi/pyversions/spade_bdi.svg\n    :target: https://pypi.python.org/pypi/spade_bdi\n\n.. image:: https://img.shields.io/pypi/l/spade_bdi\n    :target: https://opensource.org/licenses/MIT\n    :alt: MIT License\n\n.. image:: https://pepy.tech/badge/spade_bdi\n    :target: https://pepy.tech/project/spade_bdi\n    :alt: Downloads\n\n.. image:: https://readthedocs.org/projects/spade_bdi/badge/?version=latest\n        :target: https://spade-bdi.readthedocs.io?badge=latest\n        :alt: Documentation Status\n\n.. image:: https://img.shields.io/pypi/format/spade_bdi.svg\n    :target: https://pypi.python.org/pypi/spade_bdi\n\n\nCreate hybrid agents with a BDI layer for the SPADE MAS Platform.\n\n\n* Free software: GNU General Public License v3\n* Documentation: https://spade-bdi.readthedocs.io. (to be completed)\n\n\nFeatures\n--------\n\n* Create agents that parse and execute an ASL file written in AgentSpeak.\n* Supports Agentspeak-like BDI behaviours.\n* Add custom actions and functions.\n* Send TELL, UNTELL and ACHIEVE  KQML performatives.\n\nExamples\n--------\n\nbasic.py::\n\n    import getpass\n    from spade_bdi.bdi import BDIAgent\n\n    server = input(\"Please enter the XMPP server address: \")\n    password = getpass.getpass(\"Please enter the password: \")\n\n    a = BDIAgent(\"BasicAgent@\" + server, password, \"basic.asl\")\n    a.start()\n\n    a.bdi.set_belief(\"car\", \"blue\", \"big\")\n    a.bdi.print_beliefs()\n\n    print(a.bdi.get_belief(\"car\"))\n    a.bdi.print_beliefs()\n\n    a.bdi.remove_belief(\"car\", 'blue', \"big\")\n    a.bdi.print_beliefs()\n\n    print(a.bdi.get_beliefs())\n    a.bdi.set_belief(\"car\", 'yellow')\n\n\nbasic.asl::\n\n    !start.\n\n    +!start <-\n        +car(red);\n        .a_function(3,W);\n        .print(\"w =\", W);\n        literal_function(red,Y);\n        .print(\"Y =\", Y);\n        .custom_action(8);\n        +truck(blue).\n\n    +car(Color)\n     <- .print(\"The car is \",Color).\n\n\nExamples\n--------\n\nbasic.py::\n\n    import getpass\n    from spade_bdi.bdi import BDIAgent\n\n    server = input(\"Please enter the XMPP server address: \")\n    password = getpass.getpass(\"Please enter the password: \")\n\n    a = BDIAgent(\"BasicAgent@\" + server, password, \"basic.asl\")\n    a.start()\n\n    a.bdi.set_belief(\"car\", \"blue\", \"big\")\n    a.bdi.print_beliefs()\n\n    print(a.bdi.get_belief(\"car\"))\n    a.bdi.print_beliefs()\n\n    a.bdi.remove_belief(\"car\", 'blue', \"big\")\n    a.bdi.print_beliefs()\n\n    print(a.bdi.get_beliefs())\n    a.bdi.set_belief(\"car\", 'yellow')\n\n\nbasic.asl::\n\n    !start.\n\n    +!start <-\n        +car(red);\n        .a_function(3,W);\n        .print(\"w =\", W);\n        literal_function(red,Y);\n        .print(\"Y =\", Y);\n        .custom_action(8);\n        +truck(blue).\n\n    +car(Color)\n     <- .print(\"The car is \",Color).\n\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.3.1 (2024-01-06)\n------------------\n\n* Added new examples\n* Added documentation\n* Updated to SPADE 3.3.2\n\n0.3.0 (2023-06-13)\n------------------\n\n* Updated to SPADE 3.3.0.\n\n0.2.2 (2022-06-03)\n------------------\n\n* Added exception when belief is not initialized.\n* Improved examples.\n* Improved documentation.\n\n0.2.1 (2020-04-13)\n------------------\n\n* Fixed a bug when updating beliefs.\n* Upgraded spade version to 3.1.4.\n\n0.2.0 (2020-02-24)\n------------------\n\n* Created add_custom_actions method.\n* Added example for actions.\n* Improved documentation.\n* Added some helpers like pause_bdi, resume_bdi.\n* Now the asl file in the constructor is mandatory.\n\n0.1.4 (2019-07-10)\n------------------\n\n* Allow to send messages to JIDs stored as beliefs.\n\n0.1.3 (2019-07-08)\n------------------\n\n* Allow .send to a list of receivers.\n* Allow to receive messages with lists of lists.\n* Fixed readme.\n\n0.1.1 (2019-06-18)\n------------------\n\n* Moved from pyson to python-agentspeak\n* Added some helpers like pause_bdi, resume_bdi.\n* Now the asl file in the constructor is mandatory.\n* Allow to send tell messages with no args.\n* Allow sending messages with variables.\n* Extended the examples.\n\n0.1.0 (2019-03-09)\n------------------\n\n* First release on PyPI.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT License v3",
    "summary": "Plugin for SPADE 3 MAS platform to implement BDI Agents.",
    "version": "0.3.1",
    "project_urls": {
        "Homepage": "https://github.com/javipalanca/spade_bdi"
    },
    "split_keywords": [
        "spade_bdi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26e0e1dff687af61ece1bfddc700df889ab0f05ddb81aaf343a52ec06c6eea53",
                "md5": "cc922c6a5b3c760596387be609406bbe",
                "sha256": "4fe2dee36d452aa5a763fa5daa8f057a2e0d9ac27c335fb2845b3d0f0082caf4"
            },
            "downloads": -1,
            "filename": "spade_bdi-0.3.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cc922c6a5b3c760596387be609406bbe",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 7596,
            "upload_time": "2024-02-06T14:53:50",
            "upload_time_iso_8601": "2024-02-06T14:53:50.342471Z",
            "url": "https://files.pythonhosted.org/packages/26/e0/e1dff687af61ece1bfddc700df889ab0f05ddb81aaf343a52ec06c6eea53/spade_bdi-0.3.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "70319d8f493f0f30e4ebff0f4474e8b4c3792e1526bd74b83da063d297d65baf",
                "md5": "30a78994fea14afb63d2dbc1d74aee7a",
                "sha256": "293c4a12dfd7968a72556a17e9367458b2481fc94022bdc02ec7a5539b34e9c6"
            },
            "downloads": -1,
            "filename": "spade_bdi-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "30a78994fea14afb63d2dbc1d74aee7a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21179,
            "upload_time": "2024-02-06T14:58:38",
            "upload_time_iso_8601": "2024-02-06T14:58:38.619069Z",
            "url": "https://files.pythonhosted.org/packages/70/31/9d8f493f0f30e4ebff0f4474e8b4c3792e1526bd74b83da063d297d65baf/spade_bdi-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-06 14:58:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "javipalanca",
    "github_project": "spade_bdi",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "spade-bdi"
}
        
Elapsed time: 0.40367s