[spade2] r2250 committed - - Updated documentation with corrections about the SPADE 2.1 release. ...

12 views
Skip to first unread message

spa...@googlecode.com

unread,
Nov 12, 2012, 1:54:35 PM11/12/12
to spade-...@googlegroups.com
Revision: 2250
Author: jpalanca
Date: Mon Nov 12 09:28:31 2012
Log: - Updated documentation with corrections about the SPADE 2.1
release.
- Rewritten the BDI chapter of the documentation, now with the current
implementation of the bdi module.
- Updated SPADE requirements. Now SPADE needs Python 2.7 or above (sorry
old machines).

http://code.google.com/p/spade2/source/detail?r=2250

Modified:
/trunk/doc/manual/book.xml
/trunk/doc/manual/ch00-introduction-to-spade.xml
/trunk/doc/manual/ch01-quickstart-guide.xml
/trunk/doc/manual/ch02-fundamental-concepts.xml
/trunk/doc/manual/ch03-basic-agents.xml
/trunk/doc/manual/ch06-bdi.xml
/trunk/doc/manual/html/ch05s03.html
/trunk/doc/manual/html/index.html
/trunk/doc/manual/html/spade.advanced.eventbehaviour.html
/trunk/doc/manual/html/spade.advanced.fsm.html
/trunk/doc/manual/html/spade.advanced.html
/trunk/doc/manual/html/spade.basic.html
/trunk/doc/manual/html/spade.basic.im.html
/trunk/doc/manual/html/spade.basic.mas.html
/trunk/doc/manual/html/spade.basic.spadelibrary.html
/trunk/doc/manual/html/spade.basic.spadeplatform.html
/trunk/doc/manual/html/spade.basic.whatsnext.html
/trunk/doc/manual/html/spade.basicagents.agentmodel.communication.html
/trunk/doc/manual/html/spade.basicagents.agentmodel.html
/trunk/doc/manual/html/spade.basicagents.behav.html
/trunk/doc/manual/html/spade.basicagents.first.html
/trunk/doc/manual/html/spade.basicagents.html
/trunk/doc/manual/html/spade.basicagents.library.html
/trunk/doc/manual/html/spade.basicagents.whatsnext.html
/trunk/doc/manual/html/spade.bdi.future.html
/trunk/doc/manual/html/spade.bdi.goals.html
/trunk/doc/manual/html/spade.bdi.html
/trunk/doc/manual/html/spade.bdi.intro.html
/trunk/doc/manual/html/spade.bdi.kb.html
/trunk/doc/manual/html/spade.bdi.plans.html
/trunk/doc/manual/html/spade.bdi.running.html
/trunk/doc/manual/html/spade.foreword.html
/trunk/doc/manual/html/spade.fundamental.html
/trunk/doc/manual/html/spade.fundamental.platform.html
/trunk/doc/manual/html/spade.platform.ams.html
/trunk/doc/manual/html/spade.platform.df.html
/trunk/doc/manual/html/spade.platform.html
/trunk/doc/manual/html/spade.quickstart.html
/trunk/doc/manual/html/spade.quickstart.installation.html
/trunk/doc/manual/html/spade.quickstart.requirements.html
/trunk/setup.py
/trunk/test/bdiTestCase.py
/trunk/test/kbTestCase.py

=======================================
--- /trunk/doc/manual/book.xml Mon Nov 28 06:37:01 2011
+++ /trunk/doc/manual/book.xml Mon Nov 12 09:28:31 2012
@@ -25,7 +25,7 @@

<bookinfo>

- <subtitle>For SPADE 2.0</subtitle>
+ <subtitle>For SPADE 2.1</subtitle>

<!-- Using revnumber would be more appropriate, but our stylesheets -->
<!-- don't seem to render it. -->
@@ -57,11 +57,10 @@

<copyright>
<year>2005</year>
- <year>2010</year>
+ <year>2012</year>
<holder>Gustavo Aranda</holder>
<holder>Javier Palanca</holder>
<holder>Miguel Escriva</holder>
- <holder>Natalia Criado</holder>
<holder>Juan Angel Garcia-Pardo</holder>
</copyright>

=======================================
--- /trunk/doc/manual/ch00-introduction-to-spade.xml Wed Nov 21 07:30:36
2007
+++ /trunk/doc/manual/ch00-introduction-to-spade.xml Mon Nov 12 09:28:31
2012
@@ -5,229 +5,246 @@
If you're new to multi-agent systems, this chapter is definitely for
you. We begin with a discussion of general multi-agent systems
concepts, instant messaging and Jabber, and work our way into the
- specific ideas behind SPADE.</para>
+ specific ideas behind SPADE.</para>

<section id="spade.basic.mas">
- <title>Multi-Agent Systems</title>
-
- <para>A multi-agent system (MAS) is a system composed of several
- software agents, collectively capable of reaching goals that are
- difficult to achieve by an individual agent or monolithic system.</para>
-
- <para>The exact nature of the agents is a matter of some controversy.
- They are sometimes claimed to be autonomous. For example a household
- floor cleaning robot can be autonomous in that it is dependent on a
- human operator only to start it up. On the other hand, in practice,
- some agents are under active human supervision, becoming interdependent
- systems.</para>
+ <title>Multi-Agent Systems</title>
+
+ <para>A multi-agent system (MAS) is a system composed of several
+ software agents, collectively capable of reaching goals that are
+ difficult to achieve by an individual agent or monolithic
system.</para>
+
+ <para>The exact nature of the agents is a matter of some controversy.
+ They are sometimes claimed to be autonomous. For example a
household
+ floor cleaning robot can be autonomous in that it is dependent on a
+ human operator only to start it up. On the other hand, in practice,
+ some agents are under active human supervision, becoming
interdependent
+ systems.</para>

- <para>MAS systems are also referred to as "self-organized systems" as
they tend
- to find the best solution for their problems "without intervention".
There is
- high similarity here to physical phenomena, such as energy minimizing,
where
- physical objects tend to reach the lowest energy possible, within the
physical
- constrained world.</para>
-
- <para>The main feature which is achieved when developing MAS systems
- is flexibility, since a MAS system can be added to, modified and
reconstructed,
- without the need for detailed rewriting of the application. These
systems also
- tend to be rapidly self-recovering and failure proof, usually due to the
heavy
- redundancy of components and the self managed features, referred to,
above.</para>
-
- <section id="spade.basic.mas.fipa">
- <title>Kickin'it FIPA style</title>
-
- <para>In order to prevent the proliferation of incompatible agent
systems and to promote
- the agent-based technology and the interoperability of its standards
with other technologies,
- the Foundation for Intelligent Physical Agents (FIPA) was formed. It is
an IEEE Computer
- Society standards organization.</para>
-
- <para>The FIPA has produced a set of documents (called "FIPA
Specifications") that together
- conform the modern standard (or HOW-TO) in terms of agent technology.
It starts with the definition
- of the agent platform, the "home" of the agents. It is the environment
where the agents are placed
- and where their activities are performed. The software foundation for a
MAS-based solution and
- the <emphasis>network server</emphasis> they connect to.</para>
-
- <para>The FIPA defines a model for an agent platform and a communication
language for the agents.
- All the platforms that want to be FIPA-compliant should follow this
model and understand the
- language, and SPADE is no exception. The compliance requires basically
four features:</para>
-
- <itemizedlist>
- <listitem>
- <para>An Agent Communication Channel (ACC). A mechanism which
allows the agents (and the platform itself)
- to communicate with one another.</para>
- </listitem>
- <listitem>
- <para>An Agent Management System (AMS). A way for the agents to
be registered in the platform and to
- be reachable for contact (kind of a <emphasis>White Pages</emphasis>
service).</para>
- </listitem>
- <listitem>
- <para>A Directory Facilitator (DF), which is a kind of public
service in which agents publish the
- services they offer, something akin of a <emphasis>Yellow
Pages</emphasis> service.</para>
- </listitem>
- <listitem>
- <para>Support for the FIPA Agent Communication Language (ACL),
which is a common language for all
- agents to communicate with. Essentially, it is presented in a couple
of flavors: one based on a
- Lisp-like syntax environment (using an obscene amount of parenthesis),
and a clear, pure, practical and
- beautiful syntax based on XML.</para>
- </listitem>
- </itemizedlist>
-
- <para>SPADE implements all these features (and a few others) and thus is
a FIPA-compliant platform.</para>
-
- </section>
-
+ <para>MAS systems are also referred to as "self-organized systems" as
they tend
+ to find the best solution for their problems "without
intervention". There is
+ high similarity here to physical phenomena, such as energy
minimizing, where
+ physical objects tend to reach the lowest energy possible, within
the physical
+ constrained world.</para>
+
+ <para>The main feature which is achieved when developing MAS systems
+ is flexibility, since a MAS system can be added to, modified and
reconstructed,
+ without the need for detailed rewriting of the application. These
systems also
+ tend to be rapidly self-recovering and failure proof, usually due
to the heavy
+ redundancy of components and the self managed features, referred
to, above.</para>
+
+ <section id="spade.basic.mas.fipa">
+ <title>Kickin'it FIPA style</title>
+
+ <para>In order to prevent the proliferation of incompatible agent
systems and to promote
+ the agent-based technology and the interoperability of its
standards with other technologies,
+ the Foundation for Intelligent Physical Agents (FIPA) was
formed. It is an IEEE Computer
+ Society standards organization.</para>
+
+ <para>The FIPA has produced a set of documents (called "FIPA
Specifications") that together
+ conform the modern standard (or HOW-TO) in terms of agent
technology. It starts with the definition
+ of the agent platform, the "home" of the agents. It is the
environment where the agents are placed
+ and where their activities are performed. The software
foundation for a MAS-based solution and
+ the <emphasis>network server</emphasis> they connect to.</para>
+
+ <para>The FIPA defines a model for an agent platform and a
communication language for the agents.
+ All the platforms that want to be FIPA-compliant should follow
this model and understand the
+ language, and SPADE is no exception. The compliance requires
basically four features:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>An Agent Communication Channel (ACC). A mechanism
which allows the agents (and the platform itself)
+ to communicate with one another.</para>
+ </listitem>
+ <listitem>
+ <para>An Agent Management System (AMS). A way for the agents
to be registered in the platform and to
+ be reachable for contact (kind of a <emphasis>White
Pages</emphasis> service).</para>
+ </listitem>
+ <listitem>
+ <para>A Directory Facilitator (DF), which is a kind of
public service in which agents publish the
+ services they offer, something akin of a <emphasis>Yellow
Pages</emphasis> service.</para>
+ </listitem>
+ <listitem>
+ <para>Support for the FIPA Agent Communication Language
(ACL), which is a common language for all
+ agents to communicate with. Essentially, it is presented
in a couple of flavors: one based on a
+ Lisp-like syntax environment (using an obscene amount of
parenthesis), and a clear, pure, practical and
+ beautiful syntax based on XML.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>SPADE implements all these features (and a few others) and
thus is a FIPA-compliant platform.</para>
+
+ </section>
+
</section>

<section id="spade.basic.im">
- <title>Instant Messaging</title>
-
- <para>Instant messaging (IM) is a form of real-time communication
between two or more
- people based on typed text. The text is conveyed via computers connected
over a network
- such as the Internet.</para>
-
- <para>Instant messaging offers real-time communication and allows easy
collaboration,
- which might be considered more akin to genuine conversation than
email's "letter" format.
- In contrast to e-mail, the parties know whether the peer is available.
Most systems allow
- the user to set an online status or away message so peers are notified
when the user is available,
- busy, or away from the computer. This is called the
<emphasis>presence</emphasis> of the user.
- On the other hand, people are not forced to reply immediately
- to incoming messages. For this reason, some people consider
communication via instant messaging
- to be less intrusive than communication via phone. However, some systems
allow the sending of
- messages to people not currently logged on (offline messages), thus
removing much of the difference
- between IM and email.</para>
-
- <para>Instant messaging allows instantaneous communication between a
number of parties simultaneously,
- by transmitting information quickly and efficiently, featuring immediate
receipt of acknowledgment
- or reply. In certain cases IM involves additional features, which make
it even more popular,
- i.e. to see the other party, e.g. by using web-cams, or to talk directly
for free over the internet.</para>
-
- <section id="spade.basic.im.jabber">
- <title>XMPP and Jabber</title>
-
- <para>Extensible Messaging and Presence Protocol (XMPP) is an open,
XML-inspired protocol for near-real-time,
- extensible instant messaging (IM) and presence information (a.k.a.
buddy lists). It is the core protocol
- of the Jabber Instant Messaging and Presence technology. The protocol
is built to be extensible and other
- features such as Voice over IP and file transfer signaling have been
added.</para>
-
- <para>Unlike most instant messaging protocols, XMPP is based on open
standards. Like e-mail, it is an open
- system where anyone who has a domain name and a suitable Internet
connection can run their own Jabber
- server and talk to users on other servers. The standard server
implementations and many clients are also
- free and open source software.</para>
-
- <para>The Internet Engineering Task Force (IETF) formed an XMPP Working
Group in 2002 to formalize the core
- protocols as an IETF Instant Messaging and presence technology. The
four specifications produced by the
- XMPP WG were approved by the IESG as Proposed Standards in 2004. RFC
3920 and RFC 3921 are currently
- undergoing revisions in preparation for advancing them to Draft
Standard within the Internet Standards Process.
- The XMPP Standards Foundation (formerly the Jabber Software Foundation)
is active in developing open XMPP extensions.</para>
-
- <para>XMPP-based software is deployed on thousands of servers across the
Internet and by 2003 was used
- by over ten million people worldwide, according to the XMPP Standards
Foundation.[1] Popular commercial
- servers include the <ulink url="http://www.gizmoproject.com/">Gizmo
Project</ulink>.
- Popular client applications include the freeware clients offered by
- Google and the Gizmo Project, multi-protocol instant messengers such as
- <ulink url="http://www.apple.com/ichat/">iChat</ulink> and
- <ulink url="http://www.pidgin.im/">Pidgin</ulink> (formerly Gaim),
- and free dedicated clients such as <ulink
url="http://psi-im.org">Psi</ulink>.
- <ulink url="http://www.google.com/talk/">Google Talk</ulink> provides
XMPP gateways to its service.</para>
-
- <section id="spade.basic.im.jabber.features">
- <title>XMPP and Jabber Features</title>
-
- <itemizedlist>
- <listitem>
- <para><emphasis role="bold">Open, public, and free.</emphasis>
-
- The Jabber protocol is open, public, free and well-documented, as
opposed to other popular IM systems.
- The XMPP technology is well-documented and public by means of several
RFC standard documents developed
- by the Jabber Software Foundation. Any individual or organization can
make use of XMPP technologies
- without having to pay royalties, licenses, etc ...</para>
-
- </listitem>
-
- <listitem>
- <para><emphasis role="bold">Asynchronous.</emphasis>
-
- A Jabber server guaranties delivery of messages while the destination
client is online. When a client goes
- offline, the Jabber server stores and forwards the message to a client
when the client reconnects.
- This feature, apart from being useful in the case of messages between
humans, helps with the fact that
- Jabber can be used as an architecture that enables systems to talk
with other systems.
+ <title>Instant Messaging</title>
+
+ <para>Instant messaging (IM) is a form of real-time communication
between two or more
+ people based on typed text. The text is conveyed via computers
connected over a network
+ such as the Internet.</para>
+
+ <para>Instant messaging offers real-time communication and allows easy
collaboration,
+ which might be considered more akin to genuine conversation than
email's "letter" format.
+ In contrast to e-mail, the parties know whether the peer is
available. Most systems allow
+ the user to set an online status or away message so peers are
notified when the user is available,
+ busy, or away from the computer. This is called the
<emphasis>presence</emphasis> of the user.
+ On the other hand, people are not forced to reply immediately
+ to incoming messages. For this reason, some people consider
communication via instant messaging
+ to be less intrusive than communication via phone. However, some
systems allow the sending of
+ messages to people not currently logged on (offline messages),
thus removing much of the difference
+ between IM and email.</para>
+
+ <para>Instant messaging allows instantaneous communication between a
number of parties simultaneously,
+ by transmitting information quickly and efficiently, featuring
immediate receipt of acknowledgment
+ or reply. In certain cases IM involves additional features, which
make it even more popular,
+ i.e. to see the other party, e.g. by using web-cams, or to talk
directly for free over the internet.</para>
+
+ <section id="spade.basic.im.jabber">
+ <title>XMPP and Jabber</title>
+
+ <para>Extensible Messaging and Presence Protocol (XMPP) is an
open, XML-inspired protocol for near-real-time,
+ extensible instant messaging (IM) and presence information
(a.k.a. buddy lists). It is the core protocol
+ of the Jabber Instant Messaging and Presence technology. The
protocol is built to be extensible and other
+ features such as Voice over IP and file transfer signaling
have been added.</para>
+
+ <para>Unlike most instant messaging protocols, XMPP is based on
open standards. Like e-mail, it is an open
+ system where anyone who has a domain name and a suitable
Internet connection can run their own Jabber
+ server and talk to users on other servers. The standard server
implementations and many clients are also
+ free and open source software.</para>
+
+ <para>The Internet Engineering Task Force (IETF) formed an XMPP
Working Group in 2002 to formalize the core
+ protocols as an IETF Instant Messaging and presence
technology. The four specifications produced by the
+ XMPP WG were approved by the IESG as Proposed Standards in
2004. RFC 3920 and RFC 3921 are currently
+ undergoing revisions in preparation for advancing them to
Draft Standard within the Internet Standards Process.
+ The XMPP Standards Foundation (formerly the Jabber Software
Foundation) is active in developing open XMPP extensions.</para>
+
+ <para>XMPP-based software is deployed on thousands of servers
across the Internet and by 2003 was used
+ by over ten million people worldwide, according to the XMPP
Standards Foundation.[1] Popular commercial
+ servers include the <ulink
url="http://www.gizmoproject.com/">Gizmo Project</ulink>.
+ Popular client applications include the freeware clients
offered by
+ Google and the Gizmo Project, multi-protocol instant
messengers such as
+ <ulink url="http://www.apple.com/ichat/">iChat</ulink> and
+ <ulink url="http://www.pidgin.im/">Pidgin</ulink> (formerly
Gaim),
+ and free dedicated clients such as <ulink
url="http://psi-im.org">Psi</ulink>.
+ <ulink url="http://www.google.com/talk/">Google Talk</ulink>
provides XMPP gateways to its service.</para>
+
+ <section id="spade.basic.im.jabber.features">
+ <title>XMPP and Jabber Features</title>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis role="bold">Open, public, and
free.</emphasis>
+
+ The Jabber protocol is open, public, free and
well-documented, as opposed to other popular IM systems.
+ The XMPP technology is well-documented and public by means
of several RFC standard documents developed
+ by the Jabber Software Foundation. Any individual or
organization can make use of XMPP technologies
+ without having to pay royalties, licenses, etc ...</para>
+
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">Asynchronous.</emphasis>
+
+ A Jabber server guaranties delivery of messages while the
destination client is online. When a client goes
+ offline, the Jabber server stores and forwards the message
to a client when the client reconnects.
+ This feature, apart from being useful in the case of
messages between humans, helps with the fact that
+ Jabber can be used as an architecture that enables systems
to talk with other systems.

- Consider a scenario with a client that interacts via Jabber with a
command control, sends commands, and
- receives responses. In this scenario, even thought the client goes
offline, the system guarantees that
- the response from the command control is stored and sent to the client
when the client goes online again.</para>
- </listitem>
-
- <listitem>
- <para><emphasis role="bold">Decentralized.</emphasis>
-
- By definition, Jabber is decentralized. Therefore, a Jabber central
server that provides the service to
- everybody does not exist. Jabber is a servers network that is
independent but simultaneously interconnected.
- As a result, anyone can run their own Jabber server, creating networks
and sub-networks that do not depend
- on a central backbone and add it as a component of the agent
architecture.
-
- A user can choose a server that is trusted by her. She is not forced
to use a server that generates suspicion.
- She may use a server provided by a commercial company of her trust
(like her bank or univertity), the one of
- her employer, etc ... A user can even choose to set up her own Jabber
server at home.</para>
- </listitem>
-
- <listitem>
- <para><emphasis role="bold">Secure.</emphasis>
-
- As with all other network services (e.g., HTTP, SMTP, and FTP),
security is an important concern with regard
- to the deployment of IM services based on Jabber technology. One
aspect of these services is the ability to
- enable connections between Jabber servers, thus taking advantage of
the "network effect" of existing Jabber
- servers on the Internet or on a company network.As specified in RFC
3920, the core transport
- layer for XMPP is an XML streaming protocol that makes it possible to
exchange fragments of XML between any
- two network endpoints. Authentication and channel encryption happen
at the XML streaming layer using the
- IETF-standard protocols for Simple Authentication and Security Layer
(SASL) and Transport Layer Security (TLS).
- The XMPP architecture is a pure client-server model, wherein clients
connect to servers and (optionally)
- servers connect to each other for inter-domain communications.</para>
- </listitem>
-
- <listitem>
- <para><emphasis role="bold">Extensible.</emphasis>
-
- Using the power of XML namespaces, anyone can build custom
functionality on top of the core protocol, as exemplified by the Jabber
Enhancement Proposals (JEPs) coordinated by the Jabber Software Foundation.
Jabber was designed from the beginning to be extended. A good example of
this are the changes and improvements that have gradually appeared in the
Jabber technology without breaking backward compatibilities. To mention
some: Support of SSL and GPG encryption; precise information on the state
of a message ('is being written', 'the contact has received it' or 'it has
been kept in the server'); multi-conference chat rooms (MUC) that allow
multiple users to interact simultaneously using virtual channels; a
cooperative online 'blackboard' to draw graphics and share multimedia
contents among the participants of a conversation (<ulink
url="http://hem.fyristorg.com/matben/">The Coccinella</ulink>). These
extended functionalities do not require the Jabber servers to be modified
at all. They rely on the Jabber clients to implement the necessary features
to support them. Thus, in Jabber the power of extending functionalities is
in the client.</para>
- </listitem>
-
- <listitem>
- <para><emphasis role="bold">Flexible.</emphasis>
-
- The most common misconception about Jabber is that it is solely for
IM. Jabber is more than a bridge to other IM systems or a set of protocols.
IM is just one of the countless ways that an XML-based messaging technology
such as Jabber's can be applied. Jabber is a flexible and extensible
client/server architecture that routes XML data between clients and
services, which plug into Jabber servers as components. The original and
core set of components provide the IM features (and support services) that
have been discussed. The XML structures that make up the Jabber protocol
are split into top-level tags (also referred to as elements). These tags do
not necessarily carry human-generated IM message content; as long as the
resulting XML is well-formed, anything goes. Furthermore, the Jabber
protocol design makes use of an XML feature that allows total flexibility
for extensions, called namespaces. Bearing this in mind, it is clear that
Jabber can be deployed to provide solutions far beyond the IM space as well
as within it. Jabber applications beyond IM include network management,
content syndication, collaboration tools, file sharing, gaming, remote
systems monitoring and, now, agent communication.</para>
- </listitem>
+ Consider a scenario with a client that interacts via
Jabber with a command control, sends commands, and
+ receives responses. In this scenario, even thought the
client goes offline, the system guarantees that
+ the response from the command control is stored and sent
to the client when the client goes online again.</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">Decentralized.</emphasis>
+
+ By definition, Jabber is decentralized. Therefore, a
Jabber central server that provides the service to
+ everybody does not exist. Jabber is a servers network that
is independent but simultaneously interconnected.
+ As a result, anyone can run their own Jabber server,
creating networks and sub-networks that do not depend
+ on a central backbone and add it as a component of the
agent architecture.
+
+ A user can choose a server that is trusted by her. She is
not forced to use a server that generates suspicion.
+ She may use a server provided by a commercial company of
her trust (like her bank or univertity), the one of
+ her employer, etc ... A user can even choose to set up her
own Jabber server at home.</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">Secure.</emphasis>
+
+ As with all other network services (e.g., HTTP, SMTP, and
FTP), security is an important concern with regard
+ to the deployment of IM services based on Jabber
technology. One aspect of these services is the ability to
+ enable connections between Jabber servers, thus taking
advantage of the "network effect" of existing Jabber
+ servers on the Internet or on a company network.As
specified in RFC 3920, the core transport
+ layer for XMPP is an XML streaming protocol that makes it
possible to exchange fragments of XML between any
+ two network endpoints. Authentication and channel
encryption happen at the XML streaming layer using the
+ IETF-standard protocols for Simple Authentication and
Security Layer (SASL) and Transport Layer Security (TLS).
+ The XMPP architecture is a pure client-server model,
wherein clients connect to servers and (optionally)
+ servers connect to each other for inter-domain
communications.</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">Extensible.</emphasis>
+
+ Using the power of XML namespaces, anyone can build custom
functionality on top of the core protocol, as exemplified by the Jabber
Enhancement Proposals (JEPs) coordinated by the Jabber Software Foundation.
Jabber was designed from the beginning to be extended. A good example of
this are the changes and improvements that have gradually appeared in the
Jabber technology without breaking backward compatibilities. To mention
some: Support of SSL and GPG encryption; precise information on the state
of a message ('is being written', 'the contact has received it' or 'it has
been kept in the server'); multi-conference chat rooms (MUC) that allow
multiple users to interact simultaneously using virtual channels; a
cooperative online 'blackboard' to draw graphics and share multimedia
contents among the participants of a conversation (<ulink
url="http://hem.fyristorg.com/matben/">The Coccinella</ulink>). These
extended functionalities do not require the Jabber servers to be modified
at all. They rely on the Jabber clients to implement the necessary features
to support them. Thus, in Jabber the power of extending functionalities is
in the client.</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">Flexible.</emphasis>
+
+ The most common misconception about Jabber is that it is
solely for IM. Jabber is more than a bridge to other IM systems or a set of
protocols. IM is just one of the countless ways that an XML-based messaging
technology such as Jabber's can be applied. Jabber is a flexible and
extensible client/server architecture that routes XML data between clients
and services, which plug into Jabber servers as components. The original
and core set of components provide the IM features (and support services)
that have been discussed. The XML structures that make up the
Jabber protocol are split into top-level tags (also referred to as
elements). These tags do not necessarily carry human-generated IM message
content; as long as the resulting XML is well-formed, anything goes.
Furthermore, the Jabber protocol design makes use of an XML feature that
allows total flexibility for extensions, called namespaces. Bearing this in
mind, it is clear that Jabber can be deployed to provide solutions far
beyond the IM space as well as within it. Jabber applications beyond IM
include network management, content syndication, collaboration tools, file
sharing, gaming, remote systems monitoring and, now, agent
communication.</para>
+ </listitem>

- </itemizedlist>
-
- </section>
-
- </section>
+ </itemizedlist>
+
+ </section>
+
+ </section>

</section>

<section id="spade.basic.spadeplatform">
- <title>The SPADE Agent Platform</title>
-
- <para>Simply put, SPADE is an agent platform based on the XMPP/Jabber
technology. This technology offers by itself many features and facilities
that ease the construction of MAS, such as an existing communication
channel, the concepts of users (agents) and servers (platforms) and an
extensible communication protocol based on XML, just like FIPA-ACL. Many
other agent platforms exist, but SPADE is the first to base its roots on
the XMPP technology.</para>
-
- <para>The SPADE Agent Platform does not require (but strongly recommends)
the operation of agents made with the SPADE Agent Library (see next
section). The platform itself uses the library to empower its internals,
but aside from that, you can develop your own agents in the programming
language of your choice and use them with SPADE. The only requirement those
agents must fulfill is to be able to communicate through the XMPP protocol.
The FIPA-ACL messages will be embedded in XMPP messages. Be warned,
however, that some features of the whole SPADE experience may not be
available if you do not use the SPADE Agent Library to build your
agents.</para>
-
- <para>SPADE is written in the Python programming language. In order to
fully understand and use SPADE, a bit of knowledge about Python is
required, but, hey! you would not be reading this manual if you weren't a
top-notch programmer, wouldn't you?</para>
-
+ <title>The SPADE Agent Platform</title>
+
+ <para>Simply put, SPADE is an agent platform based on the XMPP/Jabber
technology. This technology offers by itself many features and facilities
that ease the construction of MAS, such as an existing communication
channel, the concepts of users (agents) and servers (platforms) and an
extensible communication protocol based on XML, just like FIPA-ACL. Many
other agent platforms exist, but SPADE is the first to base its roots on
the XMPP technology.</para>
+
+ <para>The SPADE Agent Platform does not require (but strongly
recommends) the operation of agents made with the SPADE Agent Library (see
next section). The platform itself uses the library to empower its
internals, but aside from that, you can develop your own agents in the
programming language of your choice and use them with SPADE. The only
requirement those agents must fulfill is to be able to communicate through
the XMPP protocol. The FIPA-ACL messages will be embedded in XMPP messages.
Be warned, however, that some features of the whole SPADE experience may
not be available if you do not use the SPADE Agent Library to build your
agents.</para>
+
+ <para>SPADE is written in the Python programming language. In order to
fully understand and use SPADE, a bit of knowledge about Python is
required, but, hey! you would not be reading this manual if you weren't a
top-notch programmer, wouldn't you?</para>
+
</section>

<section id="spade.basic.spadelibrary">
- <title>The SPADE Agent Library</title>
-
- <para>The SPADE Agent Library is a module for the Python programming
language for building SPADE agents. It is a collection of classes,
functions and tools for creating new SPADE agents that can work with the
SPADE Agent Platform. Using it is the best way to start developing your own
SPADE agents. In the future, we would like to offer bindings of the SPADE
Agent Library for more programming languages, like Java or C#, but for now
only Python is supported.</para>
-
- <para>If you have worked with Python before, you will find the SPADE
Agent Library easy to understand and use, with classes ready to use and
expand, and many functionalities already built in the library. If you have
worked with other high-level behavioral agent platforms (like Jade or
MadKit) you will find some similarities in the way the library works,
although the agent model present in SPADE is a bit different.</para>
-
+ <title>The SPADE Agent Library</title>
+
+ <para>The SPADE Agent Library is a module for the Python programming
language for building SPADE agents. It is a collection of classes,
functions and tools for creating new SPADE agents that can work with the
SPADE Agent Platform. Using it is the best way to start developing your own
SPADE agents. In the future, we would like to offer bindings of the SPADE
Agent Library for more programming languages, like Java or C#, but for now
only Python is supported.</para>
+
+ <para>If you have worked with Python before, you will find the SPADE
Agent Library easy to understand and use, with classes ready to use and
expand, and many functionalities already built in the library. If you have
worked with other high-level behavioral agent platforms (like Jade or
MadKit) you will find some similarities in the way the library works,
although the agent model present in SPADE is a bit different.</para>
+
</section>

+ <section id="spade.basic.features">
+ <para>
+ The main features of SPADE are:
+ <itemizedlist>
+ <listitem><para>Developed using Python</para></listitem>
+ <listitem><para>Covers the FIPA standard</para></listitem>
+ <listitem><para>Implements four MTPs: XMPP, P2P, HTTP and
SIMBA</para></listitem>
+ <listitem><para>Supports two content languages: FIPA-SL and
RDF</para></listitem>
+ <listitem><para>SPADE agents do reach their goals by running
deliberative and reactive tasks</para></listitem>
+ <listitem><para>Has a web interface to manage the
platform</para></listitem>
+ <listitem><para>Allows its execution in several platforms and
operating systems</para></listitem>
+ <listitem><para>Presence notification allows the system to
determine the current state of the agents in real-time</para></listitem>
+ <listitem><para>Multi-user conference allows agents to create
organizations and groups of agents</para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
<section id="spade.basic.whatsnext">
- <title>What's Next?</title>
+ <title>What's Next?</title>

- <para>If you want to get your hands dirty and start using SPADE right
now, head on to the next chapter where a Quickstart Guide awaits you.
However if you wish to learn more about SPADE and see how deep the rabbit
hole goes, you can go directly to chapter XX.</para>
+ <para>If you want to get your hands dirty and start using SPADE right
now, head on to the next chapter where a Quickstart Guide awaits you.
However if you wish to learn more about SPADE and see how deep the rabbit
hole goes, you can go directly to chapter XX.</para>
</section>
-
+
</chapter>
=======================================
--- /trunk/doc/manual/ch01-quickstart-guide.xml Mon Jun 21 07:36:16 2010
+++ /trunk/doc/manual/ch01-quickstart-guide.xml Mon Nov 12 09:28:31 2012
@@ -11,11 +11,13 @@

<itemizedlist>
<listitem>
- <para>Python 2.6.2 or above</para>
+ <para>Python 2.7 or above</para>
</listitem>
<listitem>
<para>Psyco python optimizer (optional), to speed up the execution of
the platform and the agents</para>
</listitem>
+ <listitem><para>pexpect (optional), to use external knowledge
bases</para></listitem>
+ <listitem><para>SPARQLWrapper (optional), to use the SPARQL knowledge
base</para></listitem>
</itemizedlist>

</section>
@@ -23,15 +25,36 @@
<section id="spade.quickstart.installation">
<title>Installation</title>

- <para>Grab the SPADE deliverable package at <ulink
url="http://spade2.googleprojects.com">http://spade2.googleprojects.com</ulink>.
Uncompress it and launch the <command>configure.py</command> script in
order to configure the platform. You can provide a parameter to this
script, which is the machine's hostname and that will be used as the
platform's name. Finally, launch the <command>runspade.py</command> script
and see your platform rise before your eyes. After a few seconds you should
see the green word <command>Done</command> on the screen confirming that
the platform was succesfully launched. In a nutshell:</para>
+ <para>The best way to install SPADE is using the easy installer from
the Python Package Index. You can install SPADE with easy_install or
pip:</para>
+
+ <screen>
+
+ pip install SPADE
+ </screen>
+ <para>or</para>
+
+ <screen>
+
+ easy_install SPADE
+ </screen>
+
+ <para> If you want to install the platform from source grab the SPADE
deliverable package at <ulink
url="http://spade2.googleprojects.com">http://spade2.googleprojects.com</ulink>
or from the Python Package Index <ulink
url="http://pypi.python.org/pypi/SPADE">http://pypi.python.org/pypi/SPADE</ulink>.
Uncompress it and launch the <command>setup.py</command> script with the
<command>install</command> parameter.</para>

<screen>
-$ tar xvzf spade-2.0.0.tar.gz
+$ tar xvzf SPADE-2.1.tar.gz
$ cd spade
-$ python configure.py myhost.myprovider.com
-$ python runspade.py
+$ python setup.py install
+</screen>
+
+
+<para>Once you have succesfully installed SPADE run the
<command>configure.py</command> script in order to configure the platform.
You can provide a parameter to this script, which is the machine's hostname
and that will be used as the platform's name. Finally, launch the
<command>runspade.py</command> script and see your platform rise before
your eyes. After a few seconds you should see the green word
<command>Done</command> on the screen confirming that the platform was
succesfully launched. In a nutshell:</para>
+
+<screen>
+$ configure.py myhost.myprovider.com
+$ runspade.py
</screen>

+
<!--><warning><para>PONER UN EJEMPLO</para></warning>-->

<para>And that's it. If everything went well, congratulations! You have
succesfully installed SPADE! If something went wrong, don't panic!, head to
chapter XXX "FAQ and Troubleshooting" for answers or follow the rest of
this manual to know a lot more about SPADE.</para>
=======================================
--- /trunk/doc/manual/ch02-fundamental-concepts.xml Mon Jun 14 09:07:30 2010
+++ /trunk/doc/manual/ch02-fundamental-concepts.xml Mon Nov 12 09:28:31 2012
@@ -11,7 +11,7 @@
<para>The SPADE platform is installed and executed on a host. That host
becomes the centre of the multi-agent system that we are going to build. In
order to properly deploy the SPADE platform, it needs to be configured
first to suit the host where it is going to be. Along with the SPADE
distribution comes a tool called <command>configure.py</command> which is a
script to automatically configure SPADE for you. In most scenarios, the
only configuration you need to do for SPADE to work is to invoke this tool
with the desired hostname to use as the platform hostname. E.g:</para>

<screen>
-$ python configure.py myhost.myprovider.com
+$ configure.py myhost.myprovider.com
</screen>

<para>Then, SPADE will be configured to work as a platform serving at
the <command>myhost.myprovider.com</command> domain.</para>
@@ -23,8 +23,8 @@
<para>After a successful configuration, you can try to run SPADE for the
first time. To do so, use the <command>runspade.py</command> script that is
provided with the SPADE distribution. This script will launch the SPADE
platform and set it ready to start working with agents. You should see
something along the lines of:</para>

<screen>
-$ python runspade.py
-SPADE 2.0 &lt;gus...@gmail.com&gt; - http://spade2.googleprojects.com
+$ runspade.py
+SPADE 2.1 &lt;gus...@gmail.com&gt; - http://spade2.googleprojects.com
Starting SPADE...... [done]
</screen>

=======================================
--- /trunk/doc/manual/ch03-basic-agents.xml Mon Nov 28 06:37:01 2011
+++ /trunk/doc/manual/ch03-basic-agents.xml Mon Nov 12 09:28:31 2012
@@ -291,7 +291,7 @@
self.msg = spade.ACLMessage.ACLMessage() # Instantiate the message
self.msg.setPerformative("inform") # Set the "inform" FIPA
performative
self.msg.setOntology("myOntology") # Set the ontology of the
message content
- self.msg.setLanguage("English") # Set the language of the
message content
+ self.msg.setLanguage("OWL-S") # Set the language of the
message content
self.msg.addReceiver(receiver) # Add the message receiver
self.msg.setContent("Hello World") # Set the message content

=======================================
--- /trunk/doc/manual/ch06-bdi.xml Mon Nov 28 06:37:01 2011
+++ /trunk/doc/manual/ch06-bdi.xml Mon Nov 12 09:28:31 2012
@@ -1,140 +1,250 @@
<chapter id="spade.bdi">
- <title>BDI Architecture for SPADE Agents</title>
+ <title>BDI Architecture for SPADE Agents</title>

- <para>SPADE supports natively a BDI agent model based on the Goal
Oriented Computation paradigm. This chapter of the documentation will
introduce the BDI model and its use on the SPADE platform.</para>
-
- <section id="spade.bdi.intro">
- <title>The SPADE BDI Agent Model</title>
-
+ <para>SPADE supports natively a BDI agent model based on the
Distributed Goal Oriented Computing paradigm. This chapter of the
documentation will introduce the BDI model and its use on the SPADE
platform.</para>
+
+ <section id="spade.bdi.intro">
+ <title>The SPADE BDI Agent Model</title>
+
<para><emphasis>Michael Bratman's</emphasis>BDI agent model is
based on 3 basic elements: <emphasis role="bold">Belief</emphasis>,
<emphasis role="bold">Desire</emphasis> and <emphasis
role="bold">Intention</emphasis> (you know, B-D-I).
- <itemizedlist>
- <listitem><para>A Belief is an entry in the agent's knowledge
base. It represents what the agent "knows" about its
environment.</para></listitem>
- <listitem><para>Desires represent that which the agents wishes
to achieve. The instantiation of a Desire is a Goal.</para></listitem>
+ <itemizedlist>
+ <listitem><para>A Belief is an entry in the agent's knowledge
base. It represents what the agent "knows" about its
environment.</para></listitem>
+ <listitem><para>Desires represent that which the agents wishes
to achieve. The instantiation of a Desire is a Goal.</para></listitem>
<listitem><para>Intentions represent the deliberative state of
the agent, that is, what the agent has decided to do in order to achieve
its goals. The Intentions in execution are Plans, that is, a sequence of
actions that the agent can execute in order to fulfill an
Intention.</para></listitem>
- </itemizedlist>
+ </itemizedlist>
</para>

- <para>The BDI implemented by SPADE is slightly different. We
have tried to develop a distributed BDI system using <emphasis>Service
Oriented Computation (SOC)</emphasis> together with dynamic compilation of
services in SPADE, which we have called <emphasis role="bold">Goal Oriented
Computation</emphasis>.</para>
-
- <para>Este modelo BDI utiliza los principios básicos del modelo BDI
tradicional de Michael Bratman pero introduciendo un modelo más complejo de
intenciones.
- En el modelo BDI de SPADE aparecen los siguientes elementos:</para>
+ <para>The BDI implemented by SPADE is slightly different. We
have tried to develop a distributed BDI system using <emphasis>Service
Oriented Computing (SOC)</emphasis> together with dynamic compilation of
services in SPADE, which we have called <emphasis role="bold">Distributed
Goal Oriented Computing</emphasis>.</para>

<para>This BDI model uses the same basic principles of the
classic BDI model from Bratman, but it introduces a more complex model for
the Intentions.
- In SPADE's BDI model, the following elements appear:</para>

- <itemizedlist>
- <listitem><para> <emphasis role="bold">Belief:</emphasis> An entry of
knowledge in the agent's KB. You can insert new knowledge, delete it and
make queries to the KB about it.</para></listitem>
- <listitem><para> <emphasis role="bold">Goals:</emphasis> SPADE's
BDI model does not differentiate Desires and Goals, there are only Goals.
When an agent expresses a Goal, it means that the agents wishes to
accomplish the expression contained in such Goal. When a goal is selected
for accomplishment, it becomes active.</para></listitem>
+ In the SPADE's BDI model, the following elements appear:</para>
+
+ <itemizedlist>
+ <listitem><para> <emphasis role="bold">Belief:</emphasis> An entry
of knowledge in the agent's KB. You can insert new knowledge, delete it and
make queries to the KB about it.</para></listitem>
+ <listitem><para> <emphasis role="bold">Goals:</emphasis> SPADE's
BDI model does not differentiate Desires and Goals, there are only Goals.
When an agent expresses a Goal, it means that the agents wishes to
accomplish the expression contained in such Goal. When a goal is selected
for accomplishment, it becomes active.</para></listitem>
<listitem><para> <emphasis role="bold">Services:</emphasis>
Given that SPADE's BDI model is grounded on SOC, it is necessary to include
a Service element into the model. A Service is a method offered by the
agent to the rest of the system agents. Services can be composed into a
sequence forming the Plans. Services have in their description both a
pre-condition (P) and a post-condition (Q). The pre-condition P represents
a state of knowledge that must be present in order to execute the Service.
The post-condition Q represents the state of knowledge that the agent will
achieve once the Service has been invoked.</para></listitem>
<listitem><para> <emphasis role="bold">Plans:</emphasis> Plans are
a sequence of Services that work their way to achieve the agent's Goals.
Agents reach their Goals by executing Plans. Such Plans are composed of a
sequence of Services (with their pre-conditions and post-conditions
connected) and both a pre-condition P and a post-condition Q that define
the whole Plan. Whenever a Goal G must be achieved, the agent will look for
a Plan whose post-condition <literal>Q</literal> equals
<literal>G</literal> and also whose pre-condition <literal>P</literal> is
present as a pre-requisite for the Plan to start. But, wait for this, the
Services composing a Plan's actions <emphasis role="bold">do not
necessarily belong to the same agent</emphasis>. There is where the
distributed nature of SPADE's BDI model comes into play.</para></listitem>
- </itemizedlist>
-
- </section>
+ </itemizedlist>
+
+ </section>

- <section id="spade.bdi.kb">
- <title>The Knowledge Base</title>
+ <section id="spade.bdi.kb">
+ <title>The Knowledge Base</title>

- <para>Accessing the KB is really simple. As said, you can add
knowledge, delete it, or make query for it.</para>
+ <para>Each agent has a Knowledge Base where it stores its acquired
knowledge items. The technology to store these items can be selected from a
set of different prolog engines: <literal>SWI-Prolog, XSB, Flora2,
Eclipse</literal> and <literal>SPARQL</literal>. SPADE does also support an
internal Prolog engine, which is less powerful but has no external
requirements. This is the <literal>SpadeKB</literal> engine, wich supports
first-order logic.
+ </para>
+ <para>Accessing the KB is really simple. As said, you can add
knowledge, delete it, or make queries.</para>

- <screen>
- #Inserts a Knowledge
- agent.addBelieve(expr("value(1)"))
+ <screen>
+ #First configure the KB for using SWI-Prolog. The default KB is
SpadeKB
+ $ agent.configureKB("SWI", None, "swipl") #third argument is the
path to the swipl executable

- #Deletes a Knowledge
- agent.removeBelieve(expr("value(2)"))
+ #Insert some knowledge items
+ $ agent.addBelieve( 'a(b,c)' )
+ $ agent.addBelieve( 'a(c,d)' )
+ $ agent.addBelieve( '( p(_X,_Y) :- a(_X,_Y) )' )
+ $ agent.addBelieve( '( p(_X,_Y) :- a(_X,_Z), p(_Z,_Y) )' )

- #Ask for a Knowledge
- agent.askBelieve(expr("value(1)"))
- True
+ #Ask for a Knowledge
+ $ agent.askBelieve( 'p(X,Y)' )
+ > [{'Y': 'c', 'X': 'b'}, {'Y': 'd', 'X': 'c'},
{'Y': 'd', 'X': 'b'}]

- agent.askBelieve(expr("value(X)"))
- True
- </screen>
+ #Deletes a Knowledge
+ $ agent.removeBelieve( 'a(b,c)' )

- </section>
- <section id="spade.bdi.plans">
- <title>Plans and Services</title>
+ #Check deletion
+ $ agent.askBelieve( 'p(X,Y)' )
+ > [{'Y': 'd', 'X': 'c'}]
+
+ </screen>
+
+ <screen>
+ #XSB
+ $ agent.configureKB("XSB", None, "xsb") #third argument is the
path to the xsb executable
+ $ agent.addBelieve( 'a(b,c)' )
+ $ agent.removeBelieve( 'a(c,d)' )
+ $ agent.askBelieve( 'p(X,Y)' )
+
+ #Flora2
+ $ agent.configureKB("Flora2", None, "runflora") #third argument is
the path to the flora2 executable
+ $ agent.addBelieve( 'a[ b->c ]' ) #Beware, Flora2 notation is
different
+ $ agent.removeBelieve( 'a[ b->c ]' )
+ $ agent.askBelieve( '?x[ ?y->?z ]' )
+
+ #Eclipse
+ $ agent.configureKB("ECLiPSe", None, "eclipse") #third argument is
the path to the eclipse executable
+ $ agent.addBelieve( 'a(b,c)' )
+ $ agent.askBelieve( 'p(X,Y)' )
+
+ #SPARQL
+ $ agent.configureKB("SPARQL", sentence=None,
path='http://dbpedia.org/sparql')
+ $ sparql_query = '''
+ PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#>
+ SELECT ?name
+ WHERE {
+ &lt;http://dbpedia.org/resource/Croatia>
+ rdfs:name
+ ?name
+ }'''
+ $ result = agent.askBelieve(sparql_query)
+ $ for item in result:
+ assert item["name"] in ["Croatia","Republic of
Croatia","Republika Hrvatska"]
+
+ </screen>
+
+ <para>
+ The SpadeKB is a FOL knowledge base, which is the default KB in SPADE.
This KB stores believes in the same format as the rest of types of KBs,
using <literal>addBelieve, removeBelieve</literal> and
<literal>askBelieve</literal>. But the SpadeKB has also the ability of
storing <emphasis role='bold'>Facts</emphasis> in the KB. This is useful
when you want to store variables with a name and a value. The types of
value currently supported are: integer, string, float, list and
dictionaries.
+ </para>
+
+ <screen>
+ $ agent.saveFact("MyFact", 1000) #parameters are name and value
+ $ agent.getFact("MyFact")
+ > 1000
+ $ agent.askBelieve("Var(MyFact,1000,Int)")
+ > True
+
+ $ agent.saveFact("MyFloat",1.34)
+ $ agent.getFact("MyFloat")
+ > 1.34
+
+ $
agent.saveFact("MyString","LoremIpsumAdHisScriptaBlanditPartiendo") #spaces
still not supported, sorry
+ $ agent.getFact("MyString")
+ > 'LoremIpsumAdHisScriptaBlanditPartiendo'
+
+ $ agent.saveFact("MyList",[5,6,7,8])
+ $ agent.getFact("MyList")
+ > [5,6,7,8]
+
+ $ agent.saveFact("MyDict",{'a':123,'b':456,789:"c"})
+ $ agent.getFact("MyDict")
+ > {'a':123,'b':456,789:"c"}
+
+ $
agent.saveFact("MyMixedFact",{'a':[123.25],'b':[4,5,6],789:{'a':1,'b':2}})
+ $ agent.getFact("MyMixedFact")
+ > {'a':[123.25],'b':[4,5,6],789:{'a':1,'b':2}}
+
+ </screen>
+
+ </section>
+ <section id="spade.bdi.plans">
+ <title>Plans and Services</title>

- <para>In order to offer a Service, an agent must use the
<command>Service</command> class from the bdi module in SPADE.
- The body of the Service is the <command>run</command> method. Everything
that the Service must do has to be included in the <command>run</command>
method. The Service constructor receives the pre-condition P and the
post-condition Q as parameters.</para>
+ <para>
+ Services in SPADE are offered by agents registered in the
system. These services, once are registered in the Directory Facilitator
(DF) can be invoked using the RPC facilities of SPADE.
+ </para>

- <screen>
- class Serv1(Service):
- def run(self):
- self.addBelieve(expr("Value(1)"))
+ <screen>
+ #This is the method executed when the service is invoked
+ def s1_method(Value):
+ return {"Myoutput1":1} #the return value is a dict containing
Facts in the form name:value
+
+ #Create the service profile
+ s = DF.Service(name="s1", owner=agent.getAID(),
inputs=["Value"],outputs=["O1"],P=["Var(Value,0,Int)"],Q=["Var(O1,1,Int)"])
+
+ #Finally register the service
+ agent.registerService(s, s1_method)
+ </screen>
+
+ <para>A Plan is a sequence of services where each postcondition
matches the precondition of the next service. The plan has also a
precondition (P) and postcondition (Q) and a set of inputs and
outputs:</para>
+ <screen>

- agent.registerService(name="name", service=Serv1())
- </screen>
-
- <para>A Plan only needs a pre-condition P, a post-condition Q
and a list of Services. Dictionaries are used in order to define
them:</para>
- <screen>
+
agent.addPlan(inputs=["Value"],outputs=["O2"],P=["Var(Value,0,Int)"],Q=["Var(O2,2,Int)"],
services=["s1","s2"])
+ </screen>

- plan = {'P': expr("value(1)"),'Q':expr("value(4)"),
services:[s1,s2,s3,s4]}
- agent.addPlan(plan)
- </screen>
-
- </section>
- <section id="spade.bdi.goals">
- <title>Goals</title>
-
+ <para>These are pre-compiled plans that the agent may have to
improve the plan search. However, SPADE agents have the ability of
composing on-line plans, with no need of creating pre-compiled plans.</para>
+
+ </section>
+ <section id="spade.bdi.goals">
+ <title>Goals</title>
+
<para>Goals are instances of the <command>Goal</command> class.
Its constructor receives as a parameter the expression of the Goal.</para>

- <screen>
- g = Goal(expr("value(4)"))
- agent.addGoal(g)
- </screen>
-
- </section>
- <section id="spade.bdi.running">
- <title>BDI in action</title>
+ <screen>
+
+ g = Goal("Var(O1,1,Int)")
+ </screen>
+
+ <para>When a goal is added, the BDIAgent will try to perform this
goal by invoking services. Once the goal is completed, the goalCompleted
callback is called to notify the agent.
+ </para>
+
+ <screen>
+ $ def goalCompletedCB( goal ):
+ print "Goal completed!"
+
+ $ agent.saveFact("Value",0)
+
+ $ agent.setGoalCompletedCB( goalCompletedCB )
+
+ $ agent.addGoal( Goal("Var(Value,0,Int)") )
+ > "Goal completed!"
+ </screen>
+
+ </section>
+ <section id="spade.bdi.running">
+ <title>BDI in action</title>

<para>During the agent execution, classic SPADE behaviours
can coexist with the BDI model. Every time that a new Goal is introduced
into the agent, it will try to achieve it looking for a Plan that fits the
task. All this work happens in a completely transparent way for the
user.</para>
- <screen>
- import spade
- from spade.bdi import *
+
+ <screen>
+
+ import spade
+ from spade.bdi import *
+ from spade.DF import Service
+
+ def s1_method(Value):
+ return {"O1":1}
+
+ def s2_method(Myoutput1):
+ return {"O2":2}
+
+ def goalCompletedCB(goal):
+ agent.goalCompleted = True
+
+ agent = BDIAgent("b...@127.0.0.1","secret")
+ s1 = Service(name="s1", owner=agent.getAID(),
inputs=["Value"],outputs=["O1"],P=["Var(Value,0,Int)"],Q=["Var(O1,1,Int)"])
+ s2 = Service(name="s2", owner=agent.getAID(),
inputs=["O1"],outputs=["O2"],P=["Var(O1,1,Int)"],Q=["Var(O2,2,Int)"])
+
+ agent.registerService(self.s1,s1_method)
+ agent.registerService(self.s2,s2_method)
+
+ agent.goalCompleted = False
+
+ agent.saveFact("Value",0)

- agent = BDIAgent("b...@127.0.0.1","secret")
- agent.setDebugToScreen()
- agent.addBelieve(expr("Value(0)"))
+ agent.setGoalCompletedCB( goalCompletedCB )

- g = Goal(expr("Value(2)"))
+ agent.addGoal( Goal("Var(O1,1,Int)") )

- class Serv1(Service):
- def run(self):
- print "Service 1 running"
- self.addBelieve(expr("Value(1)"))
- class Serv2(Service):
- def run(self):
- print "Service 2 running"
- self.addBelieve(expr("Value(2)"))
+ agent.start()

- s1 = Serv1(P=expr("Value(0)"),Q=expr("Value(1)"))
- s2 = Serv2(P=expr("Value(1)"),Q=expr("Value(2)"))
+ import time
+ counter = 0
+ while not agent.goalCompleted and counter &lt; 10:
+ time.sleep(1)
+ counter+=1

- p = Plan(P=expr("Value(0)"),Q=expr("Value(2)"))
- p.appendService(s1)
- p.appendService(s2)
+ $ agent.goalCompleted
+ > True
+ $ agent.askBelieve( "Var(O1,1,Int)" )
+ > True
+ $ agent.getFact("O1")
+ > 1

- agent.addPlan(p)
- agent.addGoal(g)
+ agent.stop()
+ sys.exit(0)
+ </screen>

- agent.start()
+ <para>Unit tests are always a good source of documentation. In the
<literal>bdiTestCase.py</literal> you can find more examples of how to
create complex plans and multiple goals that are reached thanks to the
on-line planner of the BDIAgent.
+ You can also find more documentation in the following reference papers:

- import time
- try:
- while True:
- time.sleep(1)
- except:
- agent.stop()
+ <itemizedlist>
+ <listitem><para><ulink
url="http://www.sciencedirect.com/science/article/pii/S0164121212000337">Distributed
Goal-oriented Computing</ulink></para></listitem>
+ <listitem><para><ulink
url="http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=5718856">A
Goal-Oriented Execution Module Based on Agents</ulink></para></listitem>
+ </itemizedlist>

- sys.exit(0)
- </screen>
-
- </section>
- <section id="spade.bdi.future">
- <title>Future Work</title>
-
-<para>In future versions of the BDI model we will introduce automatic Plan
compilation using the whole database of services offered by all the agents
in the platform. In order to do that, the platform will include a
deliberative agent able to make searches through all the available services
and compose a Plan on-the-fly whenever the set of pre-compiled Plans of an
agent is not enough to achieve the desired Goal. But that, my friends, is
another story</para>
+ </para>
+
+ </section>

-</section>
</chapter>
=======================================
--- /trunk/doc/manual/html/ch05s03.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/ch05s03.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>What's next</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.platform.html" title="Chapter 5. Platform
services">
<link rel="prev" href="spade.platform.df.html" title="The SPADE Directory
Facilitator (DF)">
@@ -23,9 +23,9 @@
</table>
<hr>
</div>
-<div class="section" title="What's next">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id36145585"></a>What's next</h2></div></div></div>
+<a name="idp33781248"></a>What's next</h2></div></div></div>
<p>In this chapter we have learned what facilities do the AMS and DF offer
to the agents. Next chapter, we will get our hands even dirtier as we
venture through the black marshes of SPADE's advanced behaviour types.</p>
</div>
<div class="navfooter">
=======================================
--- /trunk/doc/manual/html/index.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/index.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SPADE User's Manual</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="next" href="spade.foreword.html" title="Foreword">
</head>
@@ -20,12 +20,12 @@
</table>
<hr>
</div>
-<div class="book" title="SPADE User's Manual">
+<div class="book">
<div class="titlepage">
<div>
<div><h1 class="title">
<a name="spade"></a>SPADE User's Manual</h1></div>
-<div><h2 class="subtitle">For SPADE 2.0</h2></div>
+<div><h2 class="subtitle">For SPADE 2.1</h2></div>
<div><div class="authorgroup">
<div class="author"><h3 class="author">
<span class="firstname">Gustavo</span> <span class="surname">Aranda</span>
@@ -33,13 +33,10 @@
<div class="author"><h3 class="author">
<span class="firstname">Javier</span> <span class="surname">Palanca</span>
</h3></div>
-<div class="author"><h3 class="author">
-<span class="firstname">Natalia</span> <span class="surname">Criado</span>
-</h3></div>
</div></div>
-<div><p class="copyright">Copyright © 2005, 2010 Gustavo Aranda, Javier
Palanca, Miguel Escriva, Natalia Criado, Juan Angel Garcia-Pardo</p></div>
-<div><div class="legalnotice" title="Legal Notice">
-<a name="id36142111"></a><p>This work is licensed under the Creative
+<div><p class="copyright">Copyright © 2005, 2012 Gustavo Aranda, Javier
Palanca, Miguel Escriva, Juan Angel Garcia-Pardo</p></div>
+<div><div class="legalnotice">
+<a name="idp31374576"></a><p>This work is licensed under the Creative
Commons Attribution License. To view a copy of this license,
visit <a class="ulink"
href="http://creativecommons.org/licenses/by/2.0/"
target="_top">http://creativecommons.org/licenses/by/2.0/</a>
or send a letter to Creative Commons, 559 Nathan Abbott Way,
@@ -64,6 +61,7 @@
</dl></dd>
<dt><span class="section"><a href="spade.basic.spadeplatform.html">The
SPADE Agent Platform</a></span></dt>
<dt><span class="section"><a href="spade.basic.spadelibrary.html">The
SPADE Agent Library</a></span></dt>
+<dt><span class="section"><a
href="spade.basic.features.html"></a></span></dt>
<dt><span class="section"><a href="spade.basic.whatsnext.html">What's
Next?</a></span></dt>
</dl></dd>
<dt><span class="chapter"><a href="spade.quickstart.html">2. Quickstart
Guide</a></span></dt>
@@ -105,13 +103,12 @@
<dt><span class="section"><a href="spade.bdi.plans.html">Plans and
Services</a></span></dt>
<dt><span class="section"><a
href="spade.bdi.goals.html">Goals</a></span></dt>
<dt><span class="section"><a href="spade.bdi.running.html">BDI in
action</a></span></dt>
-<dt><span class="section"><a href="spade.bdi.future.html">Future
Work</a></span></dt>
</dl></dd>
</dl>
</div>
<div class="list-of-figures">
<p><b>List of Figures</b></p>
-<dl><dt>6.1. <a href="spade.advanced.fsm.html#id36145872">A Finite-State
Machine</a>
+<dl><dt>6.1. <a href="spade.advanced.fsm.html#idp33786896">A Finite-State
Machine</a>
</dt></dl>
</div>
</div>
=======================================
--- /trunk/doc/manual/html/spade.advanced.eventbehaviour.html Tue Jun 22
08:25:50 2010
+++ /trunk/doc/manual/html/spade.advanced.eventbehaviour.html Mon Nov 12
09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Event Behaviours</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.advanced.html" title="Chapter 6. Advanced
Behaviour Types">
<link rel="prev" href="spade.advanced.fsm.html" title="The
Finite-State-Machine">
@@ -23,7 +23,7 @@
</table>
<hr>
</div>
-<div class="section" title="Event Behaviours">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.advanced.eventbehaviour"></a>Event
Behaviours</h2></div></div></div>
<p>
=======================================
--- /trunk/doc/manual/html/spade.advanced.fsm.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.advanced.fsm.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>The Finite-State-Machine</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.advanced.html" title="Chapter 6. Advanced
Behaviour Types">
<link rel="prev" href="spade.advanced.html" title="Chapter 6. Advanced
Behaviour Types">
@@ -23,14 +23,14 @@
</table>
<hr>
</div>
-<div class="section" title="The Finite-State-Machine">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.advanced.fsm"></a>The
Finite-State-Machine</h2></div></div></div>
<p>
A Finite-State-Machine (or automaton) is a structure used to make
state-based programming (see <a class="ulink"
href="http://en.wikipedia.org/wiki/Finite-state_machine"
target="_top">http://en.wikipedia.org/wiki/Finite-state_machine</a>). SPADE
supports this structure by means of the FSM behaviour.
</p>
<div class="figure">
-<a name="id36145872"></a><p class="title"><b>Figure 6.1. A Finite-State
Machine</b></p>
+<a name="idp33786896"></a><p class="title"><b>Figure 6.1. A Finite-State
Machine</b></p>
<div class="figure-contents"><div class="mediaobject" align="center"><img
src="images/fsm.png" align="middle" alt="A Finite-State
Machine"></div></div>
</div>
<br class="figure-break"><p>
=======================================
--- /trunk/doc/manual/html/spade.advanced.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.advanced.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Chapter 6. Advanced Behaviour Types</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="index.html" title="SPADE User's Manual">
<link rel="prev" href="ch05s03.html" title="What's next">
@@ -23,9 +23,9 @@
</table>
<hr>
</div>
-<div class="chapter" title="Chapter 6. Advanced Behaviour Types">
-<div class="titlepage"><div><div><h2 class="title">
-<a name="spade.advanced"></a>Chapter 6. Advanced Behaviour
Types</h2></div></div></div>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="spade.advanced"></a>Chapter 6. Advanced Behaviour
Types</h1></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
=======================================
--- /trunk/doc/manual/html/spade.basic.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.basic.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Chapter 1. Basic Concepts</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="index.html" title="SPADE User's Manual">
<link rel="prev" href="spade.foreword.html" title="Foreword">
@@ -23,9 +23,9 @@
</table>
<hr>
</div>
-<div class="chapter" title="Chapter 1. Basic Concepts">
-<div class="titlepage"><div><div><h2 class="title">
-<a name="spade.basic"></a>Chapter 1. Basic Concepts</h2></div></div></div>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="spade.basic"></a>Chapter 1. Basic Concepts</h1></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
@@ -38,6 +38,7 @@
</dl></dd>
<dt><span class="section"><a href="spade.basic.spadeplatform.html">The
SPADE Agent Platform</a></span></dt>
<dt><span class="section"><a href="spade.basic.spadelibrary.html">The
SPADE Agent Library</a></span></dt>
+<dt><span class="section"><a
href="spade.basic.features.html"></a></span></dt>
<dt><span class="section"><a href="spade.basic.whatsnext.html">What's
Next?</a></span></dt>
</dl>
</div>
@@ -45,7 +46,7 @@
If you're new to multi-agent systems, this chapter is definitely for
you. We begin with a discussion of general multi-agent systems
concepts, instant messaging and Jabber, and work our way into the
- specific ideas behind SPADE.</p>
+ specific ideas behind SPADE.</p>
</div>
<div class="navfooter">
<hr>
=======================================
--- /trunk/doc/manual/html/spade.basic.im.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.basic.im.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Instant Messaging</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.basic.html" title="Chapter 1. Basic Concepts">
<link rel="prev" href="spade.basic.mas.html" title="Multi-Agent Systems">
@@ -23,98 +23,98 @@
</table>
<hr>
</div>
-<div class="section" title="Instant Messaging">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.basic.im"></a>Instant Messaging</h2></div></div></div>
<p>Instant messaging (IM) is a form of real-time communication between two
or more
- people based on typed text. The text is conveyed via computers connected
over a network
- such as the Internet.</p>
+ people based on typed text. The text is conveyed via computers
connected over a network
+ such as the Internet.</p>
<p>Instant messaging offers real-time communication and allows easy
collaboration,
- which might be considered more akin to genuine conversation than
email's "letter" format.
- In contrast to e-mail, the parties know whether the peer is available.
Most systems allow
- the user to set an online status or away message so peers are notified
when the user is available,
- busy, or away from the computer. This is called the <span
class="emphasis"><em>presence</em></span> of the user.
- On the other hand, people are not forced to reply immediately
- to incoming messages. For this reason, some people consider
communication via instant messaging
- to be less intrusive than communication via phone. However, some systems
allow the sending of
- messages to people not currently logged on (offline messages), thus
removing much of the difference
- between IM and email.</p>
+ which might be considered more akin to genuine conversation than
email's "letter" format.
+ In contrast to e-mail, the parties know whether the peer is
available. Most systems allow
+ the user to set an online status or away message so peers are
notified when the user is available,
+ busy, or away from the computer. This is called the <span
class="emphasis"><em>presence</em></span> of the user.
+ On the other hand, people are not forced to reply immediately
+ to incoming messages. For this reason, some people consider
communication via instant messaging
+ to be less intrusive than communication via phone. However, some
systems allow the sending of
+ messages to people not currently logged on (offline messages),
thus removing much of the difference
+ between IM and email.</p>
<p>Instant messaging allows instantaneous communication between a number
of parties simultaneously,
- by transmitting information quickly and efficiently, featuring immediate
receipt of acknowledgment
- or reply. In certain cases IM involves additional features, which make
it even more popular,
- i.e. to see the other party, e.g. by using web-cams, or to talk directly
for free over the internet.</p>
-<div class="section" title="XMPP and Jabber">
+ by transmitting information quickly and efficiently, featuring
immediate receipt of acknowledgment
+ or reply. In certain cases IM involves additional features, which
make it even more popular,
+ i.e. to see the other party, e.g. by using web-cams, or to talk
directly for free over the internet.</p>
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="spade.basic.im.jabber"></a>XMPP and Jabber</h3></div></div></div>
<p>Extensible Messaging and Presence Protocol (XMPP) is an open,
XML-inspired protocol for near-real-time,
- extensible instant messaging (IM) and presence information (a.k.a.
buddy lists). It is the core protocol
- of the Jabber Instant Messaging and Presence technology. The protocol
is built to be extensible and other
- features such as Voice over IP and file transfer signaling have been
added.</p>
+ extensible instant messaging (IM) and presence information
(a.k.a. buddy lists). It is the core protocol
+ of the Jabber Instant Messaging and Presence technology. The
protocol is built to be extensible and other
+ features such as Voice over IP and file transfer signaling
have been added.</p>
<p>Unlike most instant messaging protocols, XMPP is based on open
standards. Like e-mail, it is an open
- system where anyone who has a domain name and a suitable Internet
connection can run their own Jabber
- server and talk to users on other servers. The standard server
implementations and many clients are also
- free and open source software.</p>
+ system where anyone who has a domain name and a suitable
Internet connection can run their own Jabber
+ server and talk to users on other servers. The standard server
implementations and many clients are also
+ free and open source software.</p>
<p>The Internet Engineering Task Force (IETF) formed an XMPP Working Group
in 2002 to formalize the core
- protocols as an IETF Instant Messaging and presence technology. The
four specifications produced by the
- XMPP WG were approved by the IESG as Proposed Standards in 2004. RFC
3920 and RFC 3921 are currently
- undergoing revisions in preparation for advancing them to Draft
Standard within the Internet Standards Process.
- The XMPP Standards Foundation (formerly the Jabber Software Foundation)
is active in developing open XMPP extensions.</p>
+ protocols as an IETF Instant Messaging and presence
technology. The four specifications produced by the
+ XMPP WG were approved by the IESG as Proposed Standards in
2004. RFC 3920 and RFC 3921 are currently
+ undergoing revisions in preparation for advancing them to
Draft Standard within the Internet Standards Process.
+ The XMPP Standards Foundation (formerly the Jabber Software
Foundation) is active in developing open XMPP extensions.</p>
<p>XMPP-based software is deployed on thousands of servers across the
Internet and by 2003 was used
- by over ten million people worldwide, according to the XMPP Standards
Foundation.[1] Popular commercial
- servers include the <a class="ulink"
href="http://www.gizmoproject.com/" target="_top">Gizmo Project</a>.
- Popular client applications include the freeware clients offered by
- Google and the Gizmo Project, multi-protocol instant messengers such as
- <a class="ulink" href="http://www.apple.com/ichat/"
target="_top">iChat</a> and
- <a class="ulink" href="http://www.pidgin.im/" target="_top">Pidgin</a>
(formerly Gaim),
- and free dedicated clients such as <a class="ulink"
href="http://psi-im.org" target="_top">Psi</a>.
- <a class="ulink" href="http://www.google.com/talk/"
target="_top">Google Talk</a> provides XMPP gateways to its service.</p>
-<div class="section" title="XMPP and Jabber Features">
+ by over ten million people worldwide, according to the XMPP
Standards Foundation.[1] Popular commercial
+ servers include the <a class="ulink"
href="http://www.gizmoproject.com/" target="_top">Gizmo Project</a>.
+ Popular client applications include the freeware clients
offered by
+ Google and the Gizmo Project, multi-protocol instant
messengers such as
+ <a class="ulink" href="http://www.apple.com/ichat/"
target="_top">iChat</a> and
+ <a class="ulink" href="http://www.pidgin.im/"
target="_top">Pidgin</a> (formerly Gaim),
+ and free dedicated clients such as <a class="ulink"
href="http://psi-im.org" target="_top">Psi</a>.
+ <a class="ulink" href="http://www.google.com/talk/"
target="_top">Google Talk</a> provides XMPP gateways to its service.</p>
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="spade.basic.im.jabber.features"></a>XMPP and Jabber
Features</h4></div></div></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type:
disc; ">
<li class="listitem"><p><span class="bold"><strong>Open, public, and
free.</strong></span>
-
- The Jabber protocol is open, public, free and well-documented, as
opposed to other popular IM systems.
- The XMPP technology is well-documented and public by means of several
RFC standard documents developed
- by the Jabber Software Foundation. Any individual or organization can
make use of XMPP technologies
- without having to pay royalties, licenses, etc ...</p></li>
+
+ The Jabber protocol is open, public, free and
well-documented, as opposed to other popular IM systems.
+ The XMPP technology is well-documented and public by means
of several RFC standard documents developed
+ by the Jabber Software Foundation. Any individual or
organization can make use of XMPP technologies
+ without having to pay royalties, licenses, etc ...</p></li>
<li class="listitem"><p><span
class="bold"><strong>Asynchronous.</strong></span>
-
- A Jabber server guaranties delivery of messages while the destination
client is online. When a client goes
- offline, the Jabber server stores and forwards the message to a client
when the client reconnects.
- This feature, apart from being useful in the case of messages between
humans, helps with the fact that
- Jabber can be used as an architecture that enables systems to talk
with other systems.
+
+ A Jabber server guaranties delivery of messages while the
destination client is online. When a client goes
+ offline, the Jabber server stores and forwards the message
to a client when the client reconnects.
+ This feature, apart from being useful in the case of
messages between humans, helps with the fact that
+ Jabber can be used as an architecture that enables systems
to talk with other systems.

- Consider a scenario with a client that interacts via Jabber with a
command control, sends commands, and
- receives responses. In this scenario, even thought the client goes
offline, the system guarantees that
- the response from the command control is stored and sent to the client
when the client goes online again.</p></li>
+ Consider a scenario with a client that interacts via
Jabber with a command control, sends commands, and
+ receives responses. In this scenario, even thought the
client goes offline, the system guarantees that
+ the response from the command control is stored and sent
to the client when the client goes online again.</p></li>
<li class="listitem"><p><span
class="bold"><strong>Decentralized.</strong></span>
-
- By definition, Jabber is decentralized. Therefore, a Jabber central
server that provides the service to
- everybody does not exist. Jabber is a servers network that is
independent but simultaneously interconnected.
- As a result, anyone can run their own Jabber server, creating networks
and sub-networks that do not depend
- on a central backbone and add it as a component of the agent
architecture.
-
- A user can choose a server that is trusted by her. She is not forced
to use a server that generates suspicion.
- She may use a server provided by a commercial company of her trust
(like her bank or univertity), the one of
- her employer, etc ... A user can even choose to set up her own Jabber
server at home.</p></li>
+
+ By definition, Jabber is decentralized. Therefore, a
Jabber central server that provides the service to
+ everybody does not exist. Jabber is a servers network that
is independent but simultaneously interconnected.
+ As a result, anyone can run their own Jabber server,
creating networks and sub-networks that do not depend
+ on a central backbone and add it as a component of the
agent architecture.
+
+ A user can choose a server that is trusted by her. She is
not forced to use a server that generates suspicion.
+ She may use a server provided by a commercial company of
her trust (like her bank or univertity), the one of
+ her employer, etc ... A user can even choose to set up her
own Jabber server at home.</p></li>
<li class="listitem"><p><span class="bold"><strong>Secure.</strong></span>
-
- As with all other network services (e.g., HTTP, SMTP, and FTP),
security is an important concern with regard
- to the deployment of IM services based on Jabber technology. One
aspect of these services is the ability to
- enable connections between Jabber servers, thus taking advantage of
the "network effect" of existing Jabber
- servers on the Internet or on a company network.As specified in RFC
3920, the core transport
- layer for XMPP is an XML streaming protocol that makes it possible to
exchange fragments of XML between any
- two network endpoints. Authentication and channel encryption happen
at the XML streaming layer using the
- IETF-standard protocols for Simple Authentication and Security Layer
(SASL) and Transport Layer Security (TLS).
- The XMPP architecture is a pure client-server model, wherein clients
connect to servers and (optionally)
- servers connect to each other for inter-domain communications.</p></li>
+
+ As with all other network services (e.g., HTTP, SMTP, and
FTP), security is an important concern with regard
+ to the deployment of IM services based on Jabber
technology. One aspect of these services is the ability to
+ enable connections between Jabber servers, thus taking
advantage of the "network effect" of existing Jabber
+ servers on the Internet or on a company network.As
specified in RFC 3920, the core transport
+ layer for XMPP is an XML streaming protocol that makes it
possible to exchange fragments of XML between any
+ two network endpoints. Authentication and channel
encryption happen at the XML streaming layer using the
+ IETF-standard protocols for Simple Authentication and
Security Layer (SASL) and Transport Layer Security (TLS).
+ The XMPP architecture is a pure client-server model,
wherein clients connect to servers and (optionally)
+ servers connect to each other for inter-domain
communications.</p></li>
<li class="listitem"><p><span
class="bold"><strong>Extensible.</strong></span>
-
- Using the power of XML namespaces, anyone can build custom
functionality on top of the core protocol, as exemplified by the Jabber
Enhancement Proposals (JEPs) coordinated by the Jabber Software Foundation.
Jabber was designed from the beginning to be extended. A good example of
this are the changes and improvements that have gradually appeared in the
Jabber technology without breaking backward compatibilities. To mention
some: Support of SSL and GPG encryption; precise information on the state
of a message ('is being written', 'the contact has received it' or 'it has
been kept in the server'); multi-conference chat rooms (MUC) that allow
multiple users to interact simultaneously using virtual channels; a
cooperative online 'blackboard' to draw graphics and share multimedia
contents among the participants of a conversation (<a class="ulink"
href="http://hem.fyristorg.com/matben/" target="_top">The Coccinella</a>).
These extended functionalities do not require the Jabber servers to be
modified at all. They rely on the Jabber clients to implement the necessary
features to support them. Thus, in Jabber the power of extending
functionalities is in the client.</p></li>
+
+ Using the power of XML namespaces, anyone can build custom
functionality on top of the core protocol, as exemplified by the Jabber
Enhancement Proposals (JEPs) coordinated by the Jabber Software Foundation.
Jabber was designed from the beginning to be extended. A good example of
this are the changes and improvements that have gradually appeared in the
Jabber technology without breaking backward compatibilities. To mention
some: Support of SSL and GPG encryption; precise information on the state
of a message ('is being written', 'the contact has received it' or 'it has
been kept in the server'); multi-conference chat rooms (MUC) that allow
multiple users to interact simultaneously using virtual channels; a
cooperative online 'blackboard' to draw graphics and share multimedia
contents among the participants of a conversation (<a class="ulink"
href="http://hem.fyristorg.com/matben/" target="_top">The Coccinella</a>).
These extended functionalities do not require the Jabber servers to be
modified at all. They rely on the Jabber clients to implement the necessary
features to support them. Thus, in Jabber the power of extending
functionalities is in the client.</p></li>
<li class="listitem"><p><span
class="bold"><strong>Flexible.</strong></span>
-
- The most common misconception about Jabber is that it is solely for
IM. Jabber is more than a bridge to other IM systems or a set of protocols.
IM is just one of the countless ways that an XML-based messaging technology
such as Jabber's can be applied. Jabber is a flexible and extensible
client/server architecture that routes XML data between clients and
services, which plug into Jabber servers as components. The original and
core set of components provide the IM features (and support services) that
have been discussed. The XML structures that make up the Jabber protocol
are split into top-level tags (also referred to as elements). These tags do
not necessarily carry human-generated IM message content; as long as the
resulting XML is well-formed, anything goes. Furthermore, the Jabber
protocol design makes use of an XML feature that allows total flexibility
for extensions, called namespaces. Bearing this in mind, it is clear that
Jabber can be deployed to provide solutions far beyond the IM space as well
as within it. Jabber applications beyond IM include network management,
content syndication, collaboration tools, file sharing, gaming, remote
systems monitoring and, now, agent communication.</p></li>
+
+ The most common misconception about Jabber is that it is
solely for IM. Jabber is more than a bridge to other IM systems or a set of
protocols. IM is just one of the countless ways that an XML-based messaging
technology such as Jabber's can be applied. Jabber is a flexible and
extensible client/server architecture that routes XML data between clients
and services, which plug into Jabber servers as components. The original
and core set of components provide the IM features (and support services)
that have been discussed. The XML structures that make up the
Jabber protocol are split into top-level tags (also referred to as
elements). These tags do not necessarily carry human-generated IM message
content; as long as the resulting XML is well-formed, anything goes.
Furthermore, the Jabber protocol design makes use of an XML feature that
allows total flexibility for extensions, called namespaces. Bearing this in
mind, it is clear that Jabber can be deployed to provide solutions far
beyond the IM space as well as within it. Jabber applications beyond IM
include network management, content syndication, collaboration tools, file
sharing, gaming, remote systems monitoring and, now, agent
communication.</p></li>
</ul></div>
</div>
</div>
=======================================
--- /trunk/doc/manual/html/spade.basic.mas.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.basic.mas.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Multi-Agent Systems</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.basic.html" title="Chapter 1. Basic Concepts">
<link rel="prev" href="spade.basic.html" title="Chapter 1. Basic Concepts">
@@ -23,54 +23,54 @@
</table>
<hr>
</div>
-<div class="section" title="Multi-Agent Systems">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.basic.mas"></a>Multi-Agent Systems</h2></div></div></div>
<p>A multi-agent system (MAS) is a system composed of several
- software agents, collectively capable of reaching goals that are
- difficult to achieve by an individual agent or monolithic system.</p>
+ software agents, collectively capable of reaching goals that are
+ difficult to achieve by an individual agent or monolithic
system.</p>
<p>The exact nature of the agents is a matter of some controversy.
- They are sometimes claimed to be autonomous. For example a household
- floor cleaning robot can be autonomous in that it is dependent on a
- human operator only to start it up. On the other hand, in practice,
- some agents are under active human supervision, becoming interdependent
- systems.</p>
+ They are sometimes claimed to be autonomous. For example a
household
+ floor cleaning robot can be autonomous in that it is dependent on a
+ human operator only to start it up. On the other hand, in practice,
+ some agents are under active human supervision, becoming
interdependent
+ systems.</p>
<p>MAS systems are also referred to as "self-organized systems" as they
tend
- to find the best solution for their problems "without intervention".
There is
- high similarity here to physical phenomena, such as energy minimizing,
where
- physical objects tend to reach the lowest energy possible, within the
physical
- constrained world.</p>
+ to find the best solution for their problems "without
intervention". There is
+ high similarity here to physical phenomena, such as energy
minimizing, where
+ physical objects tend to reach the lowest energy possible, within
the physical
+ constrained world.</p>
<p>The main feature which is achieved when developing MAS systems
- is flexibility, since a MAS system can be added to, modified and
reconstructed,
- without the need for detailed rewriting of the application. These
systems also
- tend to be rapidly self-recovering and failure proof, usually due to the
heavy
- redundancy of components and the self managed features, referred to,
above.</p>
-<div class="section" title="Kickin'it FIPA style">
+ is flexibility, since a MAS system can be added to, modified and
reconstructed,
+ without the need for detailed rewriting of the application. These
systems also
+ tend to be rapidly self-recovering and failure proof, usually due
to the heavy
+ redundancy of components and the self managed features, referred
to, above.</p>
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="spade.basic.mas.fipa"></a>Kickin'it FIPA
style</h3></div></div></div>
<p>In order to prevent the proliferation of incompatible agent systems and
to promote
- the agent-based technology and the interoperability of its standards
with other technologies,
- the Foundation for Intelligent Physical Agents (FIPA) was formed. It is
an IEEE Computer
- Society standards organization.</p>
+ the agent-based technology and the interoperability of its
standards with other technologies,
+ the Foundation for Intelligent Physical Agents (FIPA) was
formed. It is an IEEE Computer
+ Society standards organization.</p>
<p>The FIPA has produced a set of documents (called "FIPA Specifications")
that together
- conform the modern standard (or HOW-TO) in terms of agent technology.
It starts with the definition
- of the agent platform, the "home" of the agents. It is the environment
where the agents are placed
- and where their activities are performed. The software foundation for a
MAS-based solution and
- the <span class="emphasis"><em>network server</em></span> they connect
to.</p>
+ conform the modern standard (or HOW-TO) in terms of agent
technology. It starts with the definition
+ of the agent platform, the "home" of the agents. It is the
environment where the agents are placed
+ and where their activities are performed. The software
foundation for a MAS-based solution and
+ the <span class="emphasis"><em>network server</em></span> they
connect to.</p>
<p>The FIPA defines a model for an agent platform and a communication
language for the agents.
- All the platforms that want to be FIPA-compliant should follow this
model and understand the
- language, and SPADE is no exception. The compliance requires basically
four features:</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+ All the platforms that want to be FIPA-compliant should follow
this model and understand the
+ language, and SPADE is no exception. The compliance requires
basically four features:</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type:
disc; ">
<li class="listitem"><p>An Agent Communication Channel (ACC). A mechanism
which allows the agents (and the platform itself)
- to communicate with one another.</p></li>
+ to communicate with one another.</p></li>
<li class="listitem"><p>An Agent Management System (AMS). A way for the
agents to be registered in the platform and to
- be reachable for contact (kind of a <span class="emphasis"><em>White
Pages</em></span> service).</p></li>
+ be reachable for contact (kind of a <span
class="emphasis"><em>White Pages</em></span> service).</p></li>
<li class="listitem"><p>A Directory Facilitator (DF), which is a kind of
public service in which agents publish the
- services they offer, something akin of a <span
class="emphasis"><em>Yellow Pages</em></span> service.</p></li>
+ services they offer, something akin of a <span
class="emphasis"><em>Yellow Pages</em></span> service.</p></li>
<li class="listitem"><p>Support for the FIPA Agent Communication Language
(ACL), which is a common language for all
- agents to communicate with. Essentially, it is presented in a couple
of flavors: one based on a
- Lisp-like syntax environment (using an obscene amount of parenthesis),
and a clear, pure, practical and
- beautiful syntax based on XML.</p></li>
+ agents to communicate with. Essentially, it is presented
in a couple of flavors: one based on a
+ Lisp-like syntax environment (using an obscene amount of
parenthesis), and a clear, pure, practical and
+ beautiful syntax based on XML.</p></li>
</ul></div>
<p>SPADE implements all these features (and a few others) and thus is a
FIPA-compliant platform.</p>
</div>
=======================================
--- /trunk/doc/manual/html/spade.basic.spadelibrary.html Tue Jun 22
08:25:50 2010
+++ /trunk/doc/manual/html/spade.basic.spadelibrary.html Mon Nov 12
09:28:31 2012
@@ -2,12 +2,12 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>The SPADE Agent Library</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.basic.html" title="Chapter 1. Basic Concepts">
<link rel="prev" href="spade.basic.spadeplatform.html" title="The SPADE
Agent Platform">
-<link rel="next" href="spade.basic.whatsnext.html" title="What's Next?">
+<link rel="next" href="spade.basic.features.html" title="">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<div class="navheader">
@@ -17,13 +17,13 @@
<td width="20%" align="left">
<a accesskey="p" href="spade.basic.spadeplatform.html">Prev</a> </td>
<th width="60%" align="center">Chapter 1. Basic Concepts</th>
-<td width="20%" align="right"> <a accesskey="n"
href="spade.basic.whatsnext.html">Next</a>
+<td width="20%" align="right"> <a accesskey="n"
href="spade.basic.features.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
-<div class="section" title="The SPADE Agent Library">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.basic.spadelibrary"></a>The SPADE Agent
Library</h2></div></div></div>
<p>The SPADE Agent Library is a module for the Python programming language
for building SPADE agents. It is a collection of classes, functions and
tools for creating new SPADE agents that can work with the SPADE Agent
Platform. Using it is the best way to start developing your own SPADE
agents. In the future, we would like to offer bindings of the SPADE Agent
Library for more programming languages, like Java or C#, but for now only
Python is supported.</p>
@@ -36,13 +36,13 @@
<td width="40%" align="left">
<a accesskey="p" href="spade.basic.spadeplatform.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u"
href="spade.basic.html">Up</a></td>
-<td width="40%" align="right"> <a accesskey="n"
href="spade.basic.whatsnext.html">Next</a>
+<td width="40%" align="right"> <a accesskey="n"
href="spade.basic.features.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">The SPADE Agent Platform </td>
<td width="20%" align="center"><a accesskey="h"
href="index.html">Home</a></td>
-<td width="40%" align="right" valign="top"> What's Next?</td>
+<td width="40%" align="right" valign="top"> </td>
</tr>
</table>
</div>
=======================================
--- /trunk/doc/manual/html/spade.basic.spadeplatform.html Tue Jun 22
08:25:50 2010
+++ /trunk/doc/manual/html/spade.basic.spadeplatform.html Mon Nov 12
09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>The SPADE Agent Platform</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.basic.html" title="Chapter 1. Basic Concepts">
<link rel="prev" href="spade.basic.im.html" title="Instant Messaging">
@@ -23,7 +23,7 @@
</table>
<hr>
</div>
-<div class="section" title="The SPADE Agent Platform">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.basic.spadeplatform"></a>The SPADE Agent
Platform</h2></div></div></div>
<p>Simply put, SPADE is an agent platform based on the XMPP/Jabber
technology. This technology offers by itself many features and facilities
that ease the construction of MAS, such as an existing communication
channel, the concepts of users (agents) and servers (platforms) and an
extensible communication protocol based on XML, just like FIPA-ACL. Many
other agent platforms exist, but SPADE is the first to base its roots on
the XMPP technology.</p>
=======================================
--- /trunk/doc/manual/html/spade.basic.whatsnext.html Tue Jun 22 08:25:50
2010
+++ /trunk/doc/manual/html/spade.basic.whatsnext.html Mon Nov 12 09:28:31
2012
@@ -2,11 +2,11 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>What's Next?</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.basic.html" title="Chapter 1. Basic Concepts">
-<link rel="prev" href="spade.basic.spadelibrary.html" title="The SPADE
Agent Library">
+<link rel="prev" href="spade.basic.features.html" title="">
<link rel="next" href="spade.quickstart.html" title="Chapter 2. Quickstart
Guide">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
@@ -15,7 +15,7 @@
<tr><th colspan="3" align="center">What's Next?</th></tr>
<tr>
<td width="20%" align="left">
-<a accesskey="p" href="spade.basic.spadelibrary.html">Prev</a> </td>
+<a accesskey="p" href="spade.basic.features.html">Prev</a> </td>
<th width="60%" align="center">Chapter 1. Basic Concepts</th>
<td width="20%" align="right"> <a accesskey="n"
href="spade.quickstart.html">Next</a>
</td>
@@ -23,7 +23,7 @@
</table>
<hr>
</div>
-<div class="section" title="What's Next?">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.basic.whatsnext"></a>What's Next?</h2></div></div></div>
<p>If you want to get your hands dirty and start using SPADE right now,
head on to the next chapter where a Quickstart Guide awaits you. However if
you wish to learn more about SPADE and see how deep the rabbit hole goes,
you can go directly to chapter XX.</p>
@@ -33,13 +33,13 @@
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
-<a accesskey="p" href="spade.basic.spadelibrary.html">Prev</a> </td>
+<a accesskey="p" href="spade.basic.features.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u"
href="spade.basic.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n"
href="spade.quickstart.html">Next</a>
</td>
</tr>
<tr>
-<td width="40%" align="left" valign="top">The SPADE Agent Library </td>
+<td width="40%" align="left" valign="top"> </td>
<td width="20%" align="center"><a accesskey="h"
href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> Chapter 2. Quickstart
Guide</td>
</tr>
=======================================
--- /trunk/doc/manual/html/spade.basicagents.agentmodel.communication.html
Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.basicagents.agentmodel.communication.html
Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Agent Communication: Sending and Receiving Messages</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.basicagents.html" title="Chapter 4. Basic
agents">
<link rel="prev" href="spade.basicagents.behav.html" title="An agent with
a behavior">
@@ -23,7 +23,7 @@
</table>
<hr>
</div>
-<div class="section" title="Agent Communication: Sending and Receiving
Messages">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.basicagents.agentmodel.communication"></a>Agent
Communication: Sending and Receiving Messages</h2></div></div></div>
<p>As you know, messages are the basis of every MAS. They are the centre
of the whole <span class="emphasis"><em>"computing as
interaction"</em></span> paradigm in which MAS are based. So it is very
important to understand which facilities are present in the SPADE Agent
Library to work with agent messages.</p>
@@ -51,7 +51,7 @@
self.msg = spade.ACLMessage.ACLMessage() # Instantiate the message
self.msg.setPerformative("inform") # Set the "inform" FIPA
performative
self.msg.setOntology("myOntology") # Set the ontology of the
message content
- self.msg.setLanguage("English") # Set the language of the
message content
+ self.msg.setLanguage("OWL-S") # Set the language of the
message content
self.msg.addReceiver(receiver) # Add the message receiver
self.msg.setContent("Hello World") # Set the message content

@@ -69,7 +69,7 @@
</pre>
<p>The previous example is also an opportunity to introduce the <code
class="literal">myAgent</code> attribute that can be used in any behaviour.
It is a reference to the agent that holds the behaviour and thus it can be
used as a shortcut to access any method or attribute the agent object has.
In this particular case, the command <code
class="literal">self.myAgent.send(self.msg)</code> is accessing the <code
class="literal">send</code> method of the agent through the <code
class="literal">myAgent</code> shortcut.</p>
<p>There are two basic methods in message communication: <code
class="literal">send</code> , which you already know, and <code
class="literal">_receive</code> , which, as its name says, serves the
purpose of receiving a message. At any given moment, a behaviour can make
use of the <code class="literal">_receive</code> method in order to receive
a message.</p>
-<div class="note" title="Regarding send and _receive" style="margin-left:
0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Regarding
send and _receive">
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table
border="0" summary="Note: Regarding send and _receive">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]"
src="images/note.png"></td>
<th align="left">Regarding <code class="literal">send</code> and <code
class="literal">_receive</code>
@@ -77,7 +77,7 @@
</tr>
<tr><td align="left" valign="top"><p><span
class="bold"><strong>WARNING:</strong></span> Please take note that whereas
<code class="literal">send</code> is a method of the agent, <code
class="literal">_receive</code> is a method of the <span
class="bold"><strong>behaviour</strong></span>. This difference is very
important. All the behaviours send messages the same way, but, as stated
earlier, every behaviour has its unique <span class="emphasis"><em>message
template</em></span> that specifies which kind of messages it may receive,
and thus, each behaviour uses its own <code class="literal">_receive</code>
method to receive its own messages.</p></td></tr>
</table></div>
-<div class="note" title="Regarding messages at initialization time"
style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0"
summary="Note: Regarding messages at initialization time">
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table
border="0" summary="Note: Regarding messages at initialization time">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]"
src="images/note.png"></td>
<th align="left">Regarding messages at initialization time</th>
=======================================
--- /trunk/doc/manual/html/spade.basicagents.agentmodel.html Tue Jun 22
08:25:50 2010
+++ /trunk/doc/manual/html/spade.basicagents.agentmodel.html Mon Nov 12
09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>The SPADE agent model</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.basicagents.html" title="Chapter 4. Basic
agents">
<link rel="prev" href="spade.basicagents.library.html" title="The SPADE
Agent Library">
@@ -23,26 +23,26 @@
</table>
<hr>
</div>
-<div class="section" title="The SPADE agent model">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.basicagents.agentmodel"></a>The SPADE agent
model</h2></div></div></div>
<p>The Agent Model is basically composed of a connection mechanism to the
platform, a message dispatcher, and a set of different behaviors that the
dispatcher gives the messages to. Every agent needs an identifier called
Jabber ID <span class="emphasis"><em>a.k.a.</em></span> <span
class="bold"><strong>JID</strong></span> and a valid password to establish
a connection with the platform.</p>
<p>The <span class="emphasis"><em>JID</em></span> (composed by a <span
class="bold"><strong>username</strong></span>, an <span
class="bold"><strong>@</strong></span>, and a <span
class="bold"><strong>server domain</strong></span>) will be the name that
identifies an agent in the platform, e.g. <code
class="literal">mya...@myprovider.com</code>. The agent address (which is
another important field on the Agent Identifier) would be the JID of the
platform's ACC (e.g. <code
class="literal">xmpp://acc.myprovider.com</code>). We have defined the
prefix <code class="literal">xmpp://</code> for the XMPP addresses.</p>
-<div class="section" title="Connection to the platform">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="spade.basicagents.agentmodel.connection"></a>Connection to the
platform</h3></div></div></div>
<p>Communications in SPADE are handled internally by means of the Jabber
protocol. This protocol has a mechanism to register and authenticate users
against a Jabber server. Since the SPADE platform includes a Jabber server
component, SPADE agents use the aforementioned mechanism to register in the
server as Jabber clients. After a succesful register, each agent holds an
open and persistent Jabber stream of communications with the platform. This
process is automatically triggered as part of the agent registration
process.</p>
</div>
-<div class="section" title="The message dispatcher">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="spade.basicagents.agentmodel.dispatcher"></a>The message
dispatcher</h3></div></div></div>
<p>Each SPADE agent has an internal message dispatcher component. This
message dispatcher acts as a mailman: when a message for the agent arrives,
it places it in the correct <span
class="emphasis"><em>"mailbox"</em></span> (more about that later); and
when the agent needs to send a message, the message dispatcher does the
job, putting it in the communication stream. The message dispatching is
done automatically by the SPADE Agent Library whenever a new message
arrives or is to be sent.</p>
</div>
-<div class="section" title="The behaviors">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="spade.basicagents.agentmodel.behaviours"></a>The
behaviors</h3></div></div></div>
<p>An agent can run serveral behaviors simultaneously. A <span
class="bold"><strong>behavior</strong></span> is a task that an agent can
execute using repeating patterns. SPADE provides some predefined behavior
types: Cyclic, One-Shot, Periodic, Time-Out, Finite State Machine and Event
Behavior. Those behavior types help to implement the different tasks that
an agent can perform. The kind of behaviors supported by a SPADE agent are
the following:</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type:
disc; ">
<li class="listitem"><p>Cyclic and Periodic behaviours are useful for
performing repetitive tasks.</p></li>
<li class="listitem"><p>One-Shot and Time-Out behaviors can be used to
perform casual tasks.</p></li>
<li class="listitem"><p>The Finite State Machine allows more complex
behaviors to be built.</p></li>
=======================================
--- /trunk/doc/manual/html/spade.basicagents.behav.html Tue Jun 22 08:25:50
2010
+++ /trunk/doc/manual/html/spade.basicagents.behav.html Mon Nov 12 09:28:31
2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>An agent with a behavior</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.basicagents.html" title="Chapter 4. Basic
agents">
<link rel="prev" href="spade.basicagents.first.html" title="My first SPADE
agent">
@@ -23,7 +23,7 @@
</table>
<hr>
</div>
-<div class="section" title="An agent with a behavior">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.basicagents.behav"></a>An agent with a
behavior</h2></div></div></div>
<p>Let's build a more functional agent, one that uses an actual behavior
to perform a task. As we stated earlier, the real programming of the SPADE
agents is done mostly in the behaviors. Let's see how.</p>
@@ -152,7 +152,7 @@
self.addBehaviour(b, None)

if __name__ == "__main__":
- a = MyAgent("ag...@thx1138.dsic.upv.es", "secret")
+ a = MyAgent("agent@localhost", "secret")
a.start()
</pre>
<p>Other behaviour types are <code
class="literal">spade.Behaviour.FSMBehaviour</code>, which represents a
Finite State Machine, and <code
class="literal">spade.Behaviour.EventBehaviour</code>, which is a special
type of behaviour set to be triggered after an event happens in the agent.
These are advanced types of behaviours and are covered in chapter 6.</p>
=======================================
--- /trunk/doc/manual/html/spade.basicagents.first.html Tue Jun 22 08:25:50
2010
+++ /trunk/doc/manual/html/spade.basicagents.first.html Mon Nov 12 09:28:31
2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>My first SPADE agent</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.basicagents.html" title="Chapter 4. Basic
agents">
<link rel="prev" href="spade.basicagents.agentmodel.html" title="The SPADE
agent model">
@@ -23,7 +23,7 @@
</table>
<hr>
</div>
-<div class="section" title="My first SPADE agent">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.basicagents.first"></a>My first SPADE
agent</h2></div></div></div>
<p>It's time for us to build our first SPADE agent. We'll assume that we
have a working SPADE platform at <code
class="literal">myhost.myprovider.com</code> with the standard
configuration. A basic SPADE agent is really a Python script that imports
the <code class="literal">spade</code> module and that uses the constructs
defined therein. For starters, fire up you favorite Python editor, create a
file called <code class="literal">myagent.py</code> and write this:</p>
=======================================
--- /trunk/doc/manual/html/spade.basicagents.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.basicagents.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Chapter 4. Basic agents</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="index.html" title="SPADE User's Manual">
<link rel="prev" href="spade.fundamental.platform.html" title="The Agent
Platform">
@@ -23,9 +23,9 @@
</table>
<hr>
</div>
-<div class="chapter" title="Chapter 4. Basic agents">
-<div class="titlepage"><div><div><h2 class="title">
-<a name="spade.basicagents"></a>Chapter 4. Basic
agents</h2></div></div></div>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="spade.basicagents"></a>Chapter 4. Basic
agents</h1></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
=======================================
--- /trunk/doc/manual/html/spade.basicagents.library.html Tue Jun 22
08:25:50 2010
+++ /trunk/doc/manual/html/spade.basicagents.library.html Mon Nov 12
09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>The SPADE Agent Library</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.basicagents.html" title="Chapter 4. Basic
agents">
<link rel="prev" href="spade.basicagents.html" title="Chapter 4. Basic
agents">
@@ -23,7 +23,7 @@
</table>
<hr>
</div>
-<div class="section" title="The SPADE Agent Library">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.basicagents.library"></a>The SPADE Agent
Library</h2></div></div></div>
<p>As stated earlier, the SPADE Agent Library is a software component to
ease and help the development of software agents that work with the SPADE
platform. It provides some classes, functions and data structures to help
the programmer easily deploy SPADE-based solutions in a
rapid-application-development fashion.</p>
=======================================
--- /trunk/doc/manual/html/spade.basicagents.whatsnext.html Tue Jun 22
08:25:50 2010
+++ /trunk/doc/manual/html/spade.basicagents.whatsnext.html Mon Nov 12
09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>What's next</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.basicagents.html" title="Chapter 4. Basic
agents">
<link rel="prev" href="spade.basicagents.agentmodel.communication.html"
title="Agent Communication: Sending and Receiving Messages">
@@ -23,7 +23,7 @@
</table>
<hr>
</div>
-<div class="section" title="What's next">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.basicagents.whatsnext"></a>What's
next</h2></div></div></div>
<p>In this chapter we have learned how to make SPADE agents with basic
functionality and, specially, how to set up behaviours and send and receive
messages. Coming up next we will learn how to make use of the facilities
the platform offers in order to contact agents and services.</p>
=======================================
--- /trunk/doc/manual/html/spade.bdi.future.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.bdi.future.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Future Work</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.bdi.html" title="Chapter 7. BDI Architecture
for SPADE Agents">
<link rel="prev" href="spade.bdi.running.html" title="BDI in action">
@@ -21,10 +21,9 @@
</table>
<hr>
</div>
-<div class="section" title="Future Work">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.bdi.future"></a>Future Work</h2></div></div></div>
-<p>En posteriores versiones del modelo BDI se introducirá la compilacion
automatica de planes utilizando la base de datos de servicios ofrecidos por
el conjunto de agentes de la plataforma. Para ello la plataforma
proporciona un agente deliberativo capaz de realizar una busqueda entre
todos los servicios disponibles y componer un plan on-line cuando entre el
conjunto de planes precompilados proporcionados por el agente no exista
ninguno capaz de cumplir el objetivo deseado.</p>
<p>In future versions of the BDI model we will introduce automatic Plan
compilation using the whole database of services offered by all the agents
in the platform. In order to do that, the platform will include a
deliberative agent able to make searches through all the available services
and compose a Plan on-the-fly whenever the set of pre-compiled Plans of an
agent is not enough to achieve the desired Goal. But that, my friends, is
another story</p>
</div>
<div class="navfooter">
=======================================
--- /trunk/doc/manual/html/spade.bdi.goals.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.bdi.goals.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Goals</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.bdi.html" title="Chapter 7. BDI Architecture
for SPADE Agents">
<link rel="prev" href="spade.bdi.plans.html" title="Plans and Services">
@@ -23,14 +23,27 @@
</table>
<hr>
</div>
-<div class="section" title="Goals">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.bdi.goals"></a>Goals</h2></div></div></div>
<p>Goals are instances of the <span
class="command"><strong>Goal</strong></span> class. Its constructor
receives as a parameter the expression of the Goal.</p>
<pre class="screen">
- g = Goal(expr("value(4)"))
- agent.addGoal(g)
- </pre>
+
+ g = Goal("Var(O1,1,Int)")
+ </pre>
+<p>When a goal is added, the BDIAgent will try to perform this goal by
invoking services. Once the goal is completed, the goalCompleted callback
is called to notify the agent.
+ </p>
+<pre class="screen">
+ $ def goalCompletedCB( goal ):
+ print "Goal completed!"
+
+ $ agent.saveFact("Value",0)
+
+ $ agent.setGoalCompletedCB( goalCompletedCB )
+
+ $ agent.addGoal( Goal("Var(Value,0,Int)") )
+ &gt; "Goal completed!"
+ </pre>
</div>
<div class="navfooter">
<hr>
=======================================
--- /trunk/doc/manual/html/spade.bdi.html Mon Nov 28 06:37:01 2011
+++ /trunk/doc/manual/html/spade.bdi.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Chapter 7. BDI Architecture for SPADE Agents</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="index.html" title="SPADE User's Manual">
<link rel="prev" href="spade.advanced.eventbehaviour.html" title="Event
Behaviours">
@@ -23,9 +23,9 @@
</table>
<hr>
</div>
-<div class="chapter" title="Chapter 7. BDI Architecture for SPADE Agents">
-<div class="titlepage"><div><div><h2 class="title">
-<a name="spade.bdi"></a>Chapter 7. BDI Architecture for SPADE
Agents</h2></div></div></div>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="spade.bdi"></a>Chapter 7. BDI Architecture for SPADE
Agents</h1></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
@@ -34,10 +34,9 @@
<dt><span class="section"><a href="spade.bdi.plans.html">Plans and
Services</a></span></dt>
<dt><span class="section"><a
href="spade.bdi.goals.html">Goals</a></span></dt>
<dt><span class="section"><a href="spade.bdi.running.html">BDI in
action</a></span></dt>
-<dt><span class="section"><a href="spade.bdi.future.html">Future
Work</a></span></dt>
</dl>
</div>
-<p>SPADE supports natively a BDI agent model based on the Goal Oriented
Computation paradigm. This chapter of the documentation will introduce the
BDI model and its use on the SPADE platform.</p>
+<p>SPADE supports natively a BDI agent model based on the Distributed Goal
Oriented Computing paradigm. This chapter of the documentation will
introduce the BDI model and its use on the SPADE platform.</p>
</div>
<div class="navfooter">
<hr>
=======================================
--- /trunk/doc/manual/html/spade.bdi.intro.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.bdi.intro.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>The SPADE BDI Agent Model</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.bdi.html" title="Chapter 7. BDI Architecture
for SPADE Agents">
<link rel="prev" href="spade.bdi.html" title="Chapter 7. BDI Architecture
for SPADE Agents">
@@ -23,24 +23,23 @@
</table>
<hr>
</div>
-<div class="section" title="The SPADE BDI Agent Model">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.bdi.intro"></a>The SPADE BDI Agent
Model</h2></div></div></div>
<p><span class="emphasis"><em>Michael Bratman's</em></span>BDI agent model
is based on 3 basic elements: <span
class="bold"><strong>Belief</strong></span>, <span
class="bold"><strong>Desire</strong></span> and <span
class="bold"><strong>Intention</strong></span> (you know, B-D-I).
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type:
disc; ">
<li class="listitem"><p>A Belief is an entry in the agent's knowledge
base. It represents what the agent "knows" about its environment.</p></li>
<li class="listitem"><p>Desires represent that which the agents wishes to
achieve. The instantiation of a Desire is a Goal.</p></li>
<li class="listitem"><p>Intentions represent the deliberative state of the
agent, that is, what the agent has decided to do in order to achieve its
goals. The Intentions in execution are Plans, that is, a sequence of
actions that the agent can execute in order to fulfill an
Intention.</p></li>
</ul></div>
<p>
</p>
-<p>The BDI implemented by SPADE is slightly different. We have tried to
develop a distributed BDI system using <span class="emphasis"><em>Service
Oriented Computation (SOC)</em></span> together with dynamic compilation of
services in SPADE, which we have called <span class="bold"><strong>Goal
Oriented Computation</strong></span>.</p>
-<p>Este modelo BDI utiliza los principios básicos del modelo BDI
tradicional de Michael Bratman pero introduciendo un modelo más complejo de
intenciones.
- En el modelo BDI de SPADE aparecen los siguientes elementos:</p>
+<p>The BDI implemented by SPADE is slightly different. We have tried to
develop a distributed BDI system using <span class="emphasis"><em>Service
Oriented Computing (SOC)</em></span> together with dynamic compilation of
services in SPADE, which we have called <span
class="bold"><strong>Distributed Goal Oriented
Computing</strong></span>.</p>
<p>This BDI model uses the same basic principles of the classic BDI model
from Bratman, but it introduces a more complex model for the Intentions.
- In SPADE's BDI model, the following elements appear:</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+
+ In the SPADE's BDI model, the following elements appear:</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type:
disc; ">
<li class="listitem"><p> <span
class="bold"><strong>Belief:</strong></span> An entry of knowledge in the
agent's KB. You can insert new knowledge, delete it and make queries to the
KB about it.</p></li>
<li class="listitem"><p> <span class="bold"><strong>Goals:</strong></span>
SPADE's BDI model does not differentiate Desires and Goals, there are only
Goals. When an agent expresses a Goal, it means that the agents wishes to
accomplish the expression contained in such Goal. When a goal is selected
for accomplishment, it becomes active.</p></li>
<li class="listitem"><p> <span
class="bold"><strong>Services:</strong></span> Given that SPADE's BDI model
is grounded on SOC, it is necessary to include a Service element into the
model. A Service is a method offered by the agent to the rest of the system
agents. Services can be composed into a sequence forming the Plans.
Services have in their description both a pre-condition (P) and a
post-condition (Q). The pre-condition P represents a state of knowledge
that must be present in order to execute the Service. The post-condition Q
represents the state of knowledge that the agent will achieve once the
Service has been invoked.</p></li>
=======================================
--- /trunk/doc/manual/html/spade.bdi.kb.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.bdi.kb.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>The Knowledge Base</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.bdi.html" title="Chapter 7. BDI Architecture
for SPADE Agents">
<link rel="prev" href="spade.bdi.intro.html" title="The SPADE BDI Agent
Model">
@@ -23,24 +23,98 @@
</table>
<hr>
</div>
-<div class="section" title="The Knowledge Base">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.bdi.kb"></a>The Knowledge Base</h2></div></div></div>
-<p>Accessing the KB is really simple. As said, you can add knowledge,
delete it, or make query for it.</p>
+<p>Each agent has a Knowledge Base where it stores its acquired knowledge
items. The technology to store these items can be selected from a set of
different prolog engines: <code class="literal">SWI-Prolog, XSB, Flora2,
Eclipse</code> and <code class="literal">SPARQL</code>. SPADE does also
support an internal Prolog engine, which is less powerful but has no
external requirements. This is the <code class="literal">SpadeKB</code>
engine, wich supports first-order logic.
+ </p>
+<p>Accessing the KB is really simple. As said, you can add knowledge,
delete it, or make queries.</p>
<pre class="screen">
- #Inserts a Knowledge
- agent.addBelieve(expr("value(1)"))
+ #First configure the KB for using SWI-Prolog. The default KB is
SpadeKB
+ $ agent.configureKB("SWI", None, "swipl") #third argument is the
path to the swipl executable

- #Deletes a Knowledge
- agent.removeBelieve(expr("value(2)"))
+ #Insert some knowledge items
+ $ agent.addBelieve( 'a(b,c)' )
+ $ agent.addBelieve( 'a(c,d)' )
+ $ agent.addBelieve( '( p(_X,_Y) :- a(_X,_Y) )' )
+ $ agent.addBelieve( '( p(_X,_Y) :- a(_X,_Z), p(_Z,_Y) )' )

- #Ask for a Knowledge
- agent.askBelieve(expr("value(1)"))
- True
+ #Ask for a Knowledge
+ $ agent.askBelieve( 'p(X,Y)' )
+ &gt; [{'Y': 'c', 'X': 'b'}, {'Y': 'd', 'X': 'c'},
{'Y': 'd', 'X': 'b'}]

- agent.askBelieve(expr("value(X)"))
- True
- </pre>
+ #Deletes a Knowledge
+ $ agent.removeBelieve( 'a(b,c)' )
+
+ #Check deletion
+ $ agent.askBelieve( 'p(X,Y)' )
+ &gt; [{'Y': 'd', 'X': 'c'}]
+
+ </pre>
+<pre class="screen">
+ #XSB
+ $ agent.configureKB("XSB", None, "xsb") #third argument is the
path to the xsb executable
+ $ agent.addBelieve( 'a(b,c)' )
+ $ agent.removeBelieve( 'a(c,d)' )
+ $ agent.askBelieve( 'p(X,Y)' )
+
+ #Flora2
+ $ agent.configureKB("Flora2", None, "runflora") #third argument is
the path to the flora2 executable
+ $ agent.addBelieve( 'a[ b-&gt;c ]' ) #Beware, Flora2 notation is
different
+ $ agent.removeBelieve( 'a[ b-&gt;c ]' )
+ $ agent.askBelieve( '?x[ ?y-&gt;?z ]' )
+
+ #Eclipse
+ $ agent.configureKB("ECLiPSe", None, "eclipse") #third argument is
the path to the eclipse executable
+ $ agent.addBelieve( 'a(b,c)' )
+ $ agent.askBelieve( 'p(X,Y)' )
+
+ #SPARQL
+ $ agent.configureKB("SPARQL", sentence=None,
path='http://dbpedia.org/sparql')
+ $ sparql_query = '''
+ PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
+ SELECT ?name
+ WHERE {
+ &lt;http://dbpedia.org/resource/Croatia&gt;
+ rdfs:name
+ ?name
+ }'''
+ $ result = agent.askBelieve(sparql_query)
+ $ for item in result:
+ assert item["name"] in ["Croatia","Republic of
Croatia","Republika Hrvatska"]
+
+ </pre>
+<p>
+ The SpadeKB is a FOL knowledge base, which is the default KB in SPADE.
This KB stores believes in the same format as the rest of types of KBs,
using <code class="literal">addBelieve, removeBelieve</code> and <code
class="literal">askBelieve</code>. But the SpadeKB has also the ability of
storing <span class="bold"><strong>Facts</strong></span> in the KB. This is
useful when you want to store variables with a name and a value. The types
of value currently supported are: integer, string, float, list and
dictionaries.
+ </p>
+<pre class="screen">
+ $ agent.saveFact("MyFact", 1000) #parameters are name and value
+ $ agent.getFact("MyFact")
+ &gt; 1000
+ $ agent.askBelieve("Var(MyFact,1000,Int)")
+ &gt; True
+
+ $ agent.saveFact("MyFloat",1.34)
+ $ agent.getFact("MyFloat")
+ &gt; 1.34
+
+ $
agent.saveFact("MyString","LoremIpsumAdHisScriptaBlanditPartiendo") #spaces
still not supported, sorry
+ $ agent.getFact("MyString")
+ &gt; 'LoremIpsumAdHisScriptaBlanditPartiendo'
+
+ $ agent.saveFact("MyList",[5,6,7,8])
+ $ agent.getFact("MyList")
+ &gt; [5,6,7,8]
+
+ $ agent.saveFact("MyDict",{'a':123,'b':456,789:"c"})
+ $ agent.getFact("MyDict")
+ &gt; {'a':123,'b':456,789:"c"}
+
+ $
agent.saveFact("MyMixedFact",{'a':[123.25],'b':[4,5,6],789:{'a':1,'b':2}})
+ $ agent.getFact("MyMixedFact")
+ &gt; {'a':[123.25],'b':[4,5,6],789:{'a':1,'b':2}}
+
+ </pre>
</div>
<div class="navfooter">
<hr>
=======================================
--- /trunk/doc/manual/html/spade.bdi.plans.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.bdi.plans.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Plans and Services</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.bdi.html" title="Chapter 7. BDI Architecture
for SPADE Agents">
<link rel="prev" href="spade.bdi.kb.html" title="The Knowledge Base">
@@ -23,24 +23,29 @@
</table>
<hr>
</div>
-<div class="section" title="Plans and Services">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.bdi.plans"></a>Plans and Services</h2></div></div></div>
-<p>In order to offer a Service, an agent must use the <span
class="command"><strong>Service</strong></span> class from the bdi module
in SPADE.
- The body of the Service is the <span
class="command"><strong>run</strong></span> method. Everything that the
Service must do has to be included in the <span
class="command"><strong>run</strong></span> method. The Service constructor
receives the pre-condition P and the post-condition Q as parameters.</p>
+<p>
+ Services in SPADE are offered by agents registered in the
system. These services, once are registered in the Directory Facilitator
(DF) can be invoked using the RPC facilities of SPADE.
+ </p>
<pre class="screen">
- class Serv1(Service):
- def run(self):
- self.addBelieve(expr("Value(1)"))
+ #This is the method executed when the service is invoked
+ def s1_method(Value):
+ return {"Myoutput1":1} #the return value is a dict containing
Facts in the form name:value

- agent.registerService(name="name", service=Serv1())
- </pre>
-<p>A Plan only needs a pre-condition P, a post-condition Q and a list of
Services. Dictionaries are used in order to define them:</p>
+ #Create the service profile
+ s = DF.Service(name="s1", owner=agent.getAID(),
inputs=["Value"],outputs=["O1"],P=["Var(Value,0,Int)"],Q=["Var(O1,1,Int)"])
+
+ #Finally register the service
+ agent.registerService(s, s1_method)
+ </pre>
+<p>A Plan is a sequence of services where each postcondition matches the
precondition of the next service. The plan has also a precondition (P) and
postcondition (Q) and a set of inputs and outputs:</p>
<pre class="screen">

- plan = {'P': expr("value(1)"),'Q':expr("value(4)"),
services:[s1,s2,s3,s4]}
- agent.addPlan(plan)
- </pre>
+
agent.addPlan(inputs=["Value"],outputs=["O2"],P=["Var(Value,0,Int)"],Q=["Var(O2,2,Int)"],
services=["s1","s2"])
+ </pre>
+<p>These are pre-compiled plans that the agent may have to improve the
plan search. However, SPADE agents have the ability of composing on-line
plans, with no need of creating pre-compiled plans.</p>
</div>
<div class="navfooter">
<hr>
=======================================
--- /trunk/doc/manual/html/spade.bdi.running.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.bdi.running.html Mon Nov 12 09:28:31 2012
@@ -2,12 +2,11 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>BDI in action</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.bdi.html" title="Chapter 7. BDI Architecture
for SPADE Agents">
<link rel="prev" href="spade.bdi.goals.html" title="Goals">
-<link rel="next" href="spade.bdi.future.html" title="Future Work">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<div class="navheader">
@@ -17,56 +16,74 @@
<td width="20%" align="left">
<a accesskey="p" href="spade.bdi.goals.html">Prev</a> </td>
<th width="60%" align="center">Chapter 7. BDI Architecture for SPADE
Agents</th>
-<td width="20%" align="right"> <a accesskey="n"
href="spade.bdi.future.html">Next</a>
-</td>
+<td width="20%" align="right"> </td>
</tr>
</table>
<hr>
</div>
-<div class="section" title="BDI in action">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.bdi.running"></a>BDI in action</h2></div></div></div>
<p>During the agent execution, classic SPADE behaviours can coexist with
the BDI model. Every time that a new Goal is introduced into the agent, it
will try to achieve it looking for a Plan that fits the task. All this work
happens in a completely transparent way for the user.</p>
<pre class="screen">
- import spade
- from spade.bdi import *

- agent = BDIAgent("b...@127.0.0.1","secret")
- agent.setDebugToScreen()
- agent.addBelieve(expr("Value(0)"))
+ import spade
+ from spade.bdi import *
+ from spade.DF import Service

- g = Goal(expr("Value(2)"))
+ def s1_method(Value):
+ return {"O1":1}

- class Serv1(Service):
- def run(self):
- print "Service 1 running"
- self.addBelieve(expr("Value(1)"))
- class Serv2(Service):
- def run(self):
- print "Service 2 running"
- self.addBelieve(expr("Value(2)"))
+ def s2_method(Myoutput1):
+ return {"O2":2}

- s1 = Serv1(P=expr("Value(0)"),Q=expr("Value(1)"))
- s2 = Serv2(P=expr("Value(1)"),Q=expr("Value(2)"))
+ def goalCompletedCB(goal):
+ agent.goalCompleted = True

- p = Plan(P=expr("Value(0)"),Q=expr("Value(2)"))
- p.appendService(s1)
- p.appendService(s2)
+ agent = BDIAgent("b...@127.0.0.1","secret")
+ s1 = Service(name="s1", owner=agent.getAID(),
inputs=["Value"],outputs=["O1"],P=["Var(Value,0,Int)"],Q=["Var(O1,1,Int)"])
+ s2 = Service(name="s2", owner=agent.getAID(),
inputs=["O1"],outputs=["O2"],P=["Var(O1,1,Int)"],Q=["Var(O2,2,Int)"])

- agent.addPlan(p)
- agent.addGoal(g)
+ agent.registerService(self.s1,s1_method)
+ agent.registerService(self.s2,s2_method)

- agent.start()
+ agent.goalCompleted = False

- import time
- try:
- while True:
- time.sleep(1)
- except:
- agent.stop()
+ agent.saveFact("Value",0)
+
+ agent.setGoalCompletedCB( goalCompletedCB )
+
+ agent.addGoal( Goal("Var(O1,1,Int)") )
+
+ agent.start()
+
+ import time
+ counter = 0
+ while not agent.goalCompleted and counter &lt; 10:
+ time.sleep(1)
+ counter+=1
+
+ $ agent.goalCompleted
+ &gt; True
+ $ agent.askBelieve( "Var(O1,1,Int)" )
+ &gt; True
+ $ agent.getFact("O1")
+ &gt; 1
+
+ agent.stop()
+ sys.exit(0)
+ </pre>
+<p>Unit tests are always a good source of documentation. In the <code
class="literal">bdiTestCase.py</code> you can find more examples of how to
create complex plans and multiple goals that are reached thanks to the
on-line planner of the BDIAgent.
+ You can also find more documentation in the following reference papers:
+
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type:
disc; ">
+<li class="listitem"><p><a class="ulink"
href="http://www.sciencedirect.com/science/article/pii/S0164121212000337"
target="_top">Distributed Goal-oriented Computing</a></p></li>
+<li class="listitem"><p><a class="ulink"
href="http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=5718856"
target="_top">A Goal-Oriented Execution Module Based on Agents</a></p></li>
+</ul></div>
+<p>

- sys.exit(0)
- </pre>
+ </p>
</div>
<div class="navfooter">
<hr>
@@ -75,13 +92,12 @@
<td width="40%" align="left">
<a accesskey="p" href="spade.bdi.goals.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u"
href="spade.bdi.html">Up</a></td>
-<td width="40%" align="right"> <a accesskey="n"
href="spade.bdi.future.html">Next</a>
-</td>
+<td width="40%" align="right"> </td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Goals </td>
<td width="20%" align="center"><a accesskey="h"
href="index.html">Home</a></td>
-<td width="40%" align="right" valign="top"> Future Work</td>
+<td width="40%" align="right" valign="top"> </td>
</tr>
</table>
</div>
=======================================
--- /trunk/doc/manual/html/spade.foreword.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.foreword.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Foreword</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="index.html" title="SPADE User's Manual">
<link rel="prev" href="index.html" title="SPADE User's Manual">
@@ -23,10 +23,10 @@
</table>
<hr>
</div>
-<div class="preface" title="Foreword">
+<div class="preface">
<div class="titlepage"><div>
-<div><h2 class="title">
-<a name="spade.foreword"></a>Foreword</h2></div>
+<div><h1 class="title">
+<a name="spade.foreword"></a>Foreword</h1></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Gustavo</span> <span class="surname">Aranda</span>
</h3></div></div>
=======================================
--- /trunk/doc/manual/html/spade.fundamental.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.fundamental.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Chapter 3. Fundamental Concepts</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="index.html" title="SPADE User's Manual">
<link rel="prev" href="spade.quickstart.installation.html"
title="Installation">
@@ -23,9 +23,9 @@
</table>
<hr>
</div>
-<div class="chapter" title="Chapter 3. Fundamental Concepts">
-<div class="titlepage"><div><div><h2 class="title">
-<a name="spade.fundamental"></a>Chapter 3. Fundamental
Concepts</h2></div></div></div>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="spade.fundamental"></a>Chapter 3. Fundamental
Concepts</h1></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl><dt><span class="section"><a
href="spade.fundamental.platform.html">The Agent
Platform</a></span></dt></dl>
=======================================
--- /trunk/doc/manual/html/spade.fundamental.platform.html Tue Jun 22
08:25:50 2010
+++ /trunk/doc/manual/html/spade.fundamental.platform.html Mon Nov 12
09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>The Agent Platform</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.fundamental.html" title="Chapter 3. Fundamental
Concepts">
<link rel="prev" href="spade.fundamental.html"
title="Chapter 3. Fundamental Concepts">
@@ -23,20 +23,20 @@
</table>
<hr>
</div>
-<div class="section" title="The Agent Platform">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.fundamental.platform"></a>The Agent
Platform</h2></div></div></div>
<p>As said in previous chapters, the agent platform is the environment
where the agents are deployed. Think of it both as the <span
class="emphasis"><em>"home"</em></span> of the agents and the main server
of a network from a distributed application. In our case, that platform is
SPADE, an agent platform based on the Jabber/XMPP protocols and
technology.</p>
<p>The SPADE platform is installed and executed on a host. That host
becomes the centre of the multi-agent system that we are going to build. In
order to properly deploy the SPADE platform, it needs to be configured
first to suit the host where it is going to be. Along with the SPADE
distribution comes a tool called <span
class="command"><strong>configure.py</strong></span> which is a script to
automatically configure SPADE for you. In most scenarios, the only
configuration you need to do for SPADE to work is to invoke this tool with
the desired hostname to use as the platform hostname. E.g:</p>
<pre class="screen">
-$ python configure.py myhost.myprovider.com
+$ configure.py myhost.myprovider.com
</pre>
<p>Then, SPADE will be configured to work as a platform serving at the
<span class="command"><strong>myhost.myprovider.com</strong></span>
domain.</p>
<p>Internally, the <span
class="command"><strong>configure.py</strong></span> script creates the
configuration files that SPADE needs to work. This configuration is stored
in the <span class="command"><strong>etc/</strong></span> subdirectory
inside the SPADE installation path.</p>
<p>After a successful configuration, you can try to run SPADE for the
first time. To do so, use the <span
class="command"><strong>runspade.py</strong></span> script that is provided
with the SPADE distribution. This script will launch the SPADE platform and
set it ready to start working with agents. You should see something along
the lines of:</p>
<pre class="screen">
-$ python runspade.py
-SPADE 2.0 &lt;gus...@gmail.com&gt; - http://spade2.googleprojects.com
+$ runspade.py
+SPADE 2.1 &lt;gus...@gmail.com&gt; - http://spade2.googleprojects.com
Starting SPADE...... [done]
</pre>
<p>You may also see some warnings and additional messages while the
platform is starting. That's fine, we will discuss them later. You are now
ready to start loading agents into the platform.</p>
=======================================
--- /trunk/doc/manual/html/spade.platform.ams.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.platform.ams.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>The SPADE Agent Management System (AMS)</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.platform.html" title="Chapter 5. Platform
services">
<link rel="prev" href="spade.platform.html" title="Chapter 5. Platform
services">
@@ -23,7 +23,7 @@
</table>
<hr>
</div>
-<div class="section" title="The SPADE Agent Management System (AMS)">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.platform.ams"></a>The SPADE Agent Management System
(AMS)</h2></div></div></div>
<p>The SPADE AMS is our implementation of the standard FIPA AMS component
to manage, identify and search for agents in the platform. It is a special
platform agent that is always present in all SPADE platforms and that is
started automatically whenever the platform is initiated. It manages the
registration of the agents in the platform. So, when you start one of your
agents and the registration process is autmatically taken care of by the
SPADE Agent Library, it is the AMS who is on "the other side of the
counter", managing the registry of agents. It also gets to de-register an
agent once its life cycle has ended.</p>
=======================================
--- /trunk/doc/manual/html/spade.platform.df.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.platform.df.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>The SPADE Directory Facilitator (DF)</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.platform.html" title="Chapter 5. Platform
services">
<link rel="prev" href="spade.platform.ams.html" title="The SPADE Agent
Management System (AMS)">
@@ -23,7 +23,7 @@
</table>
<hr>
</div>
-<div class="section" title="The SPADE Directory Facilitator (DF)">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spade.platform.df"></a>The SPADE Directory Facilitator
(DF)</h2></div></div></div>
<p>SPADE's DF serves as <span class="emphasis"><em>yellow
pages</em></span> index where the services offered by the agents are
published for others to find. The way of publishing services is by
uploading to the DF agent a set of <span class="emphasis"><em>service
descriptions</em></span> that contain information about services and how to
access them. Each agent can publish its own set of <span
class="emphasis"><em>service descriptions</em></span>.</p>
=======================================
--- /trunk/doc/manual/html/spade.platform.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.platform.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Chapter 5. Platform services</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="index.html" title="SPADE User's Manual">
<link rel="prev" href="spade.basicagents.whatsnext.html" title="What's
next">
@@ -23,9 +23,9 @@
</table>
<hr>
</div>
-<div class="chapter" title="Chapter 5. Platform services">
-<div class="titlepage"><div><div><h2 class="title">
-<a name="spade.platform"></a>Chapter 5. Platform
services</h2></div></div></div>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="spade.platform"></a>Chapter 5. Platform
services</h1></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
=======================================
--- /trunk/doc/manual/html/spade.quickstart.html Tue Jun 22 08:25:50 2010
+++ /trunk/doc/manual/html/spade.quickstart.html Mon Nov 12 09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Chapter 2. Quickstart Guide</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="index.html" title="SPADE User's Manual">
<link rel="prev" href="spade.basic.whatsnext.html" title="What's Next?">
@@ -23,9 +23,9 @@
</table>
<hr>
</div>
-<div class="chapter" title="Chapter 2. Quickstart Guide">
-<div class="titlepage"><div><div><h2 class="title">
-<a name="spade.quickstart"></a>Chapter 2. Quickstart
Guide</h2></div></div></div>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="spade.quickstart"></a>Chapter 2. Quickstart
Guide</h1></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
=======================================
--- /trunk/doc/manual/html/spade.quickstart.installation.html Tue Jun 22
08:25:50 2010
+++ /trunk/doc/manual/html/spade.quickstart.installation.html Mon Nov 12
09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Installation</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.quickstart.html" title="Chapter 2. Quickstart
Guide">
<link rel="prev" href="spade.quickstart.requirements.html"
title="Requirements">
@@ -23,15 +23,29 @@
</table>
<hr>
</div>
-<div class="section" title="Installation">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a
name="spade.quickstart.installation"></a>Installation</h2></div></div></div>
-<p>Grab the SPADE deliverable package at <a class="ulink"
href="http://spade2.googleprojects.com"
target="_top">http://spade2.googleprojects.com</a>. Uncompress it and
launch the <span class="command"><strong>configure.py</strong></span>
script in order to configure the platform. You can provide a parameter to
this script, which is the machine's hostname and that will be used as the
platform's name. Finally, launch the <span
class="command"><strong>runspade.py</strong></span> script and see your
platform rise before your eyes. After a few seconds you should see the
green word <span class="command"><strong>Done</strong></span> on the screen
confirming that the platform was succesfully launched. In a nutshell:</p>
+<p>The best way to install SPADE is using the easy installer from the
Python Package Index. You can install SPADE with easy_install or pip:</p>
<pre class="screen">
-$ tar xvzf spade-2.0.0.tar.gz
+
+ pip install SPADE
+ </pre>
+<p>or</p>
+<pre class="screen">
+
+ easy_install SPADE
+ </pre>
+<p> If you want to install the platform from source grab the SPADE
deliverable package at <a class="ulink"
href="http://spade2.googleprojects.com"
target="_top">http://spade2.googleprojects.com</a> or from the Python
Package Index <a class="ulink" href="http://pypi.python.org/pypi/SPADE"
target="_top">http://pypi.python.org/pypi/SPADE</a>. Uncompress it and
launch the <span class="command"><strong>setup.py</strong></span> script
with the <span class="command"><strong>install</strong></span>
parameter.</p>
+<pre class="screen">
+$ tar xvzf SPADE-2.1.tar.gz
$ cd spade
-$ python configure.py myhost.myprovider.com
-$ python runspade.py
+$ python setup.py install
+</pre>
+<p>Once you have succesfully installed SPADE run the <span
class="command"><strong>configure.py</strong></span> script in order to
configure the platform. You can provide a parameter to this script, which
is the machine's hostname and that will be used as the platform's name.
Finally, launch the <span
class="command"><strong>runspade.py</strong></span> script and see your
platform rise before your eyes. After a few seconds you should see the
green word <span class="command"><strong>Done</strong></span> on the screen
confirming that the platform was succesfully launched. In a nutshell:</p>
+<pre class="screen">
+$ configure.py myhost.myprovider.com
+$ runspade.py
</pre>
<p>And that's it. If everything went well, congratulations! You have
succesfully installed SPADE! If something went wrong, don't panic!, head to
chapter XXX "FAQ and Troubleshooting" for answers or follow the rest of
this manual to know a lot more about SPADE.</p>
</div>
=======================================
--- /trunk/doc/manual/html/spade.quickstart.requirements.html Tue Jun 22
08:25:50 2010
+++ /trunk/doc/manual/html/spade.quickstart.requirements.html Mon Nov 12
09:28:31 2012
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Requirements</title>
-<link rel="stylesheet" href="styles.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="SPADE User's Manual">
<link rel="up" href="spade.quickstart.html" title="Chapter 2. Quickstart
Guide">
<link rel="prev" href="spade.quickstart.html" title="Chapter 2. Quickstart
Guide">
@@ -23,13 +23,15 @@
</table>
<hr>
</div>
-<div class="section" title="Requirements">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a
name="spade.quickstart.requirements"></a>Requirements</h2></div></div></div>
<p>Ok, first things first. Check that your computer has everything you
need in order to be able to run SPADE:</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem"><p>Python 2.6.2 or above</p></li>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type:
disc; ">
+<li class="listitem"><p>Python 2.7 or above</p></li>
<li class="listitem"><p>Psyco python optimizer (optional), to speed up the
execution of the platform and the agents</p></li>
+<li class="listitem"><p>pexpect (optional), to use external knowledge
bases</p></li>
+<li class="listitem"><p>SPARQLWrapper (optional), to use the SPARQL
knowledge base</p></li>
</ul></div>
</div>
<div class="navfooter">
=======================================
--- /trunk/setup.py Wed Aug 1 09:29:11 2012
+++ /trunk/setup.py Mon Nov 12 09:28:31 2012
@@ -47,7 +47,6 @@
'License :: OSI Approved :: GNU Lesser General Public License v2
(LGPLv2)',
'Natural Language :: English',
'Operating System :: OS Independent',
- 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Adaptive Technologies',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
=======================================
--- /trunk/test/bdiTestCase.py Tue Jul 31 06:58:54 2012
+++ /trunk/test/bdiTestCase.py Mon Nov 12 09:28:31 2012
@@ -58,7 +58,7 @@
self.s3 = spade.DF.Service(name="s3", owner=self.a.getAID(),
inputs=["Value3"],outputs=["Myoutput3"],P=["Var(Value3,3,Int)"],Q=["Var(Myoutput3,4,Int)"])
self.s4 = spade.DF.Service(name="s4", owner=self.a.getAID(),
inputs=["Myoutput3"],outputs=["Myoutput4"],P=["Var(Myoutput3,4,Int)"],Q=["Var(Myoutput4,5,Int)"])

- self.a.registerService(self.s1,s1_method)
+ self.a.registerService(self.s1,s1_method)
self.a.registerService(self.s2,s2_method)
self.a.registerService(self.s3,s3_method)
self.a.registerService(self.s4,s4_method)
=======================================
--- /trunk/test/kbTestCase.py Fri Nov 9 09:51:22 2012
+++ /trunk/test/kbTestCase.py Mon Nov 12 09:28:31 2012
@@ -177,7 +177,6 @@
try:
from spade import SWIKB
except:
- print "WOWWW"
self.skipTest("Could not import SWIKB")

self.assertRaises(SWIExecutableNotFound,
self.a.configureKB, "SWI", None, "dummyswipl" )
Reply all
Reply to author
Forward
0 new messages