©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

43
©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory

Transcript of ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Page 1: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

©Agent Technology, 2008, Ai Lab NJU

Agent Technology

Agent model and

theory

Page 2: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU2

Agent model and theory

6.1 Logical Background– 6.1.1 Basic Concepts– 6.1.2 Propositional and Predicate Logic– 6.1.3 Modal Logic– 6.1.4 Dynamic Logic– 6.1.5 Temporal Logic

6.2 Cognitive Primitives– 6.2.1 Knowledge and Beliefs– 6.2.2 Desires and Goals– 6.2.3 Intentions

Page 3: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU3

Chapter 4: Agent model and theory

– 6.2.4 Commitments– 6.2.5 Know-how

6.3 Belief Revision– 6.3.1 AGM Framework– 6.3.2 Epistemic entrenchment

6.4 Social Primitives– 6.4.1 Team and Organizational Structure– 6.4.2 Mutual Beliefs and Joint Intentions– 6.4.3 Social Commitments– 6.4.4 Group Know-how and Intentions

Page 4: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU4

6.1 Logical Background

6.1.1 Basic Concepts– Why need formal method?

As internal specification languages to be used by the agent in its reasoning or action;

As external metalanguages to be used by the designer to specify, design, and verify certain behavioral properties of agents situated in a dynamic environment.

– Differents between these languages One would like to have the same logical language server

both of the above purpose. The internal language should be computationally efficie

nt. The external language should be more expressive.

Page 5: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU5

6.1 Logical Background

6.1.1 Basic Concepts– Three aspects to logic

Well-formed formulas: some statements; Proof-theory: is also called the syntax; Model-theory: is also called the semantics.

– Purpose of the semantics

iM p

M p

Page 6: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU6

6.1 Logical Background

6.1.2 Propositional and Predicate Logic– How to use this logic in agent

Is simplest Represent factual information, often about the agents’

environment.

– Example 6.1 The facts “it rains” and ‘road is wet”; Atomic propositions

– Rain– Wet-road

Implication that “if it rains, then the road is wet” can be captured by the propositional formula

– Rain -> wet-road

Page 7: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU7

6.1 Logical Background

6.1.2 Propositional and Predicate Logic

– The language of propositional logic Assume a set is given atomic propositions;

SYN-1.

SYN-2.

– The formal model Let L identifies the set of atomic propositions that are

true.

SEM-1.

SEM-2.

SEM-3.

implies that pL

pL

, implies that ,p pp q L p q p L

0 iff ,where M L

0 0 0 iff and M p q M p M q

0 0 iff M p M p

0defM L

Page 8: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU8

6.1 Logical Background

6.1.2 Propositional and Predicate Logic

– Imply is true if p is false irrespective of q

– Predicate logic Do not use predicate logic in the specification language.

Use it in metalanguage, which is used in semantic condi

tions.

Universal quantifier

Existential quantifier

p q

Page 9: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU9

6.1 Logical Background

6.1.3 Modal Logic

– Objective To investigate different modes of truth, such as

possibly true and necessarily true.

In agents’ study, it is used to give meaning to concepts

such as belief and knowledge.

– Modal language Classical propositional logic is extended with two modal

operators: for possibility and for necessity.

SYN-3.

SYN-6.

ML

the rules for pL

implies that , p Mp L p p L

Page 10: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU10

6.1 Logical Background

6.1.3 Modal Logic

– Example 6.2 “it is possible that it rains” as

“it is necessary that the sun rises in the east” as

– Model is the set of the worlds

gives the set of formulas true at a world

is an accessibility relation

SEM-6.

rain

sun rises in the east

1 , ,defM W L R W

: 2L W

R W W

1 iff ,where wM L w

Page 11: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU11

6.1 Logical Background

SEM-5.

SEM-6.

SEM-6.

SEM-8.

– Algebric properties of the accessibility relation R is reflexive iff

R is serial iff

R is transitive iff

R is symmetric iff

R is euclidean iff

1 1 1 iff w w wM p q M p and M q

1 1 iff w wM p M p

1 1 iff : , &w wM p w R w w M p

1 1 iff : ,w wM p w R w w M p

: ,w w w R

: : ,w w w w R

1 2 1 2 2 1, : , ,w w w w R w w R

1 2 3 1 2 2 3 1 3, , : , & , ,w w w w w R w w R w w R

1 2 3 1 2 1 3 2 3, , : , & , ,w w w w w R w w R w w R

Page 12: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU12

6.1 Logical Background

6.1.4 Dynamic Logic

– What is dynamic logic Can be thought of as the modal logic of action

The necessity and possibility of dynamic logic are

based upon the kinds of actions available

Can be used in a number of areas of DAI.

– Model Language and its sublanguage Sublanguage define action regular expressions

is a set of atomic action symbols

SYN-5.

SYN-6.

DL RL

RL

B

the rules for applied to p DL L

implies that RL B

Page 13: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU13

6.1 Logical Background

SYN-6.

SYN-8.

SYN-9.

Notes:

– a;b means doing a and b in sequence.

– a+b means doing either a or b.

– p? is an action based on confirming the truth value of p

roposition p.

– a* means 0 or more (but finitely many) iterations of a.

– Example 6.3 “If q then a else b endif”

, implies that a;b, a+b , * R Ra b L a L

implies that ? D Rp L p L

and implies that a , R D Ra L p L p a p L

?; ?;q a q b

Page 14: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU14

6.1 Logical Background

– Model Here W, L defined as model logic;

Is a transition relation.

RP-1.

RP-2.

RP-3.

RP-6.

SEM-9.

SEM-10.

2 , ,defM W L

W W B

, iff , ,R w w w w

; , iff : , & ,a b a bR w w w R w w R w w

, iff , or ,a b a bR w w R w w R w w

*

0 0 1

, iff

, , : & & : 0 ,

a

n n a i i

R w w

w w w w w w i i n R w w

2 2 iff : , &w a wM a p w R w w M p

2 2 iff : ,w a wM a p w R w w M p

Page 15: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU15

6.1 Logical Background

6.1.5 Temporal Logic

– Several variants about temporal logic Linear versus Branching

Discrete versus Dense

Moment-Based versus Period-Based

– Some terms in temporal logic Moments: associated with possible state of the world,

has a strict partial order.

Path: set of moments containing the given moments.

Page 16: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU16

6.1 Logical Background

t 0

t 1

t 2

t 3

t 4

q

q. . .

q. . .

q. . .

q. . .q. . .r . . .

. . .

. . .

. . .

. . .

r eal i t y

a| | c

a| | d

b| | c

b| | d

An exampl e st r uct ur e of t i me

Page 17: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU17

6.1 Logical Background

– Linear-time temporal logic language SYN-10. SYN-11. Notes:

– means at a moment t on a path, q holds at a

future moment t’ on the given path, and p holds on

all moments between t and t’.

– means p holds sometime in the future on the

given path and abbr. with .

– means p always holds in the future on the given

path

– means p holds in the next moment.

– means q held in a past moment.

LL

the rules for pL

, implies that , , L p qp q L p q P L

p q

pF

pG

p

qP

true p

Page 18: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU18

6.1 Logical Background

– Model Here T is the set of moments, < the temporal ordering

relation, and gives the denotations of the atomic

propositions.

SEM-11.

SEM-12.

SEM-13.

Note: M3 is linear, < is a total ordering.

3 , ,defM T

3 3 iff : and pt tM P t t t M p

3 3 1 iff pt t

M M p

3

3 3

iff

: and and :

t

t t

M p q

t t t M q t t t t M p

Page 19: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU19

6.1 Logical Background (optional)

– Branching temporal and Action logic Builds on top of and , especially uses the ideas of

the well-known language CTL*.

captures the essential properties of actions and time

that are of value in specifying agents. SYN-12. SYN-13. SYN-16. SYN-15.

SYN-16. SYN-16.

BL

LL DL

BL

the rules for pL , implies that , :B p Bp q L P a p L

B sL L

, , , implies that

, , , , ,s

s

p q L x a

p q p p q p x a p x a p L

A B

implies that ,s p p Bp L A R L

\ and implies that :s B sp L L a a p L X

Page 20: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU20

6.1 Logical Background (optional)

– Notes about syntax The branching-time operator, A, denotes “in all paths at

the present moment.”

E, denotes “in some path at the present moment.”

R, denotes “in the real path at the present moment.”

The constructor (V a:p) means that “there is an action u

nder which p becomes true.”

– Examples 6.4 EFr , AF(q v r) , RFq hold at t0.

E<b>r, A[a]q, A[d](q v r), A[e]true hold at t0.

(V e: Ex<e>true ^ Ax[e]q) holds at t0.

Page 21: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU21

6.1 Logical Background (optional)

– Model SEM-16.

SEM-15.

SEM-16.

SEM-16.

SEM-18.

SEM-19.

SEM-20.

SEM-21.

4 , , ,defM T R

4 iff , where t

M t

4 4 4 iff and t t t

M p q M p M q

4 4 iff t t

M p M p

4 4 ,A iff : tt S t

M p S S S M p

4 4 ,R iff

t R t tM p M p

4 4P iff : t and t t

M p t t M p

4 4, , 1X iff

S t S tM p M p

4 4: iff : and ,where a

t t bM a p b b M p p L B

Page 22: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU22

6.1 Logical Background (optional)

SEM-22.

SEM-23.

SEM-26. SEM-25.

SEM-26.

SEM-26.

SEM-28.

4 4 4, , , iff and

S t S t S tM p q M p M q

4 4, , iff

S t S tM p M p

4 4, iff ,where

S t tM p M p p L

4 4, , iff : ; , &

x

S t S tM x a p t S S t t a M p

4 4, , iff : ; ,

x

S t S tM x a p t S S t t a M p

4 4, ,: iff : and ,where \

a

sS t S t bM a p b b M p p L L B

4 ,

4 4, ,

iff

: and and :

S t

S t S t

M p q

t t t M q t t t t M p

Page 23: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU23

6.2 Cognitive Primitives

Origin

– Intentional stance

– Knowledge level

– Functional level

BDI logic

– Be used to reason about agent

– Their beliefs, intentions, and actions bring about

the satisfaction of their desires

Page 24: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU24

6.2 Cognitive Primitives

Modal operators– Bel(belief), Des(desire), Kh(know-how) and Int(intention)

– SYN-18.

Semantics for

Example 6.5– Consider an agent who has the desire to win a lottery event

ually and intends to buy a lottery ticket sometime, but does not believe that will ever win the lottery.

IL

5 , , , , , ,defM T R B D I

win buy winDesAF IntEF BelAF

h t, , implies that Int , K , K , Dess Ip q L x x p x p x p x p L A

Page 25: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU25

6.2 Cognitive Primitives

6.2.1 Knowledge and Beliefs– B, a belief accessibility relation, which behaves as a modal

necessity operator,

– Knowledge(know-that), is customarily defined as a true beli

ef.

– B is serial, symmetric, euclidean and reflecive.

– SEM-29.

– B depends on the given moments, and agent can change it

s beliefs over time.

5 5Bel iff : , B ,t t

M x p t t t x t M p

Page 26: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU26

6.2 Cognitive Primitives

6.2.2 Desires and Goals– D, a desire accessibility relation, which represent the

desires of the agent.

– SEM-30.

– In the philosophical view Desires can be inconsistent

Agent need not know the means of achieving these desires

– The role of desires According to inputs, agent choose a subset of desires that are

both consistent and achievable

– Goals The consistent achievable desires are usually called goals.

5 5Des iff : , D ,t t

M x p t t t x t M p

Page 27: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU27

6.2 Cognitive Primitives

6.2.3 Intentions– I, a intend accessibility relation, defined as the conditions

that inevitably hold on each of the selected paths.

– SEM-31.

– Example 6.6 Consider next figure, assume that –r and –p hold everywhere

other than as shown. Let the agent x at moment t0 prefer the

path S1 and S2. Then, we have that x intend q (because it

occurs eventually on both the preferred paths) and does not

intend r(because it never occurs on S2)

5 5 ,Int iff : I , F

t S tM x p S S x t M p

0 0

5 5Int , Intt t

M x p M x r

Page 28: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU28

6.2 Cognitive Primitives

t 0

t 1

t 2

t 3

t 4

q

q. . .

q. . .r . . .

r . . .. . .

. . .

. . .

S2

a| | c

a| | d

b| | c

b| | d

I nt ent i ons

. . .

. . .

. . .

S1

Page 29: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU29

6.2 Cognitive Primitives

Some useful conclusion– IC1 Satisfiability

This says that if p is intended by x, then it occurs eventually on some path.

– IC2 Temporal Consistency

This says that if an agent intends p and intends q, then it (implicitly) intends achieving them in some undetermined temporal order: p before q, q before p , or both simultaneously.

– IC3 Persistence does not entail success

Just because an agent persists with an intention does not mean that it will succeed.

Int EFx p p

Int Int Int F Fx p x q x p q

EG Int is satisfiablex p p

Page 30: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU30

6.2 Cognitive Primitives

6.2.4 Commitments

– Goals and intentions Are quite similar, and difference arises in their

relationship with other modalities and how they evolve

over time.

Commitment can separate them.

– Commitment Be treated as constraining how intentions are revised

and updated.

– Handling commitment IC4 shows how commitment may be expressed in the

present framework.

Page 31: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU31

6.2 Cognitive Primitives

– IC4 Persist while succeeding

This constraint requires that agents desist from revising their intentions as long as they are able to proceed properly. If an agent selects some paths, then at future moments on those paths, it selects from among the future components of those paths.

I , ; ,

I , I ,

xS x t and S t t a

S x t S x t and S S

Page 32: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU32

6.2 Cognitive Primitives

6.2.5 Know-how– Motivation

Intentions have an obvious connection with actions – agents

act to satisfy their intentions.

But intentions do not ensure success.

A key ingredient is know-how.

– Example 6.7 Consider former figure, at t0, x may do either action a or

action b, since both can potentially lead to one of the

preferred paths being realized. However if the other agent

does action d, then no matter which action x chooses, x will

not succeed with its intentions, because none of its preferred

paths will be realized.

Page 33: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU33

6.2 Cognitive Primitives

– Let be the set of tree, and is defined as follows

– SYN-19.

1 1

1

1.

2.

3. ,..., , ,..., ,

; ,...,

m m

m

T is the empty tree

T a implies that a

T have different radices and a

implies that a

, , I

I

x A and p L implies that

x p L

Page 34: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU34

6.2 Cognitive Primitives

– SEM-32.

– SEM-33.

– SEM-36.

– SEM-35.

tt tM p iff M K p

t tt tM a p iff M K E a true A a K p

1

1

; ,...

:

mt

t i m i it

M a p iff

M K E a true A a p

:

ht

t

M xK p iff

M x p

Page 35: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU35

6.3 Belief Revision

Beliefs– The bird caught in the trap is a swan– The bird caught in the trap comes from Sweden– Sweden is part of Europe– All European swans are white

Consequences– The bird caught in the trap is white

New information– The bird caught in the trap is black

Which sentence would you give up?

Page 36: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU36

6.3.1 AGM Framework

Alchourron, Gardenfors, and Makinson (1985)

– Epistemic states: sets of formulas K.

– Epistemic attitudes: - α accepted

- α rejected

Otherwise - α undetermined

– Input: formula

– Change operations: expansion, contraction, and r

evision

K

K

Page 37: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU37

6.3.1 AGM Framework

Belief sets

Three operations:

– Expansion

– Contraction

– Revision

(Levi identity)

(Levi identity)

For contraction and revision, rationality postulates.

K Cn K

K Cn K

K

*K

*K K

*K K K

Page 38: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU38

6.3.1 AGM Framework

Contraction Postulates

1 ( )

2 ( )

3 ,

4 ,

5 , cov

6 ,

7

K K is a belief set closure

K K K inclusion

K If K then K K vacuity

K If not then K success

K If K then K K re ery

K If then K K equivalence

K K

8 ,

K K

K if K then K K

Page 39: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU39

6.3.1 AGM Framework

Revision Postulates

*1

*2 *

*3 *

*4 * , *

*5 *

*6 , * *

*7 * *

*8 * , * *

K K * α = Cn K * α

K K

K K K

K If K then K K

K K K if and onlyif

K If then K K

K K K

K if K then K K

Page 40: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU40

6.4 Social Primitives

6.6.1 Team and Organizational Structure

Page 41: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU41

6.4 Social Primitives

6.6.2 Mutual Beliefs and Joint Intentions

Page 42: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU42

6.4 Social Primitives

6.6.3 Social Commitments

Page 43: ©Agent Technology, 2008, Ai Lab NJU Agent Technology Agent model and theory.

Nov., 2008©Gao Yang, Ai Lab NJU43

6.4 Social Primitives

6.6.4 Group Know-how and Intentions