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.
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.3.3.tar.gz.
File metadata
- Download URL: spade_bdi-0.3.3.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e87cd63658cec64f6812a10d19050c93b3dc1e9f47b3f5d0d56995f062e63ee6
|
|
| MD5 |
1aa11e0a681f052909d069da5e6a086a
|
|
| BLAKE2b-256 |
8272f9606b55579fcdbd1e6ff3cf07b67879a101ee531fe452eacfdee9ba6af1
|
File details
Details for the file spade_bdi-0.3.3-py3-none-any.whl.
File metadata
- Download URL: spade_bdi-0.3.3-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f82940edd3dd093cfd0e08fae3fafd5510af7c9673a66394ee8fb7e6b4035a04
|
|
| MD5 |
8d3418b07d0d6b41dc13130dad38ecf3
|
|
| BLAKE2b-256 |
715c5adbc56284ce4ec51f261fffc3f357afc5d9c80165fd3a9273269b23a911
|