Skip to main content
https://img.shields.io/pypi/v/spade_bdi.svg https://img.shields.io/pypi/pyversions/spade_bdi.svg MIT License Downloads Documentation Status https://img.shields.io/pypi/format/spade_bdi.svg https://coveralls.io/repos/github/javipalanca/spade_bdi/badge.svg

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

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

spade_bdi-0.3.3.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spade_bdi-0.3.3-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

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

Hashes for spade_bdi-0.3.3.tar.gz
Algorithm Hash digest
SHA256 e87cd63658cec64f6812a10d19050c93b3dc1e9f47b3f5d0d56995f062e63ee6
MD5 1aa11e0a681f052909d069da5e6a086a
BLAKE2b-256 8272f9606b55579fcdbd1e6ff3cf07b67879a101ee531fe452eacfdee9ba6af1

See more details on using hashes here.

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

Hashes for spade_bdi-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f82940edd3dd093cfd0e08fae3fafd5510af7c9673a66394ee8fb7e6b4035a04
MD5 8d3418b07d0d6b41dc13130dad38ecf3
BLAKE2b-256 715c5adbc56284ce4ec51f261fffc3f357afc5d9c80165fd3a9273269b23a911

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page