AOSE
Reflections
What have we seen?
• Introduced the concept of an agent
• Explored the notions of Interaction and Coordination
• GAIA & Agent Oriented Software Engineering
• Practical experience with Agent-Oriented Programming
using Agent Factory
• ACRE = AOP + conversation management support
The Larger Context
• Origins of the Area
• Example Toolkits
• Beyond AOP…
ORIGINS
Distributed Artificial Intelligence
• Distributed AI: “the development of distributed solutions
for complex problems regarded as requiring intelligence.”
• Proposed in the 1970’s.
• Evolved to cover 3 main areas:
– Parallel Problem Solving: Parallelisation of existing AI
algorithms
– Distributed Problem Solving: Development of algorithms /
techniques to support decomposition and allocation of tasks +
synthesis if results (coordination).
– Multi-Agent Systems: DPS + reasoning about the process of
coordination (run-time selection and adaptation of DPS
techniques).
Multi-Agent Systems
• MAS: “understanding how groups of computational
entities, known as agents, can collaborate and cooperate
in order to solve problems that are beyond their
individual capabilities.”
• Emerged in the 1980’s
• MAS aims to understand how human interaction and
human social structures can be used to build intelligent
distributed systems.
• MAS research draws on a variety of fields:
– Philosophy, Social Sciences, Economics / Game Theory,
Linguistics, Computer Science/Engineering, …
Multi-Agent Systems
• At the heart of any Multi-Agent System is a core
computational entity, known as an agent.
– Each agent in the system is endowed with a possibly unique set
of capabilities.
– All agents are able to interact with one another via some form of
communication infrastructure.
– When an agent is assigned a task that it is incapable of
completing alone, it tries to get help by attempting to locate other
agent(s) that have the capabilities necessary for the task.
– Getting help may require the use of negotiation strategies in
order to get the best deal (payoff) for the agent.
– Performing the task may require coordination of activities e.g.
two robots lifting a box…
Multi-Agent Systems
• Generally speaking, Multi-Agent Systems are viewed as
having the following characteristics:
– each agent has incomplete capabilities to solve a problem
– there is no global system control
– data is decentralized
– computation is asynchronous
So, what is an Agent?
• The term “agent” means different things to different
people.
“An agent is a computer system that is situated in
some environment, and that is capable of
flexible, autonomous action in this environment in
order to meet its design objectives”
(Wooldridge and Jennings, 1995)
So, what is an Agent?
• According to (Russell and Norvig, 1995), an agent is:
– “anything that can be viewed as perceiving its environment
through sensors and acting upon that environment through
actuators”
• Thus, they view an agent as:
– any entity that is located in some environment, and which
– interacts with that environment through a set of sensors and
actuators.
• They then extend this definition to identify an intelligent
agent as any agent that embodies some AI technique.
So, what is an Agent?
• In contrast, (Maes, 1995) views agents to be:
– “computational systems that inhabit some complex dynamic
environment, sense and act autonomously in this environment,
and by doing so realise a set of goals or tasks for which they are
designed.”
• This posits a view of an agent as:
– any autonomous software entity that is located in a complex
dynamic environment, and which
– exhibits goal-oriented behaviour, requiring that it act in pursuit of
its own goals.
So, what is an Agent?
• Alternatively, (Shoham, 1993) adopts the perspective
that:
– “An agent is an entity whose state is viewed as consisting of
mental components such as beliefs, capabilities, choices, and
commitments. These components are defined in a precise
fashion, and stand in rough correspondence to their common
sense counterparts”
• This third definition adopts the view of agents as mental
entities:
– That is, entities that employ mental concepts such as beliefs,
commitments, and goals in order to reason about both the
environment and their activities…
Weak and Strong Agency
• In 1995, Michael Wooldridge and Nick Jennings proposed a two-tier
definition of agency that has become a de facto standard for agent
research.
• The lower tier, or weak notion of agency, was intended to be
sufficiently general to meet the needs of most agent researchers,
and specified the following agent attributes:
– Autonomy, social ability, reactivity, and pro-activity.
• The upper tier, or stronger notions of agency, were intended to build
on this weak core to provide more specific definitions, and specified
attributes such as:
– Benevolence, rationality, mobility, learning, intentionality, …
Weak Agency
• Autonomy: Agents operate without the direct intervention of
humans or others, and have some kind of control over their actions
and internal state.
• Social Ability: Agents interact with other agents and (possibly)
humans via some kind of agent communication language.
• Reactivity: Agents perceive their environment (which may be the
physical world, a user via a graphical user interface, a collection of
other agents, the Internet, or perhaps all of these combined), and
respond in a timely fashion to changes that occur in it.
• Pro-activity: Agents do not simply act in response to their
environment, they are able to exhibit goal-directed behaviour by
taking the initiative
Stronger Agency
• Mobility: the ability of an agent to move around an electronic
network.
• Benevolence: Is the assumption that agents do not have conflicting
goals, and that every agent will therefore always try to do what is
asked of it.
• Rationality: is (crudely) the assumption that an agent will act in
order to achieve its goals and will not act in such a way as to
prevent its goals being achieved - at least insofar as its beliefs
permit.
• Intentionality: an agent reasons about its activities through the
application of mental notions such as beliefs, goals, obligations,
commitments, intentions…
Agents versus Objects
• Objects are passive (cannot take the initiative).
– Agents are (pro-)active objects
• Objects do not encapsulate behaviour activation (not
able to say no)
– Objects only encapsulate state and behaviour
• Objects are insufficient for modeling complex systems
– From (Booch, 1994) as an argument for Design Patterns and
Application Frameworks
Multi-Agent Research Themes
• Agent-Oriented Software Engineering
–
–
–
–
–
Agent Programming Languages & Architectures
Methodologies / Model Driven Development
Tool Support: Debugging / Profiling
Metrics / Evaluation of MAS
Interoperability / Scalability / Adaptability / …
• Cooperation, Coordination & Negotiation
–
–
–
–
–
Agent Communication Languages (KQML, FIPA)
Coordination Languages & Models (LINDA, CLAIM)
Market-based coordination (Game Theory)
Distributed Constraint Satisfaction Problems
Organisations & Environments
Types of Agent
• Deliberative Agents
– What we have seen in this course (knowledge-based systems)
– Focus on individual agent and its decision-making process
• Reactive Agents
– Use the world as its own model (remove the knowledge)
– Maximise responsiveness to the environment (real-time)
• Social Agents
– Focus on conversation management / interaction
– Explore self interest, trust, aquaintance modelling, …
Types of Agent
• Deliberative Agents
– What we have seen in this course (knowledge-based systems)
– Focus on individual agent and its decision-making process
GOAL-BASED REASONING
• Reactive Agents
– Use the world as its own model (remove the knowledge)
– Maximise responsiveness to the environment (real-time)
REACTIVITY
• Social Agents
– Focus on conversation management / interaction
– Explore self interest, trust, aquaintance modelling, …
SOCIAL ABILITY
Types of Agent
• Deliberative Agents
– What we have seen in this course (knowledge-based systems)
– Focus on individual agent and its decision-making process
GOAL-BASED REASONING
• Reactive Agents
– Use the world as its own model (remove the knowledge)
– Maximise responsiveness to the environment (real-time)
REACTIVITY
• Social Agents
– Focus on conversation management / interaction
– Explore self interest, trust, aquaintance modelling, …
SOCIAL ABILITY
• Mobile Agents: Code migration over a network
JADE TOOLKIT
JADE
• FIPA-compliant distributed agent platform which can be
split onto several hosts.
• Java Application Programmer’s Interface.
• Library of FIPA interaction protocols, such as Contract
Net, ready to be used.
• Graphical User Interface to manage several agents from
the same Remote Management Agent.
• Available at http://jade.cselt.it/
JADE Agent Platform
Defining a JADE Agent
import jade.core.Agent;
import jade.core.AID;
public class BookBuyerAgent extends Agent {
// Put agent initializations here
protected void setup() {
// Printout a welcome message
System.out.println(“Hello! Buyer-agent
“+getAID().getName()+” is ready.”);
}
// Put agent clean-up operations here
protected void takeDown() {
// Printout a dismissal message
System.out.println(“Buyer-agent
“+getAID().getName()+” terminating.”);
}
}
The JADE Behaviour Model
• Agents perform tasks.
– Tasks are modelled as Behaviours.
– Typically, an agent will perform several concurrent
tasks in response to different external events.
• Every JADE agent is composed of a single
execution thread.
– Concurrent tasks are modelled and can be
implemented as instances of
jade.core.behaviours.Behaviour
The Behaviour class
• Tasks are associated with an agent via the
addBehaviour() method of the Agent class.
• Each Behaviour subclass must implement
– public void action(): what the behaviour actually does
– public boolean done(): Whether the behaviour is finished
• Parallel behaviours are cooperative (not preemptive) and
occur within a single Java Thread
• Behaviour switch occurs only when the action() method
of the currently scheduled behaviour returns.
Behaviour types
• Basic Behaviours:
– “One shot” behaviours
– “Cyclic” behaviours
• Support for More “Complex” (composite) behaviours….
– WakerBehaviour
• Implement the onWake() method which is executed after a given timeout.
• After that execution the behaviour completes.
– TickerBehaviour
• Implement the onTick() method which is executed periodically with a given
period
• The behaviour runs forever unless its stop() method is executed
JADE Agent Control Algorithm
JADE Tool Support
• Management, control, monitoring, and
debugging of a multi-agent platform
–
–
–
–
–
–
RMA (Remote Monitoring Agent)
Dummy Agent
Sniffer Agent
Introspector Agent
Log Manager Agent
DF (Directory Facilitator) GUI
Mobility
• “Hard mobility”
– Status: an agent can
• stop its execution on the local container
• move to a remote container (likely on a different host)
• restart its execution there from the exact point where it was
interrupted.
– Code: If the code of the moving agent is not available on the
destination container it is automatically retrieved on demand.
• An agent must be Serializable in order to move
• Mobility can be
– self-initiated through doMove() of the Agent class
– forced by the AMS (following a request from another agent)
Advanced features
• Using JADE (i.e. creating a container and starting
agents) from an external Java program (servlets,
applets, JSP..)
• Executing a normal JADE behavior in a dedicated thread
• Saving and reloading agent state on relational DB
(persistence based on www.hibernate.org); add-on
• Integration with JESS (Java Expert System Shell)
– it allows reasoning about messages in JESS
– it allows a JESS program to control sending/receiving messages
and/or creating/destroying JADE behaviours
Advanced features
• Distributed security, fault tolerance, support for
replicated agents and services
• Protégé, XML, RDF and OWL
• Application-specific persistent delivery filters & JADE
kernel-level services
• The LEAP add-on (j2ME-compliant version of JADE)
BEYOND AOP…
Abstractions in MAS
Abstractions in MAS
• Individual Agent Level: autonomy, situatedness
– Cognitive Concepts: beliefs, desires, goals, intentions, plans
– Reasoning Cycle: sense/reason/act, reactive/pro-active
behaviour
• Environment Level: resources and services that agents
can access and control; sensing and acting in an
environment
• Social and Organisation Level: cooperation,
coordination, regulation patterns
– Roles: rights, responsibilities, ...
– Organisational Rules: constraints on roles and their interactions,
norms, deadlines, ...
– Organisational Structures: topology of interaction patterns and
relations over activity control
Programming Agents
• Programming Languages for Multi-Agent Systems
– E.g., Jason, Jadex, JACK, 2APL, GOAL, Brahms, JIAC, Agent
Factory, MetateM, Golog variants, ...
• Architecture to represent an agent mental state:
– Beliefs: information available to agent (e.g., about the
environment or other agents)
– Goals: states of aairs that the agent wants to achieve
– Events: changes in agents beliefs or goals
– Capabilities: reusable modules of activities that the agent can
perform
– Plans: reasoning about courses of action to achieve goals
– Rules: reasoning about beliefs
Programming Agents
• Some steps of a Reasoning Cycle:
–
–
–
–
Determining Relevant Plans for Handling Events
Select a Plan for Execution
Execute Part of an Intended Plans
Handle Plan Failures
• Agent Interpreter is an infinite loop of such reasoning
cycles.
– The architecture and reasoning cycle together with the agent
program (specially plans) determine the behaviour of the agent.
Programming Organisations
• Concepts used to specify the state of an organisation:
–
–
–
–
Agents, Roles, Groups
Norms, Obligations, Prohibitions, Permissions, Violations
Dependency, Power, Delegation, Information ow relations
Deadlines, Sanctions, Rewards
• Management Infrastructure to control and coordinate
agent behaviour at run-time:
–
–
–
–
–
Endogenous: The control is a part of the agent program
Exogenous: The control is performed by an external system
Monitoring Agent Behaviour
Enforcing Organisational Rules
Regimenting Organisational Rules
Programming Environments
• Artifacts to represent the state of the environment
– Access to Databases/Services/etc., Coordination, Interaction
– Environment "objects", i.e., non-proactive entities
• Processing Operations on Artifacts
– Realising the effects of environments actions
– Providing events related to sensing the environment
– Synchronising agent actions
• At the right level of abstraction for a multi-agent system
WHY ENVIRONMENTS?
Agents and Environments
• The notion of environment is intrinsically related to the
notion of agent and multi-agent system
– “An agent is a computer system that is situated in some
environment and that is capable of autonomous action in this
environment in order to meet its design objective" [Wooldridge,
2002]
– “An agent is anything that can be viewed as perceiving its
environment through sensors and acting upon the environment
through effectors." [Russell and Norvig, 2003]
• Including both physical and software environments
Environment Programming: Issues
• Defining the interface
– actions, perceptions
– data-model
• Defining the environment computational model &
architecture
– how the environment works
– structure, behaviour, topology
– core aspects to face: concurrency, distribution
• Defining the environment programming model
– how to program the environment
Basic Level Overview
Single Agent Perspective
• Perception
– process inside agent inside of attaining awareness or
understanding sensory information, creating percepts perceived
form of external stimuli or their absence
• Actions
– the means to affect, change or inspect the environment
Multi-Agent Perspective
• In evidence
– overlapping spheres of visibility and inuence
– ..which means: interaction
Why Environment Programming?
• Basic level
– to create testbeds for real/external environments to ease the
interface/interaction with existing software environments
• Advanced level
– to uniformly encapsulate and modularise functionalities of the
MAS out of the agents typically related to interaction,
coordination, organisation, security
– Externalisation
• this implies changing the perspective on the environment
– environment as a first-class abstraction of the MAS
– endogenous environments (vs. exogenous ones)
– programmable environments
Basic Level: Features
• Environment conceptually conceived as a single
monolithic block
– providing actions, generating percepts
• Environment API
– to define the set of actions and program actions computational
behaviour
• which includes the generation of percepts
– typically implemented using as single object/class in OO such as
Java
• method to execute actions
• fields to store the environment state
– available in many agent programming languages/frameworks
• e.g., Jason, 2APL, GOAL, JADEX, Agent Factory
Example: Jason
• Flexible Java-based Environment API
– Environment base class to be specialised
• executeAction method to specify action semantics
• addPercept to generate percepts
Jason: Mars Environment
Jason: Mars Environment
Example: 2APL
• 2APL
– BDI-based agent-oriented programming language integrating
declarative programming constructs (beliefs, goals) and
imperative style programming constructs (events, plans)
• Java-based Environment API
– Environment base class
– implementing actions as methods
• inside action methods external events can be generated to be perceived by
agents as percepts
2APL: Block World Environment
2APL: Block World Environment
Environment Interface Standard
• Goal of the initiative
– design and develop a generic environment interface standard a
standard to connect agents to environments
– ... environments such as agent testbeds, commercial
applications, video games..
• Principles
– wrapping already existing environments
– creating new environments by connecting already existing apps
– creating new environments from scratch
• Requirements
– generic
– reuse
EIS Meta-Model
• By means of the Env. Interface agents perform actions
and collect percepts
– actually actions/percepts are issued to controllable entities in
environment model
– represent the agent bodies, with effectors and sensors
EIS Functions
• Interface functions
– attaching, detaching, and notifying observers (software design
pattern);
– registering and unregistering agents;
– adding and removing entities;
– managing the agents-entities-relation;
– performing actions and retrieving percepts;
– managing the environment
• Interface Intermediate language
– to facilitate data-exchange
– encoding percepts, actions, events
Advanced Level Overview
• Vision: environment as a rst-class abstraction in MAS
[Weyns et al., 2007, Ricci et al., 2010b]
– application or endogenous environments, i.e. that environment
which is an explicit part of the MAS
– providing an exploitable design & programming abstraction to
build MAS applications
• Outcome
– distinguishing clearly between the responsibilities of agent and
environment
• separation of concerns
– improving the engineering practice
Three Support Levels
• Basic interface support
• Abstraction support level
• Interaction-mediation support level
Basic Interface Support
• The environment enables agents to access the
deployment context
– i.e. the hardware and software and external resources with
which the MAS interacts
Abstraction Support
• Bridges the conceptual gap between the agent
abstraction and low-level details of the deployment
context
– shields low-level details of the deployment context
Interaction-Mediation Support
• Regulate the access to shared resources
• Mediate interaction between agents
Environment Definition Revised
• The environment is a first-class abstraction that provides
the surrounding conditions for agents to exist and that
mediates both the interaction among agents and the
access to resources
Environment Programming
• Environment as first-class programming abstraction
– software designers and engineers perspective
– endogenous environments (vs. exogenous one)
– programming MAS =
programming Agents + programming Environment
• Environment as first-class runtime abstraction for agents
– agent perspective
– to be observed, used, adapted, constructed, ...
• Defining computational and programming frameworks/
models also for the environment part
Environment Programming: Issues
• Defining the environment interface
– actions, percepts, data model
– contract concept, as dened in software engineering contexts
(Design by Contract)
• Defining the environment computational model
– environment structure, behaviour
• Defining the environment distribution model
– topology
Environment Programming:
Desiderata
• Abstraction
– keeping the agent abstraction level e.g. no agents sharing and
calling OO objects
– effective programming models for controllable and observable
computational entities
• Modularity
– away from the monolithic and centralised view
• Orthogonality
– wrt agent models, architectures, platforms
– support for heterogeneous system
Environment Programming:
Desiderata
• Dynamic extensibility
– dynamic construction, replacement, extension of environment
parts
– support for open systems
• Reusability
– reuse of environment parts for different kinds of applications
A&A AND CARTAGO
Agents & Artifacts Conceptual
Model
A&A Basic Concepts
• Agents
– autonomous, goal-oriented pro-active entities
– create and co-use artifacts for supporting their activities
• besides direct communication
• Artifacts
– non-autonomous, function-oriented, stateful entities
• controllable and observable
– modelling the tools and resources used by agents
• designed by MAS programmers
• Workspaces
– grouping agents & artifacts
– dening the topology of the computational environment
A&A Model Features
• Abstraction
– artifacts as first-class resources and tools for agents
• Modularisation
– artifacts as modules encapsulating functionalities, organized in
workspaces
• Extensibility and openness
– artifacts can be created and destroyed at runtime by agents
• Reusability
– artifacts (types) as reusable entities, for setting up different kinds
of environments
A&A Meta-Model
Artifact Abstract Representation
Examples of Artifacts
A Simple Taxonomy
• Individual or personal artifacts
– designed to provide functionalities for a single agent use
– e.g. an agenda for managing deadlines, a library...
• Social artifacts
– designed to provide functionalities for structuring and managing
the interaction in a MAS
– coordination artifacts, organisation artifacts, ...
• e.g. a blackboard, a game-board,...
• Boundary artifacts
– to represent external resources/services
• e.g. a printer, a Web Service
– to represent devices enabling I/O with users
• e.g GUI, console, etc.
Actions and Percepts in A&A
Environments
• Explicit semantics defined by the (endogenous) environment
– success/failure semantics, execution semantics
– defining the contract provided by the environment
• Actions <-> Artifacts Operation
the action repertoire is given by the dynamic set of operations
provided by the overall set of artifacts available in the workspace
can be changed by creating/disposing artifacts
– action success/failure semantics is defined by operation semantics
• Percepts <-> Artifacts Observable Properties + Signals
properties represent percepts about the state of the environment signals
represent percepts concerning events signalled by the environment
Interaction Model: Use
• Performing an action corresponds to triggering the
execution of an operation
– acting on artifact's usage interface
Interaction Model: Operation
Execution
• a process structured in one or multiple transactional steps
• asynchronous with respect to agent
– ...which can proceed possibly reacting to percepts and executing
actions of other plans/activities
• operation completion causes action completion
– action completion events with success or failure, possibly with
action feedbacks
Interaction Model: Observation
• Agents can dynamically select which artifacts to observe
– predefined focus/stopFocus actions
Interaction Model: Observation
• By focussing an artifact
– observable properties are mapped into agent dynamic
knowledge about the state of the world, as percepts
• e.g. belief base
– signals are mapped as percepts related to observable events
Artifact Linkability
• Basic mechanism to enable inter-artifact interaction
– linking artifacts through interfaces (link interfaces)
• operations triggered by an artifact over an other artifact
– Useful to design & program distributed environments
• realised by set of artifacts linked together
• possibly hosted in dierent workspaces
CArtAgO
• Common ARtifact infrastructure for AGent Open
environment (CArtAgO) [Ricci et al., 2009b]
– Computational framework / infrastructure to implement and run
artifact-based environment [Ricci et al., 2007c]
• Java-based programming model for dening artifacts
• set of basic API for agent platforms to work within artifact-based
environment
– Distributed and open MAS
• workspaces distributed on Internet nodes
– agents can join and work in multiple workspace at a time
• Role-Based Access Control (RBAC) security model
• Open-source technology
– available at http://cartago.sourceforge.net
© Copyright 2026 Paperzz