Create hybrid agents with a BDI layer for the SPADE MAS Platform.
Free software: MIT License
Documentation: https://spade-bdi.readthedocs.io.
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.
Metadata
Release files for spade_bdi 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spade_bdi-0.3.3.tar.gz | 23.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spade_bdi-0.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.6 kB
Release files / spade_bdi-0.3.3.tar.gz
| Download URL | spade_bdi-0.3.3.tar.gz |
|---|---|
| Size | 23.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e87cd63658cec64f6812a10d19050c93b3dc1e9f47b3f5d0d56995f062e63ee6
|
|
BLAKE2b-256 checksum How to use checksums |
8272f9606b55579fcdbd1e6ff3cf07b67879a101ee531fe452eacfdee9ba6af1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / spade_bdi-0.3.3-py3-none-any.whl
| Download URL | spade_bdi-0.3.3-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f82940edd3dd093cfd0e08fae3fafd5510af7c9673a66394ee8fb7e6b4035a04
|
|
BLAKE2b-256 checksum How to use checksums |
715c5adbc56284ce4ec51f261fffc3f357afc5d9c80165fd3a9273269b23a911
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|