Metadata-Version: 2.1
Name: spade-bdi
Version: 0.2.0
Summary: Plugin for SPADE 3 MAS platform to implement BDI Agents.
Home-page: https://github.com/javipalanca/spade_bdi
Author: Sergio Frayle Pérez
Author-email: sfp932705@gmail.com
License: GNU General Public License v3
Keywords: spade_bdi
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Requires-Dist: spade (>=3.1.2)
Requires-Dist: agentspeak (==0.1.0)
Requires-Dist: loguru (==0.2.5)

=========
Spade-BDI
=========


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

.. image:: https://img.shields.io/travis/sfp932705/spade_bdi.svg
        :target: https://travis-ci.org/javipalanca/spade_bdi

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



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.


Features
--------

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

Examples
--------

basic.py::

    import argparse
    from spade_bdi.bdi import BDIAgent

    parser = argparse.ArgumentParser(description='spade bdi master-server example')
    parser.add_argument('--server', type=str, default="localhost", help='XMPP server address.')
    parser.add_argument('--password', type=str, default="bdipassword", help='XMPP password for the agents.')
    args = parser.parse_args()

    a = BDIAgent("BasicAgent@" + args.server, args.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.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.


