agents & mobile agents. agents an agent is anything that can be viewed as perceiving its...

34
Agents & Mobile Agents

Upload: garett-chappel

Post on 31-Mar-2015

216 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Agents & Mobile Agents

Page 2: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Agents

An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators

•• Human agent: eyes, ears, and other organs for

sensors; hands,• legs, mouth, and other body parts for actuators•• Robotic agent: cameras and infrared range

finders for sensors;• various motors for actuators•

Page 3: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Agents and environments

The agent function maps from percept histories to actions:

[f: P* A]

The agent program runs on the physical architecture to produce f

agent = architecture + program

Page 4: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Vacuum-cleaner world

Percepts: location and contents, e.g., ]A,Dirty[

Actions: Left, Right, Suck, NoOp

Page 5: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Agents - what are they?

Page 6: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Objects and Agents – An Analogy

• Objects encapsulate state, Agents encapsulate state + execution behaviour

• Objects have no control over the execution of methods

• Invocation of method m on object o – involuntary – whether object o likes it or not

Page 7: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Objects and Agents – An Analogy

• Agents have control of whether or not to perform any given action

• Request actions rather than invoke methods

Page 8: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Microsoft Agent

• persons Microsoft Agent

Page 9: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Basic Definitions

Page 10: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Rational agents

An agent should strive to "do the right thing", based on what it can perceive and the actions it can perform. The right action is the one that will

cause the agent to be most successful

Performance measure: An objective criterion for success of an agent's behavior

E.g., performance measure of a vacuum-cleaner agent could be amount of dirt cleaned up, amount of time taken, amount of electricity consumed, amount of noise generated, etc.

Page 11: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Simple reflex agents

Page 12: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Agents - Applications

• many due to:– agent research spans disciplines:

artificial intelligence, distributed computing, software engineering (ABSE), sociology, psychology, economics, object-oriented systems, artificial life, game theory, ...

• a sampling...

Page 13: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

What is a Mobile Agent?

Page 14: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

What is a Mobile Agent? • Software program• Moves from machine to machine under its own

control….• Suspend execution at any point in time,

transport itself to a new machine and resume execution

• Once created, a mobile agent autonomously decides which locations to visit and what instructions to perform

• Continuous interaction with the agent’s originating source is not required

• HOW? – Implicitly specified through the agent code– Specified through a run-time modifiable

itinerary

Page 15: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Mobile Agent• Derives from AI and distributed systems• Agent that migrates under its own control

in a heterogeneous environment• Mobility can be

– Strong: move code with current execution state

– Weak: move only code

Client ServerAgent

Server

Page 16: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Evolution

• BOTTOMLINE: Mobile Agents are a distributed computing paradigm

• End point in the incremental evolution of mobile abstractions such as mobile code, mobile objects, mobile processes.– Mobile Code – transfers code– Mobile Object – transfers code + data– Mobile Process – transfers

code + data + thread state• Mobile Agent – transfers

code + data + thread + authority of its owner

Page 17: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Inter-Agent Message Passing- Requirements

• Efficiency– Low location updating overhead– Low message delivery overhead

• Asynchrony– Asynchronous execution– Little constraint on the mobile agent

mobility.• Adaptability

– Suit different Communication and Migration Pattern

Page 18: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Inter-Agent Message Passing- Requirements

• Location Transparency– Message sender does not need to know the

physical location of the receiver agent, whose address changes frequently by moving from one host to another.

• Reliability– The concurrent and asynchronous nature of

message forwarding and agent migration may cause message loss or chasing problem.

– By reliability we mean the message can reach the target agent by a bounded number of forwarding.

Page 19: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

RPC Vs Mobile Agents • Mobile Agents

– Instead of calling a procedure, supply the procedure as well

– Messages: Mobile Agent ( procedure + data + state)

– “Sending” computer may have begun the procedure and the receiving computer will continue the procedure

– On-going interaction, but NO on-going communication

CLIENT

SERVER

network

MobileAgent

Service

Page 20: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Applets, Servlets and Mobile Agents

• Applet – Downloaded from server to client

• Servlet – Uploaded from client to server

• Mobile Agents – Detached from client, can have multiple hops

Page 21: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Advantages of the Mobile Agent Paradigm

• reduce bandwidth consumption and network loads• allow dynamic deployment of application components to

arbitrary network sites• encapsulate protocols• execute asynchronously and autonomously• can adapt by moving• run on heterogeneous platforms • most distributed applications fit naturally into the mobile

agent model• intuitively suitable for mobile users and disconnected

operations• Mobile agents combine the strengths of techniques such

as RPC, java applets etc. into a single, convenient framework

Page 22: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Levels of Mobility

• Weak Mobility – When moving a mobile agent

carries code + data state– On moving, execution has to start

from the beginning

Page 23: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Levels of Mobility

• Strong Mobility– When moving a mobile agent carries

code + data state + execution state

– Execution State – local variables and threads

– On moving, execution can continue from the point it stopped on the previous host

Page 24: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

MAPMAP

MAP

MAP

Page 25: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Design of ARP (Adaptive and Reliable Protocol)

• Mobile IP solution• Extention1: Mobile IP + Synchronization• Extension2: Distributed Home Scheme• Extension3: Mailbox-Based Scheme =

ARP

Page 26: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Mobile IP Solution

MAP

MAP

MAP

MAP-Home

Reg

Page 27: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Design of ARP

• Mobile IP solution– No Reliability Support

• Extention1: Mobile IP +Synchronization– The agent home coordinates message

passing and agent migration• Extension2: Distributed Home Scheme• Extension3: Mailbox-Based Scheme =

ARP

Page 28: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

MAP

Mobile IP + Synchronization

MAP

MAP

MAP-Home

Dereg ACK Reg

Page 29: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

MAP-Home

MAP

Mobile IP + Synchronization

MAP

MAP

Dereg ACK Reg

Page 30: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Caching Mechanism

MAP-1

MAP-2 MAP-3

Page 31: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Properties of ARP

• Location Transparency– Home + Caching Mechanism

• Reliability– Synchronization is used

• Asynchronous Migration• Adaptability

– Mobile IP + Synchronization– Distributed Home Scheme

• Efficiency

Page 32: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

IBM’s Aglet Toolkit An Applet-like programming model

for mobile agents Java (as many mobile agent toolkits

are! ) Aglet = Agent + Applet Aglet’s API facilitates mobile

technology Aglet: mobile java object that visits

aglet enabled hosts in a computer network

An Aglet = Instance of a Java class extending the Aglet Class

Page 33: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

IBM’s Aglet Toolkit

• An Aglet =Aglet state (values in variables) + Aglet code (class implementation)• Autonomous – runs its own thread after arriving at a host• Reactive – responds to incoming messages• Weak Mobility

Page 34: Agents & Mobile Agents. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment

Thank you for lessening