Skip to content
Plugin for SPADE 3 MAS platform to implement BDI Agents.
Python Makefile
Branch: master
Clone or download
Pull request Compare This branch is even with sfp932705:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Initial commit Mar 9, 2019
docs
examples Change to English the control example. Jun 17, 2019
spade_bdi
tests
.editorconfig
.gitignore Initial commit Mar 9, 2019
.travis.yml
AUTHORS.rst Refactor. Added some helpers like pause_bdi, resume_bdi. Now the asl … Jun 13, 2019
CONTRIBUTING.rst
HISTORY.rst preparing for release 0.1.4 Jul 10, 2019
LICENSE
MANIFEST.in Initial commit Mar 9, 2019
Makefile Initial commit Mar 9, 2019
README.rst fixed readme. Jul 8, 2019
requirements.txt
requirements_dev.txt Refactor. Added some helpers like pause_bdi, resume_bdi. Now the asl … Jun 13, 2019
setup.cfg
setup.py Bump version: 0.1.3 → 0.1.4 Jul 10, 2019
tox.ini

README.rst

Spade-BDI

Documentation Status Updates

Implement BDI Agents based on the SPADE MAS Platform

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.

You can’t perform that action at this time.