scispace - formally typeset
Search or ask a question
Book ChapterDOI

Reflecting on Agent Programming with AgentSpeak(L)

26 Oct 2015-pp 351-366
TL;DR: This paper attempts to build a bridge between the concepts underpinning mainstream languages and those underpinning AOP through a conceptual mapping that is subsequently used to drive the design of a new programming language entitled ASTRA, which has been evaluated by a group of experienced software engineers attending an Agent-Oriented Software Engineering Masters course.
Abstract: Agent-Oriented Programming (AOP) researchers have successfully developed a range of agent programming languages that bridge the gap between theory and practice. Unfortunately, despite the in-community success of these languages, they have proven less compelling to the wider software engineering community. One of the main problems facing AOP language developers is the need to bridge the cognitive gap that exists between the concepts underpinning mainstream languages and those underpinning AOP. In this paper, we attempt to build such a bridge through a conceptual mapping that we subsequently use to drive the design of a new programming language entitled ASTRA, which has been evaluated by a group of experienced software engineers attending an Agent-Oriented Software Engineering Masters course.

Summary (3 min read)

1 Introduction

  • The Agent-Oriented Programming (AOP) paradigm is nearly 25 years old.
  • Over the years, it has become apparent that developers become uneasy when stripped of their traditional supports and that this engenders a feeling that the languages are not production quality.
  • The authors focus on understanding the relationship between AgentSpeak(L) and OOP with the goal of trying to reduce the perceived cognitive gap.

2 Relating AgentSpeak(L) to OOP

  • AgentSpeak(L) can be prosaically described as an event-driven language where event handlers are fired based on both the triggering event and some context.
  • It follows then, that an AgentSpeak(L) agent consists of an event queue, a set of beliefs , a set of plan rules (event handlers), and a set of intentions that are used to represent the execution of plan rules.
  • In OOP, state is defined in terms of a set of fields that hold values (or object references).
  • To be fully precise, beliefs and fields are not the same.
  • The benefit of doing this is that someone who is proficient in OOP can use these mappings as a starting point for their study of the language.

3 Exploring the Implications

  • The mapping developed in Section 2 is not only potentially useful to developers aiming to learn AgentSpeak(L), but it is also useful from a language developer’s perspective as it raises questions about the set of features that may be appropriate for AgentSpeak(L)-style languages.
  • The authors explore some of the consequences of adopting the above mapping.

3.1 Beliefs are like fields

  • Understanding the role of beliefs in AOP languages can be one of the most challenging concepts to grasp.
  • As was discussed above, one simple way of associating beliefs with object state is to demonstrate that beliefs are like fields.
  • In AgentSpeak(L), it is possible to do something similar, namely to declare a fact, whose predicate corresponds to the field name, and which takes a single argument, the value associated with the field, for example name("Rem");.
  • Within AOP, type systems can be applied at the agent level, and at the language level.
  • The potential benefits of this are: – improved readability: the meaning of the belief is clearer when the types are known.

3.2 Plans Rules as Methods

  • To investigate this in more detail, the authors decided to implement a common algorithm using AgentSpeak(L).
  • Hidden code arises because AgentSpeak(L) has such limited semantics that it is not able to directly perform simple operations such as swapping two values.
  • Loss of readability due to the number of rules and the convoluted control flow that results from it understanding the agent code is far more difficult than understanding the pseudo code.

3.3 Intentions as Threads

  • In the mapping, the authors equate intentions with threads.
  • Agents are commonly presented as being active objects, with their own thread of control.
  • The reality is that AgentSpeak(L) agents are more like multi-threaded processes, with each intention being an individual thread.
  • One solution would be to introduce support for mutual exclusion into AgentSpeak(L).
  • This would overcome the issue, but would require the mutual exclusion to be applied prior to the first invocation of the !outerLoop(L, S, X) sub-goal.

3.4 Events are like messages

  • Perhaps the most contentious part of the mapping is the association of AOP events and OOP messages.
  • Further, the design of AgentSpeak(L) did not consider inter-agent communication.
  • Here, a subset of KQML is identified and the chosen speech acts are closely integrated with the language.
  • Receipt of a tell message results in the adoption a belief based on the content of the message together with an annotation identifying the sender of the message.
  • This approach fits the mapping presented in this paper because the semantics of the receipt of messages are hidden from the programmer.

4 ASTRA: AgentSpeak(L) with bells and whistles

  • The mapping presented in this paper is aimed at reducing the cognitive gap for developers who are familiar with OOP and who wish to learn an AOP language.
  • In order to evaluate whether such a mapping can help, the authors have developed a new implementation of AgentSpeak(L) called ASTRA.
  • In line with the rest of this paper, the syntax of ASTRA is based upon Java syntax, which has been chosen so that the language will seem more familiar to the user.
  • The authors present only the most pertinent details of ASTRA that reflect the points made in the paper.
  • For more information on the language, the reader is directed to [6].

4.1 The ASTRA Type System

  • ASTRA as a statically typed language that provides a typical set of primitive types for use.
  • Instances of objects cannot be directly represented within the language but can be stored and passed to internal and environment operations.
  • The design of these libraries is inspired by the use of annotations in CArtAgo [17].
  • Terms represent basic calculations that can return a value.
  • Formula methods are constructors that return any logical formula instance in ASTRA (these can be simple boolean values or more complex formulae).

4.2 Extended Plan Syntax

  • ASTRA includes a number of extensions to the traditional AgentSpeak(L) plan syntax.
  • The usefulness of constructs such as these is emphasised by Jason’s inclusion of some of these procedural-style constructs (e.g. if statements, loops) in its extended version of AgentSpeak(L).
  • While loop traditional method of repetition in programming Foreach loop repeats the same actions for every matching binding of a formula.
  • Try-recover block allows for the recovery from failed actions Local variable declaration declares a variable for use within a plan rule Assignment allows the value of a local variable to be changed Query bind the values of beliefs to variables.
  • Wait pauses execution until condition if true.

4.3 Mutual Exclusion Support

  • In Section 3.3, the link between intentions and threads was established.
  • Code contained within a synchonized block can only be executed by a single intention at a time.
  • Once an intention enters a synchronized block, all synchronized blocks with the same identifier are locked and cannot be entered until the current intention is completed.
  • Figure 5 shows an example of ASTRA code with race conditions.
  • This program invokes the !init goal twice, creating 2 intentions.

5 Evaluation

  • In order to evaluate the concepts discussed in this paper, a survey was conducted using 20 students from the M.Sc. in Advanced Software Engineering programme in University College Dublin.
  • The students are full-time software engineers with an average experience of 7.65 years in industry.
  • Q1 Agents are a useful level of abstraction.
  • The results from the second group of questions show that 75% of the participants believe that static typing is important.

6 Conclusions

  • The authors have presented a practical conceptual mapping between AgentSpeak(L) and Object-Oriented Programming (OOP).
  • Certainly, Jason includes support for atomic behaviours and has an extended suite of plan operators.
  • The principal outcome of their work has been to drive the development of ASTRA, an implementation of AgentSpeak(L) that is targeted towards reducing the cognitive gap.
  • Students learned ASTRA over a 5-day period, during which they wrote a range of programs.
  • The authors believe that the feedback positively reflects their decision to include both the language level type system and the suite of plan operators into ASTRA.

Did you find this useful? Give us your feedback

Content maybe subject to copyright    Report

Provided by the author(s) and University College Dublin Library in accordance with publisher
policies. Please cite the published version when available.
Title Reflecting on Agent Programming with AgentSpeak(L)
Authors(s) Collier, Rem; Russell, Sean E.; Lillis, David
Publication date 2015-10-30
Publication information Chen, Q., Torroni, P., Villata, S., Hsu, J. and Omincini, A. (eds.). PRIMA 2015: Principles
and Practice of Multi-Agent Systems, 18th International Conference, Bertinoro, Italy, 26-30
October 2015, Proceedings
Conference details 18th International Conference, Bertinoro, Italy, 26-30 October 2015
Series Lecture Notes in Computer Science
Publisher Springer
Item record/more information http://hdl.handle.net/10197/8130
Publisher's statement The final publication is available at Springer via
http://dx.doi.org/10.1007/978-3-319-25524-8.
Publisher's version (DOI) 10.1007/978-3-319-25524-8
Downloaded 2022-08-09T18:00:04Z
The UCD community has made this article openly available. Please share how this access
benefits you. Your story matters! (@ucd_oa)
© Some rights reserved. For more information, please see the item record link above.

Reflecting on Agent Programming with
AgentSpeak(L)
Rem W. Collier, Se´an Russell, and David Lillis
School of Computer Science,
University College Dublin, Ireland
{rem.collier,sean.russell,david.lillis}@ucd.ie
Abstract. Agent-Oriented Programming (AOP) researchers have suc-
cessfully developed a range of agent programming languages that bridge
the gap between theory and practice. Unfortunately, despite the in-
community success of these languages, they have proven less compelling
to the wider software engineering community. One of the main problems
facing AOP language developers is the need to bridge the cognitive gap
that exists between the concepts underpinning mainstream languages
and those underpinning AOP. In this paper, we attempt to build such a
bridge through a conceptual mapping that we subsequently use to drive
the design of a new programming language entitled ASTRA, which has
been evaluated by a group of experienced software engineers attending
an Agent-Oriented Software Engineering Masters course.
Keywords: Agent-Oriented Programming, AgentSpeak(L), ASTRA
1 Introduction
The Agent-Oriented Programming (AOP) paradigm is nearly 25 years old. Since
its inception, a number of established AOP languages have emerged, with the
most prominent being: 2/3APL [1, 2], GOAL [3] and Jason [4]. However, while
these languages have received much critical success within the AOP community,
they have been less well received by the wider software engineering community.
A useful barometer for the view of this wider community has been the stu-
dents enrolled on an Agent-Oriented Software Engineering (AOSE) module that
is part of a Masters in Advanced Software Engineering offered at University Col-
lege Dublin since 2005. Students on this course typically have 5 or more years
of industrial software engineering experience and are senior software engineers
in their respective companies. During the course, the students are exposed to
an AgentSpeak(L)-based language, which has been one of AF-AgentSpeak [5],
Jason [4], and our most recent agent-programming language, ASTRA [6].
Each year, the students have been asked to provide informal feedback on the
AOP language(s) used and to comment on whether they would consider using
such a language in a live industry application. The common response has been
“no”, with typical criticisms being the lack of tool support and the perceived
learning curve required to master an AOP language.

2 Collier, Russell and Lillis
The lack of tool support seems strange given the existence of mind inspec-
tors [7], advanced debugging techniques [8, 9], and a range of analytical tools [10,
11]. However, after delving deeper, it became apparent to us that the criticisms
were directed more closely towards the quality of the Integrated Development
Environments (IDEs) provided and their limitations in terms of practical fea-
tures such as code completion, code navigation and formatting support. Over
the years, it has become apparent that developers become uneasy when stripped
of their traditional supports and that this engenders a feeling that the languages
are not production quality.
Conversely, the perceived learning curve is less unexpected. AOP, with its
origins in Distributed Artificial Intelligence, is underpinned by a quite different
set of concepts to mainstream software engineering, where there is a clear evolu-
tion from procedural programming languages to Object-Oriented Programming
(OOP) languages. Individuals attempting to learn about AOP are confronted
with a range of concepts - beliefs, desires and intentions; speech acts; plans -
that bear little relation to mainstream programming concepts. For many, this
can act as a significant barrier to learning how to program in an AOP language.
Perhaps the most common explanation of the relationship between AOP
and OOP is the comparison table presented in [12]. This table presents a very
high-level view of AOP and OOP that treats AOP as a specialisation of OOP.
Unfortunately, it provides little practical detail. For example, how does the state
of an object relate to the state of an agent? is there any correlation between how
behaviours are specified in OOP and how they are specified in agents? when and
how will a behaviour be executed?
Answering these questions requires a more detailed comparison of AOP and
OOP. However, when attempting to create a deeper comparison, it quickly be-
comes evident that it is not possible. The main reason for this is that AOP, unlike
OOP, does not promote or enforce a consistent conceptual model (i.e. a standard
view of state, methods, messages, etc.). Instead, different languages can, and
are, based around quite different approaches. For example, AgentSpeak(L) style
languages are essentially event-driven languages. They define context-sensitive
event handlers that map events to partial plans. Conversely, GOAL is, at its
heart, an action selection language where rules identify the context in which
each action should be executed. The consequence of this diversity is that it is
more appropriate to compare specific styles of AOP language with OOP rather
than trying to over-generalise.
In this paper, we focus on understanding the relationship between AgentS-
peak(L) and OOP with the goal of trying to reduce the perceived cognitive gap.
Our approach is to start by identifying a mapping between AgentSpeak(L) and
OOP concepts in Section 2, which we then reflect on in Section 3. The purpose
of the reflection is to try to understand how to improve the design of AgentS-
peak(L) to better support developers wishing to learn the language. Following
on from this, we introduce a new member of the AgentSpeak(L) family called
ASTRA that has been designed in response to the findings of the previous sec-
tion. Full details of ASTRA are not provided in this paper. Instead, we focus on

Reflecting on Agent Programming with AgentSpeak(L) 3
only the most pertinent features. Finally, in Section 4 we present the relevant
results of a wider survey carried out on the most recent class of the M.Sc. in
Advanced Software Engineering.
2 Relating AgentSpeak(L) to OOP
AgentSpeak(L) can be prosaically described as an event-driven language where
event handlers are fired based on both the triggering event and some context.
Events, which are either external (environment-based) or internal (goal-based),
are generated and added to an event queue. Events are then removed from this
queue and matched to a rule which is then executed. The matching process
checks both that the rule applies to the event and that the rule can be executed
based on a rule context that defines valid program states in which the rule may
be applied.
More commonly, the event handlers are known as plan rules; the program
state is modeled as a set of beliefs, that are realized as atomic predicate logic
formulae; the events are also modeled as atomic predicate formulae (with some
additional modifiers); and the execution of plan rules is achieved through creation
and manipulation of intentions. Finally, external events are generated through
changes to the agent’s state (i.e. the adoption or retraction of a belief), and
internal events are generated through the declaration of goals.
It follows then, that an AgentSpeak(L) agent consists of an event queue, a set
of beliefs (state), a set of plan rules (event handlers), and a set of intentions that
are used to represent the execution of plan rules. Given that AOP is commonly
viewed as a specialization of OOP, and that agents are a special type of object,
the following outlines how AgentSpeak(L) concepts relate to OOP concepts from
the perspective of an OOP developer:
Beliefs are equivalent to fields As indicated above, beliefs form the state of
an agent. In OOP, state is defined in terms of a set of fields that hold values
(or object references). If we consider a field, such as int value; this could
be modeled as a belief value(0). Here, the value 0 is chosen as it is the
default value for integer fields in many OOP languages. To be fully precise,
beliefs and fields are not the same. Whereas fields can be modeled using
beliefs, beliefs actually encompass more than this, including environment
information, global variables, etc.
Plan Rules are equivalent to methods A plan rule associates a plan with
a triggering event and a context. Plans define behaviours and are basically
blocks of procedural code that are executed whenever a matching event is
processed and the rules context is satisfied. In OOP languages, procedural
code is defined within methods and is executed whenever the method signa-
ture is matched to a message that has been received by the object. Accord-
ingly, the AgentSpeak(L) equivalent of a method signature is the triggering
event (specifically the identifier and the number of arguments). The con-
text has no real equivalent in OOP, however, it can be viewed as providing

4 Collier, Russell and Lillis
a form of method overloading based on state (i.e. when there are multiple
rules matching a given event, the context is used to identify which of the
rules should be executed).
Goals are equivalent to method calls Goals generate events. The are then
matched to rules, which are subsequently executed. Method calls generate
messages that are matched to methods that are executed. Typically, goals
are declared from within a plan. The result is that the plan component of
the selected rule is pushed onto the program (intention) stack and executed.
Events are equivalent to messages Within AgentSpeak(L), events play a
similar role to messages in OOP. Events are used to trigger plan rules in
the same way that, for OOP languages, messages are used to invoke meth-
ods. This can be somewhat confusing because “message” is also the term
used for communication between agents, however this is not the focus here.
In OOP, the set of messages that can be handled by an object is known as the
interface of the object. This set of messages corresponds to the signatures
of the methods that are defined in the objects implementing class(es). Given
our view of events being equivalent to OOP messages, then in AgentSpeak(L)
the interface of an agent is the set of events that it can handle.
Intentions are equivalent to threads Intentions represent the plans that the
agent has selected based upon the matching of events to plan rules. The
AgentSpeak(L) interpreter processes the intentions by executing the instruc-
tions contained within the plan. In cases where the instruction is a sub-goal,
this results in an additional plan being added to the intention which must be
executed before the next instruction in the initial plan can be executed. In
most programming languages, this activity is modelled by the program (call)
stack. Intentions are simply the AgentSpeak(L) equivalent of this. Given that
an agent can have multiple concurrent intentions whose execution is inter-
leaved, it is natural to view an intention as being the equivalent of a thread.
The above mappings are intended to relate the concepts of AgentSpeak(L) to
those present in OOP. The objective behind this is to try to reduce the cognitive
gap faced by individuals who know OOP and wish to learn an AOP language.
The benefit of doing this is that someone who is proficient in OOP can use these
mappings as a starting point for their study of the language.
3 Exploring the Implications
The mapping developed in Section 2 is not only potentially useful to developers
aiming to learn AgentSpeak(L), but it is also useful from a language developer’s
perspective as it raises questions about the set of features that may be appropri-
ate for AgentSpeak(L)-style languages. In this section, we explore some of the
consequences of adopting the above mapping.
3.1 Beliefs are like fields
Understanding the role of beliefs in AOP languages can be one of the most
challenging concepts to grasp. Certainly, at a high-level it is clear that beliefs

Citations
More filters
Journal ArticleDOI
TL;DR: A new framework based on Belief‐Desire‐Intention multi‐agent systems for the macroscopic modelling and simulation of continuous dynamic systems endowed with clean message‐based interfaces and local intelligence is proposed.
Abstract: We propose a new framework based on Belief-Desire-Intention multi-agent systems for the macroscopic modelling and simulation of continuous dynamic systems. The main idea is to break down the target system model into a collection of autonomous and loosely coupled interacting components endowed with clean message-based interfaces and local intelligence. Each component is then mapped to a Belief-Desire-Intention agent that captures its state as a set of logical facts and its behavioural patterns as a set of plans. The system model can be described as a multi-agent programme that is specified using the state-of-the-art Jason agent-oriented programming language. The approach is evaluated by considering a generalized graph-based model of predator–prey systems. Our approach supports the configuration of the multi-agent model with various differential equations integration methods, as required by the specific problem.

10 citations

Book ChapterDOI
20 Jun 2018
TL;DR: This paper presents a framework called Augmented Worlds (AW), which provides a model and a technological support to develop a broad spectrum of agent-based AR/MR systems and describes first the conceptual model on which the framework is based, and then a concrete architecture and prototype implementation.
Abstract: In agent literature, a partially unexplored area is related to the integration of ever-wider opportunities offered by technologies such as Mixed Reality (MR) and Augmented Reality (AR). In this paper we present a framework called Augmented Worlds (AW), which provides a model and a technological support to develop a broad spectrum of agent-based AR/MR systems. Distinguishing key features of the approach include: bi-directional augmentation, support for existing cognitive agent technologies, support for developing open multi-user environments. In the paper, we describe first the conceptual model on which the framework is based, and then a concrete architecture and prototype implementation. Two case studies about real-world applications – an augmented museum and an augmented harbour – engineered with the framework are finally discussed.

10 citations

01 Jan 2018
TL;DR: The AgentSpeak(ER) extension aims at improving the style of BDI agent programming along relevant aspects, including program modularity and readability, failure handling, and reactive as well as goal-based reasoning.

10 citations


Cites background from "Reflecting on Agent Programming wit..."

  • ...Various Agent Programming Languages extended AgentSpeak(L) with constructs and mechanisms making it practical from a programming point of view [2, 4]....

    [...]

Proceedings ArticleDOI
01 Oct 2019
TL;DR: This paper presents the exploration of Kinesthetic learning or ”Learning by Doing” in combination with Augmented Reality through the presentation of an initial prototype system that was developed and implemented based on an adaptive learning methodology within an AR application, with the prospect that in the future will use intelligent agents.
Abstract: Technology in education is rapidly changing the way that students learn. This allows for the creation of learning tools that provide better interaction, creative engagement and adaptability to a learner. Augmented Reality (AR) is one of these emerging technologies which can facilitate the development of new learning tools. AR has successfully been proven to allow new types of learning pedagogies by providing human-centered learning environments. In particular, the pedagogical approach of Kinesthetic learning or ”Learning by Doing” has not been explored in great detail in combination with Augmented Reality. This approach is to physically act out an activity to aid in the learning process and has been previously proven as one of the most successful approaches. For a successful application of this pedagogy, the student must get precise feedback and be guided through a process, thus some form of intelligent guide needs to be actively monitoring the learning environment. This paper presents the exploration of this concept through the presentation of an initial prototype system that was developed and implemented based on an adaptive learning methodology within an AR application, with the prospect that in the future will use intelligent agents.

9 citations


Cites methods from "Reflecting on Agent Programming wit..."

  • ...The current candidate approaches are as follows the ASTRA [14] agent framework, Unity ML-Agents Toolkit [19] and JaCaMo [4]....

    [...]

Proceedings ArticleDOI
26 Oct 2015
TL;DR: This paper attempts to build a bridge through a conceptual mapping between Object-Oriented Programming (OOP) and the AgentSpeak(L) family of AOP languages and uses the analysis of this mapping to drive the design of a new programming language entitled ASTRA.
Abstract: Agent-Oriented Programming (AOP) researchers have successfully developed a range of agent programming languages that bridge the gap between theory and practice. Unfortunately, despite the in-community success of these languages, they have proven less compelling to the wider software engineering community. One of the main problems facing AOP language developers is the need to bridge the cognitive gap that exists between the concepts underpinning mainstream languages and those underpinning AOP. In this paper, we attempt to build such a bridge through a conceptual mapping between Object-Oriented Programming (OOP) and the AgentSpeak(L) family of AOP languages. This mapping explores how OOP concepts and the concurrent programming concept of threads relate to AgentSpeak(L) concepts. We then use our analysis of this mapping to drive the design of a new programming language entitled ASTRA.

7 citations


Cites background from "Reflecting on Agent Programming wit..."

  • ...Details of the results of the relevant parts of this questionnaire are presented in [8]....

    [...]

References
More filters
Journal ArticleDOI
Yoav Shoham1
TL;DR: The concept of agent-oriented programming is presented, the concept of mental state and its formal underpinning are discussed, a class of agent interpreters are defined, and a specific interpreter that has been implemented is described.

1,846 citations

Yoav Shoham1
17 Dec 1992
TL;DR: This paper describes features of the agent oriented programming framework in a little more detail, and summarizes recent results and ongoing AOP-related work.
Abstract: Shoham, Y., Agent-oriented programming, Artificial Intelligence 60 (1993) 51-92. A new computational framework is presented, called agent-oriented programming (AOP), which can be viewed as a specialization of object-oriented programming. The state of an agent consists of components such as beliefs, decisions, capabilities, and obligations; for this reason the state of an agent is called its mental state. The mental state of agents is described formally in an extension of standard epistemic logics: beside temporalizing the knowledge and belief operators, AOP introduces operators for obligation, decision, and capability. Agents are controlled by agent programs, which include primitives for communicating with other agents. In the spirit of speech act theory, each communication primitive is of a certain type: informing, requesting, offering, and so on. This article presents the concept of AOP, discusses the concept of mental state and its formal underpinning, defines a class of agent interpreters, and then describes in detail a specific interpreter that has been implemented.

1,342 citations


"Reflecting on Agent Programming wit..." refers background in this paper

  • ...10 A[j+1] = temp 11 return A 1 !do_sort ([7, 5, 12, 15, 3]);...

    [...]

  • ...Perhaps the most common explanation of the relationship between AOP and OOP is the comparison table presented in [12]....

    [...]

Book
01 Jul 2007
TL;DR: The Jason Agent Programming Language as discussed by the authors is a programming language based on the BDI Agent Model that allows to define simulated environments and communicate with multiple agents in a BDI agent language.
Abstract: Preface. 1 Introduction. 1.1 Autonomous Agents. 1.2 Characteristics of Agents. 1.3 Multi-Agent Systems. 1.4 Hello World! 2 The BDI Agent Model. 2.1 Agent-Oriented Programming. 2.2 Practical Reasoning. 2.3 A Computational Model of BDI Practical Reasoning. 2.4 The Procedural Reasoning System. 2.5 Agent Communication. 3 The Jason Agent Programming Language. 3.1 Beliefs. 3.2 Goals. 3.3 Plans. 3.4 Example: A Complete Agent Program. 3.5 Exercises. 4 Jason Interpreter. 4.1 The Reasoning Cycle. 4.2 Plan Failure. 4.3 Interpreter Configuration and Execution Modes. 4.4 Pre-Defined Plan Annotations. 4.5 Exercises. 5 Environments. 5.1 Support for Defining Simulated Environments. 5.2 Example: Running a System of Multiple Situated Agents. 5.3 Exercises. 6 Communication and Interaction. 6.1 Available Performatives. 6.2 Informal Semantics of Receiving Messages. 6.3 Example: Contract Net Protocol. 6.4 Exercises. 7 User-Defined Components. 7.1 Defining New Internal Actions. 7.2 Customising the Agent Class. 7.3 Customising the Overall Architecture. 7.4 Customising the Belief Base. 7.5 Pre-Processing Directives. 7.6 Exercises. 8 Advanced Goal-Based Programming. 8.1 BDI Programming. 8.2 Declarative (Achievement) Goal Patterns. 8.3 Commitment Strategy Patterns. 8.4 Other Useful Patterns. 8.5 Pre-Processing Directives for Plan Patterns. 9 Case Studies. 9.1 Case Study I: Gold Miners. 9.2 Case Study II: Electronic Bookstore. 10 Formal Semantics. 10.1 Semantic Rules. 10.2 Semantics of Message Exchange in a Multi-Agent System. 10.3 Semantic Rules for Receiving Messages. 10.4 Semantics of the BDI Modalities for AgentSpeak. 11 Conclusions. 11.1 Jason and Agent-Oriented Programming. 11.2 Ongoing Work and Related Research. 11.3 General Advice on Programming Style and Practice. A Reference Guide. A.1 EBNF for the Agent Language. A.2 EBNF for the Multi-Agent Systems Language. A.3 Standard Internal Actions. A.4 Pre-Defined Annotations. A.5 Pre-Processing Directives. A.6 Interpreter Configuration. Bibliography.

1,173 citations

Book
12 Nov 2007
TL;DR: The BDI Agent Model, a Computational Model of BDI Practical Reasoning, and Semantics of the BDI Modalities for AgentSpeak, a Reference Guide to Agent-Oriented Programming, are presented.
Abstract: Preface. 1 Introduction. 1.1 Autonomous Agents. 1.2 Characteristics of Agents. 1.3 Multi-Agent Systems. 1.4 Hello World! 2 The BDI Agent Model. 2.1 Agent-Oriented Programming. 2.2 Practical Reasoning. 2.3 A Computational Model of BDI Practical Reasoning. 2.4 The Procedural Reasoning System. 2.5 Agent Communication. 3 The Jason Agent Programming Language. 3.1 Beliefs. 3.2 Goals. 3.3 Plans. 3.4 Example: A Complete Agent Program. 3.5 Exercises. 4 Jason Interpreter. 4.1 The Reasoning Cycle. 4.2 Plan Failure. 4.3 Interpreter Configuration and Execution Modes. 4.4 Pre-Defined Plan Annotations. 4.5 Exercises. 5 Environments. 5.1 Support for Defining Simulated Environments. 5.2 Example: Running a System of Multiple Situated Agents. 5.3 Exercises. 6 Communication and Interaction. 6.1 Available Performatives. 6.2 Informal Semantics of Receiving Messages. 6.3 Example: Contract Net Protocol. 6.4 Exercises. 7 User-Defined Components. 7.1 Defining New Internal Actions. 7.2 Customising the Agent Class. 7.3 Customising the Overall Architecture. 7.4 Customising the Belief Base. 7.5 Pre-Processing Directives. 7.6 Exercises. 8 Advanced Goal-Based Programming. 8.1 BDI Programming. 8.2 Declarative (Achievement) Goal Patterns. 8.3 Commitment Strategy Patterns. 8.4 Other Useful Patterns. 8.5 Pre-Processing Directives for Plan Patterns. 9 Case Studies. 9.1 Case Study I: Gold Miners. 9.2 Case Study II: Electronic Bookstore. 10 Formal Semantics. 10.1 Semantic Rules. 10.2 Semantics of Message Exchange in a Multi-Agent System. 10.3 Semantic Rules for Receiving Messages. 10.4 Semantics of the BDI Modalities for AgentSpeak. 11 Conclusions. 11.1 Jason and Agent-Oriented Programming. 11.2 Ongoing Work and Related Research. 11.3 General Advice on Programming Style and Practice. A Reference Guide. A.1 EBNF for the Agent Language. A.2 EBNF for the Multi-Agent Systems Language. A.3 Standard Internal Actions. A.4 Pre-Defined Annotations. A.5 Pre-Processing Directives. A.6 Interpreter Configuration. Bibliography.

875 citations


"Reflecting on Agent Programming wit..." refers background in this paper

  • ...During the course, the students are exposed to an AgentSpeak(L)-based language, which has been one of AF-AgentSpeak [5], Jason [4], and our most recent agent-programming language, ASTRA [6]....

    [...]

  • ...ASTRA is based upon Jason, but includes a number of features that are inspired by the mapping presented in this paper....

    [...]

  • ...The usefulness of constructs such as these is emphasised by Jason’s inclusion of some of these procedural-style constructs (e.g. if statements, loops) in its extended version of AgentSpeak(L)....

    [...]

  • ...The first approach is the approach adopted in Jason....

    [...]

  • ...Certainly, Jason includes support for atomic behaviours and has an extended suite of plan operators....

    [...]

Journal ArticleDOI
Mehdi Dastani1
TL;DR: A BDI-based agent-oriented programming language that facilitates the implementation of multi-agent systems consisting of individual agents that may share and access external environments, called 2APL (A Practical Agent Programming Language).
Abstract: This article presents a BDI-based agent-oriented programming language, called 2APL (A Practical Agent Programming Language). This programming language facilitates the implementation of multi-agent systems consisting of individual agents that may share and access external environments. It realizes an effective integration of declarative and imperative style programming by introducing and integrating declarative beliefs and goals with events and plans. It also provides practical programming constructs to allow the generation, repair, and (different modes of) execution of plans based on beliefs, goals, and events. The formal syntax and semantics of the programming language are given and its relation with existing BDI-based agent-oriented programming languages is discussed.

394 citations


"Reflecting on Agent Programming wit..." refers background in this paper

  • ...Since its inception, a number of established AOP languages have emerged, with the most prominent being: 2/3APL [1, 2], GOAL [3] and Jason [4]....

    [...]

Frequently Asked Questions (11)
Q1. What have the authors contributed in "Reflecting on agent programming with agentspeak(l)" ?

In this paper, the authors attempt to build such a bridge through a conceptual mapping that they subsequently use to drive the design of a new programming language entitled ASTRA, which has been evaluated by a group of experienced software engineers attending an Agent-Oriented Software Engineering Masters course. 

The authors believe that the feedback positively reflects their decision to include both the language level type system and the suite of plan operators into ASTRA. 

2. Returning results is an issue in AgentSpeak(L) because the basic version of the language does not allow values to be returned from a sub-goal call. 

The consequence of this diversity is that it is more appropriate to compare specific styles of AOP language with OOP rather than trying to over-generalise. 

In addition to the benefit such a mapping provides for those wishing to learn AgentSpeak(L), a second benefit is that it provides language designers with valuable insights into how their languages might be used in practice. 

Invoking a behaviour based on the receipt of a tell message thus requires the creation of a plan rule whose triggering event matches the belief adoption event created by the receipt of the message. 

The benefit of adding new event types is that the events can be specified in a way that all of the relevant data is encoded in the event. 

The common response has been “no”, with typical criticisms being the lack of tool support and the perceived learning curve required to master an AOP language. 

The purpose of this mapping has been to attempt to find a way of reducing the cognitive gap for developers, experienced in OOP, who wish to learn Agent-Oriented Programming (AOP). 

Actions represent internal actions that can be performed, returning a boolean value indicating if the action was successfully performed. 

Regardless of the necessity of static typing, 65% of the participants believed that static typing made ASTRA code easier to read.