Spade-BDI
Implement BDI Agents based on the SPADE MAS Platform
Free software: GNU General Public License v3
Documentation: https://spade-bdi.readthedocs.io. (to be done)
Features
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.
History
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spade_bdi-0.1.4.tar.gz.
File metadata
- Download URL: spade_bdi-0.1.4.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91ecfcf4484f39498d440f8a73e8893c7e63e4906039a70ee7faf9e37d0bb217
|
|
| MD5 |
67b7d62864de714563738dfc151d6a92
|
|
| BLAKE2b-256 |
d505027b6a5689e610f6d386c373db4b9c2ed10ebae70b06da2ee02af6173b59
|
File details
Details for the file spade_bdi-0.1.4-py2.py3-none-any.whl.
File metadata
- Download URL: spade_bdi-0.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a755d6b13b01657c6146cae56c150b7d247ffea94621c638ad826dd5b4d0bb2e
|
|
| MD5 |
ab96daac75822d94bbf3ab3d5656ade6
|
|
| BLAKE2b-256 |
230f27f848fd92e603e4db0bc12e631d08bc00f6bcfdc1b0dd8e2d152656cce7
|