MITM 613 Intelligent System Chapter 5 Intelligent Agents

  • Slides: 44
Download presentation
MITM 613 Intelligent System Chapter 5: Intelligent Agents Abdul Rahim Ahmad

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

2 Chapter five: Intelligent agents 5. 1 Characteristics of an intelligent agent 5. 2

2 Chapter five: Intelligent agents 5. 1 Characteristics of an intelligent agent 5. 2 Agents and objects 5. 3 Agent architectures 5. 3. 1 Logic-based architectures 5. 3. 2 Emergent behavior architectures 5. 3. 3 Knowledge-level architectures 5. 3. 4 Layered architectures 5. 4 Multiagent systems 5. 4. 1 Benefits of a multiagent system 5. 4. 2 Building a multiagent system 5. 4. 3 Communication between agents 5. 5 Summary Abdul Rahim Ahmad

3 Introduction § As information expands, people are becoming less and less able to

3 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

4 Uses of intelligent agent § To search the web for specific piece of

4 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. Abdul Rahim Ahmad § 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)

5 Uses of intelligent agent § For large and complex software system, it is

5 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. Abdul Rahim Ahmad § System is self managing, - provided with knowledge of how to cope in particular situations, rather than being explicitly programmed to handle every foreseeable eventuality.

6 Definition of agent § An encapsulated computer system that is situated in some

6 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

7 Characteristics of agent § Autonomy § Persistence § The ability to interact with

7 Characteristics of agent § Autonomy § Persistence § The ability to interact with its environment. Abdul Rahim Ahmad

8 Characteristics of agent § Autonomy Refers to an agent’s ability to make its

8 Characteristics of agent § Autonomy Refers to an agent’s ability to make its own decisions based on its own experience and circumstances § Persistence Refers 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

9 Characteristics of agent § The ability to interact with its environment Agents are

9 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

10 Characteristics of Intelligent Agents § reactive, § goal-directed, § adaptable, § socially capable.

10 Characteristics of Intelligent Agents § reactive, § goal-directed, § adaptable, § socially capable. Abdul Rahim Ahmad

11 Characteristics of Intelligent Agents § Reactive Agent reacts because of some events. Example:

11 Characteristics of Intelligent Agents § Reactive Agent 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

12 Characteristics of Intelligent Agents § Goal Directed § In modules of conventional computer

12 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

13 Characteristics of Intelligent Agents § Adaptable Agent has to balance reactive and goal-directed

13 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

14 Characteristics of Intelligent Agents § Social capability Refers to the ability to cooperate

14 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

15 Characteristics of Intelligent Agents § Overall balance reactive and goal-directed behavior through problem

15 Characteristics of Intelligent Agents § Overall balance reactive and goal-directed behavior through problem solving, planning, searching, decision making, and learning. Abdul Rahim Ahmad § 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.

16 Agents vs. Objects § Objects Allow complex problems to be broken down into

16 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

17 Agents vs. Objects § When an agent receives a request to perform an

17 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 Agents vs. Objects § When an agent receives a request to perform an

18 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

19 Abdul Rahim Ahmad Differences between Agents and Objects Agents Autonomy is not required.

19 Abdul Rahim Ahmad Differences between Agents and Objects Agents 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 is not required Intelligence is required Persistence Objects could be made to persist 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

20 Agent Architectures § Agent Architecture gives the internal representation (and reasoning capabilities) of

20 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. Abdul Rahim Ahmad § Layered.

21 Logic based § By the purists § Logical deduction based on a symbolic

21 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

22 Emergent Behaviour (1) § Based on argument that logical deduction about the environment

22 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). Abdul Rahim Ahmad § Eg: Brooks’ subsumption architecture (containing behavior modules that link actions to observed situations without any reasoning at all.

23 Abdul Rahim Ahmad Example Emergent Behaviour : Brooks Subsumption Architecture § The behaviors

23 Abdul Rahim Ahmad Example Emergent Behaviour : Brooks Subsumption Architecture § The behaviors are arranged into hierarchy, § Low-level behavior has precedence over higherlevel 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.

24 Knowledge level Architecture § Using knowledge-level agents where agent is a knowledge-based system

24 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

25 Example approach: Beliefs–desires –intentions (BDI) Architecture § BELIEFS - Knowledge of the environment;

25 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

26 BDI Architecture Abdul Rahim Ahmad

26 BDI Architecture Abdul Rahim Ahmad

27 Layered Architecture § Adopt the two different stances: balance between reactive and goal-directed

27 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. Abdul Rahim Ahmad § Problem : ensure balancing the layers; (an intelligent control subsystem can ensure that each layer has an appropriate share of power).

28 Example: Touring Machines § REACTIVE layer § PLANNING layer - goal-directed behavior Abdul

28 Example: Touring Machines § REACTIVE layer § PLANNING layer - goal-directed behavior Abdul Rahim Ahmad § MODELING layer - modeling the environment.

29 Multiagent System § Team of agents working together. § Distributed artificial intelligence (DAI)

29 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 agentoriented or agent-based systems, and Blackboard systems are important approach to DAI. Abdul Rahim Ahmad

30 Multiagent System § A system in which several interacting, intelligent agents pursue a

30 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

31 Main Benefits of MAS Can handle complex problems (large and cannot be solved

31 Main Benefits of MAS 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 Abdul Rahim Ahmad

32 Other Benefits of MAS § More natural intelligence. § Fast and efficient –

32 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

33 Agent levels of abstraction Abdul Rahim Ahmad

33 Agent levels of abstraction Abdul Rahim Ahmad

34 Building MAS § key design decisions § when, how, and with whom should

34 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

35 Building MAS § Design Decision § bottom-up § top-down. § Bottom-up - agents

35 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

36 Building MAS § MAS represents computer models of human functional roles with some

36 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

37 Contracts Net § Manager agent generates tasks and monitor the executions. § Manager

37 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. (b) potential contractors bid for the task; § Managers supply task information § Contractor reports progress and final result (c) manager awards the contract; § The negotiation process may recur if a contractor subdivides its task and awards contracts to other agents, for which it is the manager. (a) Manager advertises a task; Abdul Rahim Ahmad (d) manager and contractor communicate privately

38 Cooperative problem-solving (CPS) Framework § Top down model § Agent’s intentions is a

38 Cooperative problem-solving (CPS) Framework § Top down model § Agent’s intentions is a key role: § § § Abdul Rahim Ahmad 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 § 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 closeknit relationship throughout.

39 Shifting Matrix Management (SMM) § The nodes represent people § Inspired by Mintzberg’s

39 Shifting Matrix Management (SMM) § 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. Abdul Rahim Ahmad

40 Abdul Rahim Ahmad Shifting Matrix Management (SMM) § Stage 1: goal selection. Agents

40 Abdul Rahim Ahmad 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.

41 Agent Communications § § Abdul Rahim Ahmad How agents communicate with each other?

41 Agent Communications § § Abdul Rahim Ahmad 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)

42 KQML Abdul Rahim Ahmad

42 KQML Abdul Rahim Ahmad

43 KQML Components § Abdul Rahim Ahmad A performative - a single word that

43 KQML Components § Abdul Rahim Ahmad 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. § 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, agent 1 might wish to tell agent 2 about the properties of polystyrene, encoded in Prolog. Using KQML, it could do so with the following message

44 The End – Thank You Abdul Rahim Ahmad

44 The End – Thank You Abdul Rahim Ahmad