CMSC 691 M Agent Architectures MultiAgent Systems Spring

  • Slides: 31
Download presentation
CMSC 691 M Agent Architectures & Multi-Agent Systems Spring 2002 – February 26 Class

CMSC 691 M Agent Architectures & Multi-Agent Systems Spring 2002 – February 26 Class #9 – Formal Methods for MAS Prof. Marie des. Jardins

Today’s overview n Reading: Weiss Chap. 8, “Formal Methods in DAI” (Munindar P. Singh,

Today’s overview n Reading: Weiss Chap. 8, “Formal Methods in DAI” (Munindar P. Singh, Anand S. Rao, and Michael P. Georgeff) q q q q Why use formal methods? Classes of logics Beliefs, desires, and intentions Implementing BDI models Coordinating BDI agents Communicating BDI agents Societies of BDI agents

Why use formal methods? n n Specify properties of agents declaratively Provide reasoning mechanisms

Why use formal methods? n n Specify properties of agents declaratively Provide reasoning mechanisms for agents Benefits + Specify complex behavior at an abstract level + Validate agent behaviors Disadvantages - Intractable in general case - Limiting precisely because of formalism and abstract representation

What’s to be modeled? Propositional logic n Modal logic First-order logic To design and

What’s to be modeled? Propositional logic n Modal logic First-order logic To design and implement intelligent agents, we may need to be able to reason about the truth of propositions and relations between objects in the world, to reason about what may or must be true, to reason about how the agent’s actions affect the state of the world, and to reason about how other agents and external agents change the world over time. Temporal logic Dynamic logic

Classes of logics Wffs (syntax) Proof theory (inference) Model theory (semantics) Propositional Atoms closed

Classes of logics Wffs (syntax) Proof theory (inference) Model theory (semantics) Propositional Atoms closed under Implication and “Meaning” of and ¬ rules for and ¬ propositions Predicate (first-order) Adds quantifiers and , relations, variables Inference rules for quantifiers and variable binding “Meaning” of relations Modal Adds possibility and necessity � Inference rules for and � Possible worlds Dynamic Adds sequencing, branching, testing Inference rules for outcomes Possible worlds with transitions Temporal Adds notion of time points or intervals, ordering Inference for propositions w/ temporal extent Possible worlds with multiple transitions

Propositional logic n n L = true atomic propositions P is entailed iff P

Propositional logic n n L = true atomic propositions P is entailed iff P L P Q is entailed iff P and Q are entailed P is entailed iff P is not entailed

Predicate (first-order) logic n n x (Q(x)) is entailed iff Q(l) holds for every

Predicate (first-order) logic n n x (Q(x)) is entailed iff Q(l) holds for every object l x (Q(x)) is entailed iff Q(l) holds for some object l

Modal logic n n Possible worlds semantics Accessibility relation R(W 1, W 2): Possibility:

Modal logic n n Possible worlds semantics Accessibility relation R(W 1, W 2): Possibility: P is entailed in world w iff P is true in some possible world ( w’: R(w, w’) P is entailed in w’) Necessity: □P is entailed in w iff P is true in every possible world ( w’: R(w, w’) → P is entailed in w’)

Dynamic logic (“modal logic of action”) n n n Sequencing: a; b – do

Dynamic logic (“modal logic of action”) n n n Sequencing: a; b – do a, then do b Choice: a+b – do either a or b nondeterministically Testing: p? –TRUE if p, FALSE if p q n ((q? ; a) + (( q? ; b)) ≡ if q then a else b Accessibility relation RA – reachability of worlds via (composite) action A

Dynamic logic – modeling outcomes n Possible outcomes q q n <A>P is entailed

Dynamic logic – modeling outcomes n Possible outcomes q q n <A>P is entailed in w iff P is entailed in some world reachable by applying action A <A>P w’: RA(w, w’) P entailed in w’ Necessary outcomes q q [A]P is entailed in w iff P is entailed in all worlds reachable by applying action A [A]P w’: RA(w, w’) → P entailed in w’

Temporal logic – variations n n n Linear vs. branching: modeling a single sequence

Temporal logic – variations n n n Linear vs. branching: modeling a single sequence of events/outcomes vs. modeling a branching series of alternative possible worlds Discrete vs. dense (continuous): time treated as discrete intervals vs. continuously flowing Moment-based (point) vs. period-based (interval): units of time treated as points or intervals

Discrete moment-based branching temporal logic n n n Moment in time are partially ordered

Discrete moment-based branching temporal logic n n n Moment in time are partially ordered Each moment is associated with a possible world The actions of multiple agents can influence which moment (possible world) occurs next

Linear temporal logic n n n p q at moment t means that p

Linear temporal logic n n n p q at moment t means that p holds from t until t’ and q holds at t’ X p at moment t means that p holds in the moment immediately following t P p at moment t means that p was true at t’ where t’ is before t F p at moment t means that p is true at some moment t’ after t G p at moment t means that p is true at every moment t’ after t

Branching temporal logic n n “The present moment” “Reality” A p means that p

Branching temporal logic n n “The present moment” “Reality” A p means that p is true in all paths at the present moment (i. e. , no matter what may have gone before or will happen in the future, p is true now) – temporal equivalent of the necessity operator of modal logic E p means that p is true in some path at the present moment – temporal equivalent of possibility operator

Branching temporal logic II n n n X<a>p is true (at a particular moment,

Branching temporal logic II n n n X<a>p is true (at a particular moment, on a particular path) iff p is a possible outcome of agent x performing action a X[a]p is true (at a particular moment, on a particular path) iff p is a necessary outcome of agent x performing action a V a : p is true (at a moment and on a path) iff there is some action a under which p becomes true

Brief commentary on logics n n n Branching temporal logic is very powerful, and

Brief commentary on logics n n n Branching temporal logic is very powerful, and has been used to develop planners and other agent architectures Many researchers use ideas from some or all of these logics in their agent designs and representations Very few researchers use the full formal specification of these logics in building systems (though it isn’t uncommon to see them in conference and journal papers)

Beliefs, desires, and intentions n Use modal logic to model agent’s cognitive attitudes: beliefs,

Beliefs, desires, and intentions n Use modal logic to model agent’s cognitive attitudes: beliefs, desires, goals, knowhow, and intentions

Beliefs n n X Bel p iff p is entailed in every possible world

Beliefs n n X Bel p iff p is entailed in every possible world the agent believes it can be in (modeled by the B accessibility relation) Interestingly, although a proposition q may be believed by this definition, an agent may not believe that it believes q q Limited rationality / limited computational resources means that the agent can’t derive everything that it “believes”

Desires n n x Des p iff p holds in all possible worlds reachability

Desires n n x Des p iff p holds in all possible worlds reachability by the D accessibility relation The agent might not know how to reach the states it desires to be in An agent can desire to be in conflicting states Goals are the subset of the agent’s desires that are achievable and consistent

Intentions n n x Int p iff p is true along all paths that

Intentions n n x Int p iff p is true along all paths that are reachable by the I accessibility relation According to this definition, an agent can “intend” something it doesn’t desire An agent can also have an unsatisfiable intention (if the set of reachable paths is empty) An agent can intend something, and yet fail to make it come true (if it proceeds along a path that isn’t in its set of intended paths) q q Know-how models when an agent can guarantee the success of its actions More useful might be to model when an agent might be able to guarantee the success of its actions

Commitments n n Agents that persist with their intentions (as long as they are

Commitments n n Agents that persist with their intentions (as long as they are satisfiable) are said to be committed to those intentions The concept of a commitment is very useful in modeling societies of agents

Basic interpreter basic-interpreter initialize-state(); do “intentions” percepts internal state options : = option-generator (event-queue,

Basic interpreter basic-interpreter initialize-state(); do “intentions” percepts internal state options : = option-generator (event-queue, S); selected-options : = deliberate (options, S); update-state (selected-options, S); execute (S); event-queue : = get-new-events(); until quit.

BDI interpreter BDI-interpreter initialize-state(); do Beliefs, desires (goals), and intentions options : = option-gen

BDI interpreter BDI-interpreter initialize-state(); do Beliefs, desires (goals), and intentions options : = option-gen (event-queue, B, G, I); selected-options : = deliberate (options, B, G, I); update-intentions (selected-options, I); execute (I); event-queue : = get-new-events(); satisfied or drop-successful-attitudes (B, G, I); unrealizable beliefs, goals, and drop-impossible-attitudes (B, G, I); until quit. intentions

Issues in implementation n Updating the BDI structures is intractable in the general case

Issues in implementation n Updating the BDI structures is intractable in the general case Use only explicit beliefs and goals Represent beliefs, goals and intentions as plan structures that are followed by the agent q q Support means-ends reasoning Hierarchically structured

Coordinating BDI agents n Model actions of the agents in terms of how they

Coordinating BDI agents n Model actions of the agents in terms of how they can be affected by other agents’ preferences q q n Flexible actions can be delayed or omitted Inevitable actions can be delayed but not omitted Immediate actions can be neither delayed nor omitted Triggerable actions can be performed at the request of another agent Use a finite state automaton (skeleton) to model the state transitions of the agent

Coordination relationships n Model the relationships between two agents’ events q q q q

Coordination relationships n Model the relationships between two agents’ events q q q q Is-required-by Disables Enables Conditionally enables (guaranteeing enablement) Initiates Jointly-required-by Compensates-for-failure

Communicating BDI agents n Performative: speech act that is itself an action q q

Communicating BDI agents n Performative: speech act that is itself an action q q q q Informing Requesting Promising Permitting Prohibiting Declaring Expressing

Communicating: Ontologies n Ontology – representation of objects and relationships in the world q

Communicating: Ontologies n Ontology – representation of objects and relationships in the world q q q Not quite the same as a knowledge base An ontology is typically the “representational” part of a knowledge base… …but sometimes axioms and rules are in an ontology

Societies of BDI agents n Groups of agents interact in some way q q

Societies of BDI agents n Groups of agents interact in some way q q n Agents may have different roles within the group The agents may be heterogeneous or homogeneous Teams of agents share (some) common goals

Mutual BDI n Mutual beliefs q q n Joint intentions q n n Everyone

Mutual BDI n Mutual beliefs q q n Joint intentions q n n Everyone believes p, believes that the others believe … Impossible to achieve perfect mutual information in environments where communication can fail: “We attack at dawn” Everyone intends p; everyone will persist with p until achieved or impossible Shared plans: intending-to and intending-that Social commitments: promises and persistence

A few notes on grammar n n “Punctuation always goes inside a quote. ”

A few notes on grammar n n “Punctuation always goes inside a quote. ” “That” is used to define; “which” is used to clarify or extend q q n The system that Weiss describes is … (“that” tells which system I’m talking about) The PRS system, which Georgeff et al. developed, … (“which” tells more about the only system in question) Useful references: q q q Strunk and White, Elements of Style Du. Pre, Bugs in Writing Chicago Manual of Style