1 / 42

Agent Architectures

Agent Architectures. Michal Jakob Agent Technology Center, Dept. of Cybernetics, FEE Czech Technical University A4M33MAS Autumn 2010 - Lect. 2 (based on slides by Sebastian Sardina , RMIT University , Melbourne). An Example: Airport Assistant Robot.

sgrimes
Download Presentation

Agent Architectures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Agent Architectures Michal Jakob Agent Technology Center, Dept. of Cybernetics, FEE Czech Technical University A4M33MAS Autumn 2010 - Lect. 2 (based on slides by Sebastian Sardina, RMIT University, Melbourne)

  2. An Example: Airport Assistant Robot navigation, maintaing energy, communication, query solving, . . .

  3. An Example: Gold Mining Game • Two teams competing to collect and drop gold in the depot • dynamic • complex • unknown information • failing actions • failing sensors • multi-agent

  4. Constraints We want to program intelligent systems under the following constraints: • The agent interacts with an external environment • A grid world with gold pieces, obstacles, and other agents. • The environment is (highly) dynamic; may change in unexpected ways • gold pieces appear randomly; • Things can go wrong; plans and strategies may fail • a path may end up being blocked. • Agents have dynamic and multiple objectives. • explore, collect, be safe, communicate, etc.; • motivations/goals/desires may come and go; • plans can be interrupted.

  5. Assumptions Luckily we can also assume: • Failure is generally not catastrophic • I If gold is dropped, we just pick it up again. • If a tree blocks the path, we just go around it. • We can understand the system at the “intentional” level • Agents “desire” to collect as much gold as possible. • Agents “believe” they are close to the depot. • There is “some” sensible known procedural knowledge of the domain • It is “good” to avoid obstacles. • If we see gold close, then go and collect it. • If we bump into an unknown wall, then walk along it.

  6. Intelligent Agent beliefs: a database of agent’s information about itself, the world (environment), other agents, etc. NOW goals: description of states the agent “wants” to bring aboutFUTURE How to select actions leading from NOW to the FUTURE?

  7. Goal-based Agents • Hierarchy of agents • simple reflex agents • reflex agents with state • goal-based agents • utility-based agents

  8. Reactivity vs Proactivity Reactive planning/ BDI Deliberative (perceptions  0) Reactive (mental state  0) + context (future) = proactiveness, planning + can achieve goals requiring a sequence of multiple actions - weak responsiveness to the environment + responsive, robust w.r.t. unexpected = graceful degradation - no/little past, difficult to implement proactiveness - can get stuck in local optima How to marry proactivity and reactivity in a single computational model?

  9. Practical Reasoning

  10. Practical Reasoning • Practical reasoning is reasoning directed towards actions — the process of figuring out what to do: • “Practical reasoning is a matter of weighing conflicting considerations for and against competing options, where the relevant considerations are provided by what the agent desires/values/cares about and what the agent believes.” (Bratman) • Decides how the world should be and what individuals should do • Process by which you change your choices, plans, and intentions. • Example: you go to class, if you must go to class. • Theoretical reasoning is reasoning directed towards beliefs — concerned with deciding what to believe • Tries to assess the way things are. • Process by which you change your beliefs and expectations;. • Example: you believe q if you believe p and you believe that if p then q.

  11. Components of Practical Reasoning Human practical reasoning consists of two activities: • Deliberation: deciding what state of affairs we want to achieve • considering preferences, choosing goals, etc. • balancing alternatives (decision-theory); • the outputs of deliberation are intentions. • Means-ends reasoning:deciding how to achieve these states of affairs • thinking about suitable actions, resources and how to “organize” activity; • building courses of action (planning); • the outputs of means-ends reasoning are plans. • Fact: agents are resource-bounded & world is dynamic! • The key: To combine deliberation & means-ends reasoning appropriately.

  12. Deliberation How does an agent deliberate? • Begin by trying to understand what the options available to you are: • options available are desires • Choose between them, and commit to some: • chosen options are then intentions.

  13. Desires • Desires describe the states of affairs that are considered for achievement, i.e., basic preferences of the agent. • Desires are much weaker than intentions; not directly related to activity: • “My desire to play basketball this afternoon is merely a potential influence of my conduct this afternoon. It must vie with my other relevant desires [...] before it is settled what I will do. In contrast, once I intend to play basketball this afternoon, the matter is settled: I normally need not continue to weigh the pros and cons. When the afternoon arrives, I will normally just proceed to execute my intentions.” (Bratman 1990)

  14. Functional Components of Deliberation Option Generation: the agent generates a set of possible alternatives; via a function, options, which takes the agent’s current beliefs and intentions, and from them determines a set of options/desires. Filtering: the agent chooses between competing alternatives, and commits to achieving them. In order to select between competing options, an agent uses a filter function

  15. Intentions • In ordinary speech: intentions refer to actions or to states of mind; • here we consider the latter! • E.g., I may adopt/have the intention to be an academic. • Focus on future-directed intentions i.e. pro-attitudes leading to actions. • Intentions are about the (desired) future. • We make reasonable attempts to fulfill intentions once we form them, but they may change if circumstances do. • Behavior arises to fulfill intentions. • Intentions affect action choice

  16. Main Properties of Intentions • Intentions drive means-end reasoning • If I adopt the intention to become an academic, they I will decide how to achieve it, for example, by applying to a PhD programme. Moreover, if I fail to gain a PhD place at one university, I might try another university. • Intentionsconstrain future deliberation (i.e., provide a “filter”) • If I intend to be an academic, I would not consider being rich. • Intentions persist • If I intend to become an academic, I will not give up without a good reason—e.g., if I already obtained an academic position or realized that it will be impossible to be an academic. • Intentions influence beliefs concerning future practical reasoning • If I adopt the intention to be an academic, then I can plan for the future on the assumption that I will be an academic.

  17. Main Properties of Intentions (cont.) • Agents believe their intentions are possible • If I intend to be an academic, there must be some conceivable way for me to become an academic (e.g., getting a PhD and applying for a university position). • Agents do not believe they will not bring about their intentions • It would not be rational of me to adopt an intention to become an academic if I believed I would fail becoming one. • Under certain circumstances, agents believe they will bring about their intentions • If I intend to be an academic, then I believe that under “normal circumstances” I will indeed become an academic.

  18. Main Properties of Intentions (cont.) • Agents need not intend all the expected side effects of their intentions • If I believe a => b and I intend that a I do not necessarily intend b also • So, intentions are not closed under implication! • This last problem is known as the side effect or package deal problem: • I may believe that going to the dentist involves pain, and I may also intend to go to the dentist — but this does not imply that I intend to suffer pain!

  19. Plans • Human practical reasoning consists of two activities: • Deliberation: deciding what to do. Forms intentions. • Means-ends reasoning: deciding how to do it. Forms plans. Forms plans. • Intentions drive means-ends reasoning: If I adopt an intention, I will attempt to achieve it, this affects action choice.

  20. Means-End Reasoning: Obtaining Plans and (Next) Actions How does the agent obtain plans/actions to realize its intentions?

  21. Planning in Dynamic Environments • plan - execute - monitor cycle • plan from the current state to a goal state(s) • sequentially execute actions from the plan • monitor success of action execution • in the case of action failure, (re-)plan again (goto 1) • speed of planning vs. environment dynamics • planning speed > environment rate of change  can perform relatively well • planning speed < environment rate of change  leads to fatal inefficiencies; the system “suffocates” in (re-)planning

  22. Solution Idea: Reactive Planning • Instead of plan-execute-monitor cycle, select partial plans reactively on the ground of the current state of the world • partial plans encoded in the design time • Reactive planning agent: • current beliefs + future goals  choose from a plan library

  23. Commitments • After filter function, agent makes a commitment to chosen option: • Commitment: an agreement or pledge to do something in the future; • it implies temporal persistence. • Commitment strategies: • Blind/Fanatical commitment: A blindly committed agent will continue to maintain an intention until it believes the intention has actually been achieved. • Single-minded commitment: A single-minded agent will continue to maintain an intention until it believes that either the intention has been achieved, or else that it is no longer possible to achieve the intention. • Open-minded commitment: An open-minded agent to remains committed to its intentions until it succeeds or the goal is dropped.

  24. Belief-Desire-Intention (BDI) Architecture

  25. BDI Model of Agency • A model of agency with roots in practical reasoning and intentional systems • a set of concepts for thinking about and building agents • Behavior arises due to the agent committing to some of its desires, and selecting actions that achieve its intentions given its beliefs.

  26. BDI Concepts • Structural decomposition: • (B)eliefs: reflect agent’s static beliefs about its environment, itself, its peers, etc. (now) • (D)esires: descriptions of situations the agent wants to bring about (future) • System dynamics: from now to the future • (I)ntentions: courses of action, plans, the agent commits to • partial plans of action that the agent is committed to execute in order to fulfill the goals

  27. Abstract Rational Architecture • Rao and Georgeff (1992) proposed an abstract interpreter for agents: • Key to this architecture is the notion of events: • the inputs of the system; • both externals (from the environment) and internal (within the system); • will play a major role in BDI agent programming languages!

  28. Technology Development

  29. BDI Agent-oriented Programming • A new programming model and architecture to simplify the construction of todays large complex systems situated in dynamic environments: • View a system as composed of autonomous interacting entities (agents) which pursue their own goals and act in a rational manner. • Internal state and decision process of agents is modeled in an intuitive manner following the notion of mental attitudes. • Goal orientation: instead of directly requesting the agents to perform certain actions, the developer can define more abstract goals for the agents. • I provides a certain degree of flexibility on how to achieve the goals. • Can be seen as a “successor” of object-oriented programming

  30. Key Features of BDI Agent-oriented Systems Beliefs: information about the world. Events: goals/desires to resolve; internal or external. Plan library: recipes for handling goals-events. Intentions: partially uninstantiated programs with commitment

  31. Goal mining game BDI example • Beliefs • current location and location of depot. • size of grid, # of gold pieces carrying, etc. • Events • a gold piece is observed east • the coordinator requests to explore the grid • we formed the internal goal to travel to loc(10, 22) • Plan library • if I see gold here & I am not full, collect it • if I hit an obstacle, go around it • if I don’t know of any gold, explore grid • Intentions • I am currently traveling to the depot • I am informing my team-mates of new obstacles I find

  32. Events and Plans • Events stand for the goals/desires/tasks to be achieved or resolved: • percepts: goldAt(east), goldDropped, etc; • communication: told(player3, loc(3, 2)); • external request/goal: achieve(explore grid); • internal sub-goal: go to(loc(10, 22)). • Plans stand for strategies useful to resolve (pending) events: • encode typical operational procedures in the domain; • non-deterministic; • event-and context- dependent;

  33. Intentions • Agent’s intentions are determined dynamically by the agent at runtime based on its known facts, current goals, and available plans. • An intention is just a partially executed strategy: • comes from the plan library when resolving events. • An intention represent a focus of attention: • something the agent is currently working on; • actions/behavior arises as a consequence of executing intentions. • An agent may have several intentions active at one time. • different simultaneous focuses of attention; • A new intention is created when an external event is addressed. • An intention may create/post an internal event: • I the intention will be updated when this event is addressed.

  34. The BDI Execution Cycle [Rao&Georgeff 92] • Observe the environment for new external events. • Pick a pending event e. • Select relevant plans from library (match event). • Select applicable plans from relevant set (match context). • If event e is external, create new intention with selected plan. • If event e is internal, update intention with selected plan on top. • Partially execute some intention (may post internal events). • If execution fails, then perform failure recovery. • Repeat cycle.

  35. Key Points of BDI Programming BDI Programming = Implicit Goal-based Programming + Rational Online Executor • Flexible and responsible to the environment: “reactive planning” • Well suited for soft real-time reasoning and control. • Relies on context-sensitive subgoal expansion: “act as you go.” • Leave for as late as possible the choice of which plans to commit to as the chosen course of action to achieve (sub)goals. • Modular and incremental programming. • Non-determinism on choosing plans and bindings.

  36. Possibility of Many Options

  37. BDI: Is it a good idea? • Benefits: • facilitates quick response to changes in the environment • allows layering of the system • knowledge representation + reasoning vs. plan selection • plans can be encoded in the design time • better control on what the system does software enginering • Shortcommings: • (potentially) too much control of the system (is this still AI?) • no (straightforward) guarantees that the means leads to reaching the end (unlike planning!) • plan selection is quite greedy the system can get stuck

  38. Making Use of the BDI Framework Provide alternative plans where possible Break things down into subgoal steps Use subgoals and alternative plans rather than if... then in code Keep plans small and modular Plans are abstract modules - don’t chain them together like a flowchart

  39. Plan Structure

  40. Structuring Plans and Goals • Make each plan complete at a particular abstraction level • a high-level but complete plan for Attend Conference • Use a subgoal - even if only one plan choice for now • decouple a goal from its plans • Modular and easy to add other plan choices later. • Booking a flight can now be done with the Internet, if available! • Think in terms of subgoals, not function calls. • What way-points do we need to achieve so as to realize a goal? • Learn to pass information between subgoals. • How are these way-points inter-related w.r.t. data?

  41. Conclusions

  42. Conclusions • Balancing reactivity with proactivity key in programming intelligent agents • Pragmatic reasoning provides a foundation for reasoning towards action • BDI architecture utilize pragmatic reasoning as a way to build intelligent agents • Related reading: • Wooldridge: An Introduction to Multiagent Systems – Chapter 4

More Related