abdul rahim ahmad mitm 613 intelligent system chapter 5: intelligent agents

44
Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Upload: delphia-lang

Post on 17-Jan-2016

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Abdul Rahim Ahmad

MITM 613Intelligent System

Chapter 5: Intelligent Agents

Page 2: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Chapter five: Intelligent agents

Abdul Rahim Ahmad

2

5.1 Characteristics of an intelligent agent5.2 Agents and objects5.3 Agent architectures

5.3.1 Logic-based architectures5.3.2 Emergent behavior architectures5.3.3 Knowledge-level architectures5.3.4 Layered architectures

5.4 Multiagent systems5.4.1 Benefits of a multiagent system5.4.2 Building a multiagent system5.4.3 Communication between agents

5.5 Summary

Page 3: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Introduction

As information expands, people are becoming less and less able to act upon the large quantities of information available.

A way around this problem is to build intelligent agents to take care of specific tasks.

Abdul Rahim Ahmad

3

Page 4: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Uses of intelligent agent

To search the web for specific piece of information, consult a selection of search engines and filter the web pages and return only two or three pages that precisely match user needs are presented.

In the trading on the stock exchanges profit is due to rapid reaction to minor price fluctuations. And this is well handled by agents. (For human, by the time he made a decision, the opportunity would have been lost)

Abdul Rahim Ahmad

4

Page 5: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Uses of intelligent agent

For large and complex software system, it is hard to Maintain centrally.

Designed and tested against every eventuality.

Can modularise the software by Changing modules into autonomous agents.

System is self managing, - provided with knowledge of how to cope in particular situations, rather than being explicitly programmed to handle every foreseeable eventuality.

Abdul Rahim Ahmad

5

Page 6: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Definition of agent

An encapsulated computer system that is situated in some environment, and that is capable of flexible, autonomous action in that environment in order to meet its design objectives.

Abdul Rahim Ahmad

6

Page 7: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Characteristics of agent

Autonomy

Persistence

The ability to interact with its environment.

Abdul Rahim Ahmad

7

Page 8: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Characteristics of agent

Autonomy

Refers to an agent’s ability to make its own decisions based on its own experience and circumstances

PersistenceRefers to Agents ability to control its own internal state and behavior, implying that an agent functions continuously within its environment, i.e., it is persistent over time.

Abdul Rahim Ahmad

8

Page 9: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Characteristics of agent

The ability to interact with its environment Agents are situated, i.e., they are responsive to the demands of their environment and are capable of acting upon it. Interaction with a physical environment

requires perception through sensors, and action through actuators or effectors.

Interaction with a purely software environment is more straightforward, requiring only access to and manipulation of data and programs.Abdul

Rahim Ahmad

9

Page 10: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Characteristics of Intelligent Agents

reactive,

goal-directed,

adaptable,

socially capable.

Abdul Rahim Ahmad

10

Page 11: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Characteristics of Intelligent Agents

ReactiveAgent reacts because of some events.

Example: Agent whose only role is to place a warning on your computer screen when the printer has run out of paper.

Abdul Rahim Ahmad

11

Page 12: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Characteristics of Intelligent Agents

Goal Directed In modules of conventional computer code,

goal directed can thought in a limited sense that they have been programmed to perform a specific task regardless of their environment.

In an intelligent agent, agent decide its own goals and choose its own actions to pursue its goals. It must also be able to respond to unexpected changes in its environment.

Abdul Rahim Ahmad

12

Page 13: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Characteristics of Intelligent Agents

Adaptable

Agent has to balance reactive and goal-directed behavior, typically through a mixture of problem solving, planning, searching, decision making, and learning through experience.

Abdul Rahim Ahmad

13

Page 14: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Characteristics of Intelligent Agents

Social capability

Refers to the ability to cooperate and negotiate with other agents (or humans), which forms the basis of Multi agents system

Abdul Rahim Ahmad

14

Page 15: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Characteristics of Intelligent Agents

Overallbalance reactive and goal-directed behavior through problem solving, planning, searching, decision making, and learning.

Mobile agent – travel to remote computers, carry out task and return home with the task completed. (eg: determine a person’s travel plan). There is potential for malicious mobile agents, so security is a prime consideration for sites that accept them.

Abdul Rahim Ahmad

15

Page 16: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Agents vs. Objects

Objects

Allow complex problems to be broken down into simpler constituents while maintaining the integrity of the overall system.

Objects are viewed as obedient servants.

Agents

Intelligent agents can be seen as independent beings, referred to as autonomous agents.

Abdul Rahim Ahmad

16

Page 17: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Agents vs. Objects

When an agent receives a request to perform an action, it will make its own decision, based on its beliefs and in pursuit of its goals.

Agent behaves more like an individual with his or her own personality

Agent-based systems are analogous to human societies or organizations.

Abdul Rahim Ahmad

17

Page 18: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Agents vs. Objects

When an agent receives a request to perform an action, it will make its own decision, based on its beliefs and in pursuit of its goals.

Agent behaves more like an individual with his or her own personality

Agent-based systems are analogous to human societies or organizations.

Abdul Rahim Ahmad

18

Page 19: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Differences between Agents and Objects

Abdul Rahim Ahmad

19

Objects Agents

Autonomy Autonomy is not required.Object perform a task to achieve the developer’s overall goal. Object declare a method as public, allowing other objects to use that method.

Autonomy is required. Agent can only request the actions of another agent. What action to take rests with the receiver of the message.

Intelligence

Intelligence is not required Intelligence is required

Persistence

Objects could be made topersist from one run of a program to another. Single thread of control, sequential.

Agents persist in the sense that they are constantly “switched on” and operate concurrently. Multiple thread of control

Page 20: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Agent Architectures

Agent Architecture gives the internal representation (and reasoning capabilities) of an agent.

Four different schools of thought about how agent architecture, balancing between reactive and goal-directed behavior. Logic based.

Emergent Behavior.

Knowledge level.

Layered.Abdul Rahim Ahmad

20

Page 21: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Logic based

By the purists

Logical deduction based on a symbolic representation of the environment.

Elegant and rigorous.

Relies on the environment’s remaining unchanged during the reasoning process.

Difficult to symbolically represent the environment and reasoning about it.

Abdul Rahim Ahmad

21

Page 22: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Emergent Behaviour (1)

Based on argument that logical deduction about the environment is too detail, time-consuming. Eg: In emergency situation (like a heavy object is falling on

you), the priority should be to move out of the way rather than to analyze and prove the observation.

Agents has only a set of reactive responses to circumstances. Intelligent behaviour emerge from combination of such responses.

Agents are reactive (does not include symbolic world model or ability to perform complex symbolic reasoning). Eg: Brooks’ subsumption architecture (containing behavior

modules that link actions to observed situations without any reasoning at all.

Abdul Rahim Ahmad

22

Page 23: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Example Emergent Behaviour : Brooks Subsumption Architecture

Abdul Rahim Ahmad

23

The behaviors are arranged into hierarchy,

Low-level behavior has precedence over higher-level goal-oriented behaviors

Simple and practical (also highly effective).

Drawback : the emphasis placed on the local environment may lead to a lack of awareness of the bigger picture.

Page 24: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Knowledge level Architecture

Using knowledge-level agents where agent is a knowledge-based system (deliberative agent).

Represent symbolic model of the world and make decisions via logical reasoning based on pattern matching and symbolic manipulation.

A deliberative agent’s knowledge determines its behavior in accordance with Newell’s Principle of Rationality:

If an agent has knowledge that one of its actions will lead to one of its goals, then the agent will select that action.

Abdul Rahim Ahmad

24

Page 25: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Example approach: Beliefs–desires –intentions (BDI) Architecture BELIEFS - Knowledge of the environment; DESIRES-Overall goals

Both Together, shape the INTENTIONS (the selected options that the system commits itself toward achieving)

The intentions stay as long as they remain both consistent with the desires and achievable according to the beliefs.

DELIBERATION- Determining what to do, (the desires or goals is).

MEANS-END-ANALYSIS- determining how to do it.

Need to balance between reactivity and goal-directedness (between reconsidering intentions frequently (as a CAUTIOUS agent might) and infrequently (as a BOLD or cavalier agent might).

The cautious approach is best in a rapidly changing environment and the bold approach is best in a slowly changing environment.

Abdul Rahim Ahmad

25

Page 26: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

BDI Architecture

Abdul Rahim Ahmad

26

Page 27: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Layered Architecture

Adopt the two different stances: balance between reactive and goal-directed behavior

Example: Touring Machines (application where autonomous drivers of vehicles negotiating crowded streets)

Three (3)specific layers: a REACTIVE layer, a PLANNING layer for goal-directed behavior, and a MODELING layer for modeling the environment.

Problem : ensure balancing the layers; (an intelligent control subsystem can ensure that each layer has an appropriate share of power).

Abdul Rahim Ahmad

27

Page 28: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Example: Touring Machines

Abdul Rahim Ahmad

28

REACTIVE layer

PLANNING layer - goal-directed behavior

MODELING layer - modeling the environment.

Page 29: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Multiagent System

Team of agents working together.

Distributed artificial intelligence (DAI) , a branch of AI - attempts to mimic a society of humans working together.

Multiagent systems (MASs), or agent-oriented or agent-based systems, and Blackboard systems are important approach to DAI.

Abdul Rahim Ahmad

29

Page 30: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Multiagent System

A system in which several interacting, intelligent agents pursue a set of individually held goals or perform a set of individual tasks.

What are the benefits of MAS?

How do agents interact?

How do agents pursue goals and perform tasks?

Abdul Rahim Ahmad

30

Page 31: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Main Benefits of MAS

Abdul Rahim Ahmad

31

Can handle complex problems (large and cannot be solved by a single hardware or software system).

Intelligence in agents can handle a variety of circumstances.Well-designed agents will ensure that every circumstance is handled in an appropriate manner even though it may not have been explicitly anticipated.

Can handle distributed problems (data/information exist in different locations/times/clustered into groups requiring different processing methods or semantics)

Require a distributed solution, which can be provided by agents running concurrently, each with its own thread of control

Page 32: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Other Benefits of MAS More natural intelligence.

Fast and efficient – due to concurrently running.

Robust and reliable – due to ability to take over.

Scalable – adding agents.

Granular - operate at an appropriate level of detail.

Ease of development - encapsulation and reuse.

Cheaper Cost.

MASs, on the one hand, are suited to the design and

construction of complex, distributed software systems and, on the other, are appropriate as a mainstream software engineering paradigm

Abdul Rahim Ahmad

32

Page 33: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Agent levels of abstraction

Abdul Rahim Ahmad

33

Page 34: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Building MAS

key design decisions when, how, and with whom should agents

interact?

Cooperative models several agents try to combine their efforts to

accomplish as a group what the individuals cannot.

Competitive models each agent tries to get what only some of them can

have.

In either type of model, agents are generally assumed to be honest.Abdul

Rahim Ahmad

34

Page 35: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Building MAS

Design Decision bottom-up

top-down.

Bottom-up - agents built with sufficient capabilities (such as communication protocols) to enable them to interact effectively)

Top-down – (or societal norms) — are applied at the group level in order to define how agents should interact. Abdul

Rahim Ahmad

35

Page 36: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Building MAS

MAS represents computer models of human functional roles with some interaction structure: hierarchical control structure : one agent is the

superior of other subordinate agents.

Peer group relations, in a team-based organization.

3 models for managing agent interaction Contract Nets.

Cooperative Problem Solving (CPS)

Shifting Matrix Management (SMM)Abdul Rahim Ahmad

36

Page 37: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Contracts Net Manager agent generates tasks and monitor

the executions.

Manager has agreements with contractor agents that will execute the tasks. Each agents has roles that can be taken dynamically.

Manager agent advertises tasks to other agents.

Interested Agents submit bid.

Manager evaluates the bids and awards contracts to appropriate agents.

Manager and contractor linked by a contract and communicate privately while the contract is executed.

Managers supply task information

Contractor reports progress and final result

The negotiation process may recur if a contractor subdivides its task and awards contracts to other agents, for which it is the manager. Abdul

Rahim Ahmad

37

(a) Manager advertises a task;

(b) potential contractors bid for the task;

(c) manager awards the contract;

(d) manager and contractor communicate privately

Page 38: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Cooperative problem-solving (CPS) Framework

Stage 1: recognition. Some agents recognize the potential for cooperation with an agent that is seeking assistance, possibly because it has a goal it cannot achieve in isolation.

Stage 2: team formation. An agent that recognized the potential for cooperative action at Stage 1 solicits further assistance. If successful, this stage ends with a group having a joint commitment to collective action.

Stage 3: plan formation. The agents attempt to negotiate a joint plan that they believe will achieve the desired goal.

Stage 4: team action. The newly agreed plan of joint action is executed. By adhering to an agreed social convention, the agents maintain a close-knit relationship throughout.

Abdul Rahim Ahmad

38

Top down model

Agent’s intentions is a key role: They determine the agent’s personal

behavior at any instant.

Joint intentions control the social behavior.

Agent’s intentions are shaped by its commitment, and its joint intentions by its social convention

Page 39: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Shifting Matrix Management (SMM)

Abdul Rahim Ahmad

39

The nodes represent people

Inspired by Mintzberg’s Shifting Matrix Management model of organizational structures

Allows multiple lines of authority, reflecting the multiple functions expected of a flexible workforce.

Regard lines of authority as temporary, typically changing as different projects start and finish.

Page 40: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Shifting Matrix Management (SMM)

Stage 1: goal selection. Agents select the tasks they want to perform, based on their initial mental states.

Stage 2: individual planning. Agents select a way to achieve their goals. In particular, an agent that recognizes its intended goal is common to other agents would have to decide whether to pursue the goal in isolation or in collaboration with other agents.

Stage 3: team formation. Agents that are seeking cooperation attempt to organize themselves into a team. The establishment of a team requires an agreed code of conduct, a basis for sharing resources, and a common measure of performance.

Stage 4: team planning. The workload is distributed among team members.

Stage 5: team action. The team plan is executed by the members under the team’s code of conduct.

Stage 6: shifting. The last stage of the cooperation process, which marks the disbanding of the team, involves shifting agents’ goals, positions, and roles. Each agent updates its probability of team-working with other agents, depending on whether or not the completed team-working experience with that agent was successful. This updated knowledge is important, as iteration through the six stages takes place until all the tasks are accomplished.

Abdul Rahim Ahmad

40

Page 41: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

Agent Communications

How agents communicate with each other? Synchronous communication is rather like a conversation — after sending a

message, the sending agent awaits a reply from the recipient.

Asynchronous communication is more akin to sending an email or a letter — although you might expect a reply at some future time, you do not expect the recipient to read or act upon the message immediately.

Messages structure Standard between agents, regardless of the domain in which they are operating.

Message should be understandable by all agents regardless of their domain, even if they do not understand its content.

Thus, structure needs to be standardized such that domain-specific content is self-contained within it. Only specialist agents need to understand the content, but all agents need to be able to understand the form of the message.

Structures for achieving this are called agent communication languages (ACLs) such as

Knowledge Query and Manipulation Language (KQML).

FIPA-ACL by Foundation for Intelligent Physical Agents (FIPA)

Abdul Rahim Ahmad

41

Page 42: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

KQML

Abdul Rahim Ahmad

42

Page 43: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

KQML Components A performative - a single word that

describes the purpose of the message, e.g., tell, cancel, evaluate, advertise, ask-one, register, reply.

The identity of the agent that is the sender.

The identity of the agent that is the receiver.

The language used in the content of the message. Although KQML defines the overall form of the message, any programming language can be used for the domain-specific content.

The ontology, or vocabulary, of the message. This provides the context within which the message content is to be interpreted.

The message content.

Abdul Rahim Ahmad

43

Problem : Selecting a polymer to meet an engineering design requirement

A program is merely a collection of words and symbols organized as statements. It would, for instance, remain syntactically correct if each polymer name were replaced by the name of a separate type of fruit. The statements only become meaningful once they are interpreted in the vocabulary of engineering polymers.

In the polymer selection world mentioned above, agent1 might wish to tell agent2 about the properties of polystyrene, encoded in Prolog. Using KQML, it could do so with the following message

Page 44: Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 5: Intelligent Agents

The End – Thank You

Abdul Rahim Ahmad

44