institut für softwarewissenschaft - universität wienp.brezany 1 multi-agent systems a modern...

29
Institut für Softwarewissenschaft - Universität Wien P.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Upload: adrian-lopez

Post on 28-Mar-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany1

Multi-Agent Systems

A Modern Approach to Distributed Artificial Intelligence

Peter Brezany

Page 2: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany2

Introduction and Definitions

• Intelligent Agents are relatively a new appearence in commercial applications.

• Their study began in the field of distributed artificial intelligence (DAI) vor 20 years.

• Definition: DAS is a field, which investigates systems where several (intelligent) entities cooperate to achieve one goal or to fulfill one common task. These entities are called agents and the field is called multi-agent systems (MAS).

• Currently several Java-based systems for the construction of MAS exist.

• Definition: An agent observes its environment by means of it sensors, and autonomously acts in this environment by means of its tools.

Page 3: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany3

An Agent in its Environment

Page 4: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany4

Attributes of an Intelligent Agent

1. Reaktivness – reaktion to changes in the environment is some time intervals to achieve its goal.

2. Proaktivness – to take initiative, goal-oriented behavior.

3. Social behavior – interraction with other agents to achieve their common goal.

Page 5: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany5

Agent Description : Example

action : P A

P - percept through sensors, A – action through effectors

Condition-action rules

Page 6: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany6

Agent Description : Example (2)

function SIMPLE-REFLEX-AGENT (percept) returns action

static: rules // a set of condition-action rules

env-state INTERPRET-INPUT(percept)

rule RULE-MATCH(env-state, rules)

action RULE-ACTION[rule]

return action

Page 7: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany7

Simple Example

if sensor (mailArrived) then effector (processMail)

Page 8: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany8

A Framework for Intelligent Agent Development

Translation from the Englishoriginal

Page 9: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany9

Mobile Agents

Page 10: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany10

Mobile Agent A mobile agent is an autonomous program that can migrate under its own control from machine to machine – on each machine, it interacts with service agents and other resources to accomplish its task.Below, an agent has migrated so that it can interact locally with a search engine and will migrate again to interact with additional search engines. Once the agent has the desired information, it will migrate one last time to return to its home site so that it can present the information to its owner.

Page 11: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany11

Introduction to the Topic

Internet and mobile agents• Think of the Internet as a distributed, massively parallel

supercomputer that connects information repositories, databases, intelligent agents, and a mobile code.

• You can send your own personalized agents to roam the Internet. They will monitor your favorite Web sites, get you the ticket you couldn‘t get at the box office or help you to remotely schedule meetings for your overseas trip.

The role of Java• The advent of Java has truly revolutionized the Internet.

It has created a global infrastructure that is just waiting for mobile agents to roam its wires and interact with millions od computers. (IBM Solution - Java Aglets)

Page 12: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany12

Introduction (2)

• Mobile agents have the unique ability to transport themselves from one system in a network to another. The ability to travel allows mobile agents to move to a system that contains services with which they want to interact and to take the advantage of being in the same host or network as the service (see the next figure).

• Mobile agents reduce network traffic and provide an effective means of overcoming network latency.

Page 13: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany13

Introduction (3)

Mobile Agents Traveling from Computer to Computer

Page 14: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany14

What is a Java Aglet?

• Aglet = „lightweight agent“• Generalization and extension of Java applets

and servlets.• Aglets are Java objects – mobile Java agents

that can move from one host on the Internet to another.

• „write once, run everywhere“ => „write once, go everywhere“

• An aglet that executes on one host can suddenly halt execution, dispatch itself to a remote host, and resume execution there.

• When the aglet moves, it takes along its program code as well as its data.

• Aglets are hosted by an Aglet server (see the next figure)

Page 15: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany15

Safe Hosting of Incoming Aglet

Page 16: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany16

What is the Aglet API?

• The Aglet API (Application Program Interface) is an agent development kit – in other words, a set of Java classes and interfaces that allows you to create mobile Java agents.

• The Aglets Software Development Kit (ASDK) is an implementation of the Aglet API that can be dowloaded from IBM Tokyo Research Laboratory´s Web site http://www.trl.ibm.com/aglets/idoagree103.htm.

Page 17: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany17

Several Good Reasons for Using MAs

1. They reduce the network load

Page 18: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany18

Several Good Reasons for Using MAs (2)

2. They execute asynchronously and autonomously.

Page 19: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany19

Several Good Reasons for Using MAs (3)

3. They overcome network latency – Critical real-time systems need to respond in real time to chnges in their environment. Controlling such systems throigh a factory network of a substantial size involves significant latencies – not acceptable in many cases.

Solution: Mobile agents can be dispatched from a central controller to act locally and directly execute the controller‘s directions.

4. They adapt dynamically. Mas have the ability to sense their execution environment and react autonomously to changes.

5. They are naturally heterogeneous – they provide optimal conditions for seamless system integration.

6. They are robust and fault-tolerant – dynamic reaction to unfavorable situations and events; if a host is being shut down, all agents executing on that machine will be warned and can dispatch and continua their operation on another host in the network.

Page 20: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany20

Network Computing Paradigms

Page 21: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany21

Elements of a Mobile Agent System

Page 22: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany22

Agent

The 2 fundamental concepts in the MA model: the agent and its execution environment – the place.

A mobile agent is an entity that has 5 attributes (When an agent moves in the network it takes them with it):

• State: needed to resume computation after travelling.• Implementation: needed for location-independent

agent execution.• Interface: needed for agent communication.• Identifier: needed to recognize and locate traveling

agents.• Principals: needed to determine legal and moral

responsibility (manufacturer, owner, etc).

Page 23: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany23

Agent Properties

Page 24: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany24

PlaceIt is a context in which an agent can execute.4 concepts play an important role in places:

• Engine : workhorse and virtual machine for one or more places• Resources : databases, processors, and other services provided by the host• Location : the network address of a given place• Principals : those legally responsible for the operation of a place

Page 25: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany25

The Agent Model Pyramid

Page 26: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany26

Agent Behavior: Creation and Disposal• An agent gets created in a place. The creation can

be initiated either by another agent residing in the same place or by nonagent system outside the place.

• The creator is required to authenticate itself to the place, establishing the authority and credentials that the new agent will possess; initialization arguments for the agent can also be supplied.

• Creation involves three steps:– Instantiation and identifier assignment.– Initialization.– Autonomous execution.

• Disposing of an agent:– Preparing for disposal.– Suspension of execution

Page 27: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany27

Agent Behavior: Transfer

• The transfer process can be initiated by– the agent itself, – another agent residing in the same place, or– another agent or nonagent system outside the place.

• The agent is then dispatched from its current place (origin) and received by the specified place destination

• The origin place and the destination place manage the dispatch process.

• See the next slide!

Page 28: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany28

Agent Transfer

Page 29: Institut für Softwarewissenschaft - Universität WienP.Brezany 1 Multi-Agent Systems A Modern Approach to Distributed Artificial Intelligence Peter Brezany

Institut für Softwarewissenschaft - Universität Wien

P.Brezany29

Agent Class Transfer