ѧ
JOURNAL OF SOFTWARE
1999 10 12  Vol.10 No.12 1999



һAgentBDIģ
Сǿʯһ
ժҪͨԸͼAgent˼ά״̬֪ĺ壬Ըͼ滮AgentĶ̬BDIģ.CohenLevesqueRaoGeorgeffKonoligePollack˵Ĺȣ˷˶Ըͼķֱ۽⣬˹ԸͼΪκ͸⣬ǿԸļάãԸͼ߼Ķ̬Լ뼤ϵ.
ؼʡAgent˼ά״̬Ըͼ.
ͼšTP18
A BDI Model for Rational Agents
KANG Xiao-qiang SHI Chun-yi
(Department of Computer Science and Technology Tsinghua University Beijing 100084)
Abstract In this paper, a new BDI model for rational agents is presented by introducing assumptive belief with traditional belief in order to express the intuitive meaning of desire and intention on the cognitive aspect of the metal state of rational agents. Comparing with the BDI models from Cohen & Levesque, Rao & Georgeff, and Konolige & Pollack, this model overcomes the misunderstanding of the concepts of BDI, solves the transference problem and the side-effect problem for desire and intention, and shows both of the static and the dynamic relations between BDI, especially the maintaining and triggering role of desire.
Key wordsRational agent, mental state, belief, desire, intention.
AgentģǷֲʽ˹ܺͶAgentϵͳоҪɲ.HewittACTORģ͵ĿϢϵͳ壬ϣԴΪֲʽ˹ܽۻ1.о룬ϸȲACTORģӦAgentĸԺȺ彻ԵҪ.رǵԳΪоĻ֮AgentӦı仯Ⱥ彻ı仯.ǣAgentΪͼϵͳ˼ά״̬mental stateAgentģ;ͳΪо.
ѧоɹ˼ά״̬¼棺(1) ֪֪ʶȣ(2) УĿꡢԸƫõȣ(3) ⶯ͼŵ͹滮.ӦأǰAgentģоʽbeliefԸdesireͼintentionBDIAgentչоAgentȺBDIģ.
1 ع
BDIģ͵ѧBratmanԺͼķ̻ͼĿ͹Լƽеλã2.ֲʽ˹еBDIģоBDIʽҪCohenLevesqueRaoGeogeffKonoligePollack ԼShoham˵Ĺ.ЩһBratmanͼԵоһ棬ϵͳĶ塢ӦõȽǶȶͼԵĺ˲.
CohenLevesqueģ̬߼ĿģͣAgentĻʣͼΪһֳĿ꣬ͼAgentΪеã3.RaoGeorgeff ü߼ʱṹΪ֧һBDIĸ໥ϵ4.KonoligePollack֪ṹͼϵͼĸɴ˶ͼĿڴҲԲϣ״̬һ̶Ͻ˸5.
Щģ͵ĻϣShohamϵͳʵֽǶAgentĽṹΪԣAgentĳƣ6.HaddadiϳŵЭ̣7.Dunin-KepliczVerbruggeҲͶAgentĳŵ֣̽3ŵƣ8.CastelfrachiΪǶоŵ9. 
ʵԺԷЩչBDIģеһЩԭеⲢûеõ.
߼ȫ֪⣺.XһӣBELԸDESͼINT.߼ȫ֪ԴAgentǲʵģɴ˵õʣܷӳԸͼֱۺ.磬Ϊ.һȻΪ⣨磬ԲģȻΪ⣨磬̫𣩣AgentΪԸͼ.磬
ΪԸͼAgent轫ΪԸͼ.
ΣԸͼ.ܶ˲ͬģ̬ӣڿɴϵܷӳ߼䱾ʵĲͬ.
3δܱBDI֮Ķ̬Լ뼤ϵرԸAgentִ̬йеԼ뼤.ˣ޷AgentĶ̬BDIģ.
Щ㣬Ըͼ˼ά״̬֪ĺ壬¶ԸͼӳBDI߼Լ뼤ϵAgentĶ̬BDIģ.
2 BDI߼
ʹûڼ߼L.Lԭ⹫ʽӣʱ̬UֱGǣFս·Aȫ·ASȫ·E·ESڼ·ԼBEL,ASM,DES,GOALINT˼ά״̬.У1Ȧ2ʾδĳһʱ̣2ڴ֮ǰ1ǳ覵Ϊԭ⼯FORM(L)Ϊȫ幫ʽ()Ϊݼ(FORM(L))ΪFORM(L)ݼ.
1. AgentģԪ
WǿļϣܵʵͿܵļ.Tʱ㼯ϣʱĶԪϵT,ʱ.ACTԭӶact:ACTΪʱÿ߱һԭӶ.ֵ亯:WT()ĳһĳһʱԭļ.ȷš衢Ըͼbel,asm,des,int:WT(FORM(L))ֱ𷵻ĳһĳһʱеȷԸͼļ.
ڴģ£ԭӵĶ볣涨ͬ׸.зԣÿʱ˵ʷͷ֧δ.AgentĳһеĳһʱеԸͼִʷȷ.
2.1  
AgentеĹڻϢAgentϢϢļ.ЩϢȷе֪ҲԼֱ֪Ϊȷͼ.ڲͣǿԷAgentȫ֪.
2. ȷBELͼASM.

ȷ൱йжǶȷ.磬ȷʵԼ.ASESΪе··ֻʽʹ.ڼУASM(A)ASM(AS)ASM(E)ASM(ES)֣ȷУ
ȷ.ȷͼԶȷϿɴϵJbaһ˵.
3. ˼ά״̬ȼ۹ϵ.w1,w2W,tT,w1t w2 iff bel(w1,t)=bel(w2,t)asm(w1,t)=asm(w2,t)des(w1,t)=des(w2,t)int(w1,t)=int(w2,t)ͬʱ.
4. ȷϿɴϵ

(1)ң
(2)Ϊԭ⹫ʽԭBDIʽԼӷҲң
(3)ң
(4)ң
(5) (2)(4)еĹʽΪʽաbel(w1,t)Ϊʽ1,...,nĺ͡ŵϣ1,...,nӦӦ(2)(4)ң
(6) w1t w2t w3.
(w1,t,w2,w3)baw2ȷɴĿʵ磻w3ȷͼϿɴĿܼ磬ܵʵԼӳAS,ESA,E֮Ƶϵ.ڼ·ȷASESǰ£Լ
Լ1. գաasm(w,t),
ɵȷԼ1
Լ2. գաasm(w,t),
ɵȷԼ2
1. 

ܳ.磬Ԧ=F,Agentȷʵһ·ʹδһֱֳųݻ·ĿԣӶڼAF׳.Ӧأܳ.ȷԼϵԽԸͼҪ.
ȷBELԲKD45ԼASMҪӦ仯.
漰ĹҪʽЦպͦױȷESASԼ·.

4
5
2.2 Ը
5. ԸDES.
ԸAgentϣﵽ״̬ϣֵ״ֱ̬ʵԸάԸ.ֱϣ̸Ըʱضδ·ƣδ·ΪԸ·ͲԸ·.ֻԸ·ɵԸɴ.ΪˣԸıʾӦDES(A)Ϊ·ʽ.
DES(AF)ǴʵԸ.DES(A(1Ȧ2))ΪάʵԸAgentϣʵ֦2ϣʵֹб֦1.DES(AG)άԸϣδһֱ֦ճ.
оԸܲıʾ˲ֱܳԸֱۺ.RaoGeorgeffĹ4УֻܱʾGOAL(E)Ŀ꣨൱DESԱ㱣Ŀһ¹ϵGOAL()BEL()ɴ˲ַܳӳֱԸδ·.ʹĿвͬĽͣͼҪINT(A)ʾĿͼһ¹INT()GOAL()ʹGOAL(A)޷ر.ĹؼڣüȷԸ˼ά״̬֪ĺ壬ԸɴֻǼ.
Լ3. գաdes(w,t)աasm(w,t).
ɵԸһ¹
2. 

ԴʵԸDES(AF)Ϊ˵AgentԸʵһȷһܴﵽ״̬գҲԸʵһȷһܴﵽ״̬.
Լ4. A(1Ȧ2)A(1Ȧ2)des(w,t)1bel(w,t)AGաdes(w,t)աbel(w,t).
ɵԸȷԼ
3. 
Լ3,4ԸڵıҪӦĹάԸתн.
ʵԸ

άԸ
4. 
Ըг.ԴʵԸDES(AF)ΪAgentϣһԸֱټԸһʵֻȷŸԸʵ.ǰԼйԼ֪ASM(AF)ҪȷԸؽBEL(AF)ȷԸһ
Ը֮ĹϵͼKDٲ.ԵóĽǣĵģͱ˹ԸΪκ͸.AgentὫȷŵ״̬ΪԸҲȻذԸ߼ΪԼԸ.
йʹõĿGOALDESBELΪAgentȷſԸ.ԸͼĿֻм.
6. ĿGOAL.
7. ȷԸϿɴϵbd.ȷϿɴϵbaĶ壬asm滻ΪdesɵõbdĶ.
Լ3
2.3 ͼ
8. ͼINT.
ͼǳŵԸ.ʵͼУAgentڲΥͼԼǰѡһȷѡܲĶܹ֤ͼ.ͼɴеÿ·ӦͼɴˣͼӦINT(A)Ϊ·ʽ.RaoGeorgeffĹУ4ݣֻEա䣬ֳܳŵĺ.
Լ5. գաint(w,t),աdes(w,t).
ɵͼԸһ¹
5. 
8. ȷͼϿɴϵJbi.ȷϿɴϵJbaĶ壬asm滻ΪintɵõJbiĶ.
Լ5
Ըȣͼȷиһ£ͨͼȫ·AIͼ·EI˵.
9. .wW,w·ļPwwһһӦPw={p|pΪwе·}.wΪw磬w=subworld(w),ҽ
ɲwǷW.
Լ6. w1,w2,w3W,tT,(w1,t,w2,w3)biw2=subworld(w2)ͼЦաint(w1,t),
10. ͼȫ·AIͼ·EI.Լ6w*2Ϊw2ͼw2е磬
ͼȷһ¹
AIEIǶżӣAS,ESƵϵ.
6.
ʵͼ
άͼ

7. 
ͼͬг.AgentһͼֱپӦԸ߲ȷŸͼһڳŵǰ.һʵͼ޷ʵʱֶʵӦԸ.AgentڸԸ£µͼ.
ԸһٲKDͼƵǽйصƵתн.ĵģͱ˹ͼΪκ͸.
3 ̬BDIģ
11. AgentִģΪԪ顴MS0,nextact,nextms.MS0Agentĳʼ˼ά״̬ɳʼȷԸͼļɣnextactMSACTMSǴ˼ά״̬MSԭӶACTѡnextmsMSACTMSһִк󣬲µ˼ά״̬ĺ.
ڴִģ£Agentִ.Agent˳Ϊļ㶯붯.
(S1) MS0=InitMentalState(),n=0; γʼ˼ά״̬
(S2) a=next_act(MSn);ѡ
(S3) Do (a);ִѡĶ
(S4) MSn+1=next_ms(MSn,a),n=n+1ת(S2).˼ά״̬.
3.1 Ը
AgentѡִеĶΪʵԸŵִеĶͼһ.ԴˣҪ滮ͼıչ.
12. 滮ʽ.aΪԭӶʣpΪ滮ʽҽp=ap=p1;p2p=p1|p2.p1,p2Ϊ滮ʽp1;p2ʾһp1p2˳ִйɵĹ滮p1|p2ʾһp1p2ѡִйɵĹ滮.
13. ACHIEVEDDONE.aΪԭӶʣpΪ滮ʽi(a)aΪACTеһԭӶ
M,w,tACHIEVED(,a,) iff twеֱǰt䣬M,w,t  M,w,t  act(t,t)=i(a)
ΪtwеǰM,w,tACHIEVED(,p1,1)  M,w,tACHIEVED(1,p2,)
M,w,tACHIEVED(,p1|p2,) iff M,w,tACHIEVED(,p1,)M,w,tACHIEVED(,p2,)
M,w,tDONE(,a) iff twеֱǰt䣬M,w,t act(t,t)=i(a)
ΪtwеǰM,w,tACHIEVED(,p1,1)  M,w,tDONE(1,p2)
M,w,tDONE(,p1|p2) iff M,w,tDONE(,p1)M,w,tDONE(,p2).
ACHIEVED(,p,)˵ڦ׳ǰ£˹滮pִУʹճ.DONE(,p)˵ڦ׳ǰ£˹滮pִ.
ͼԶ滮ĳŵ.ʵͼINT(A(աȦա))աӦACHIEVED(,p,ס).ֻͼʱдɦס䣻ֻĹ滮pǷִʱдDONE(,p).
ʵͼֽ⹫:
8. 
ڴԸͼĹУAgentҪΪԸֹ滮ȷԸǷʵ֣õĿ꣬жǷڲֹ滮ͼԼѡһֹ滮гŵͼ.Խһ̳ΪһAgentļ㶯ΪGetInt.ԸļþͱڴʹAgentѡִGetInt.
Ըͼ:

Ըͼ˵ÿδγͼԸһͼŵִпʹԸΪͼļ㶯GetInt.
ͼִҪͼѡ.Ч÷ͼ佨ϵɴγɻڸͼֹ滮Agentȫֹ滮.ϵĸı䣬ȫֹ滮ĸı.
3.2 ͼԸ
ʵͼԽϳŵĹ滮ͼ.
ͼ:psΪ滮pһӹ滮,sͦsΪִpsǰͽsΪpsйصά
INT(A(s(ACHIEVED(s,ps,s))))ΪINT(A(ա(ACHIEVED(,p,ס))))ͼӦأDES(A(s(ACHIEVED(s,ps,s))))DES(A(s(DONE(s,ps))))DES(A(sȦs))ΪDES(A(ա(ACHIEVED(,p,ס))))Ը.
ԸDES(A(sȦs))޶ĳӹ滮ͼINT(A(s(ACHIEVED(s,ps,s))))޷ʵʱDES(A(sȦs))Ȼ.AgentԸµͼʵ֦sȦs䣬ȫͼ滮p.
4 
BDIģеĸȷ߼ȫ֪ԼȱBDI֮䶯̬ϵıչۣͨḻıԴ˽ԸͼAgent˼ά״̬֪ĺ壬ֱ۵.ڴ˻ϣ¶ԸͼĸBDI֮ľ̬Լϵ˾̬BDIģ.󣬷Agentִй̣˵Ըͼļãͨ滮ͼԸӶֵرBDI֮Ķ̬Լ뼤ϵĽAgentBDIģ.
*оõȻѧ.
߼飺Сǿ,1968,ʿ,ҪоΪֲʽ˹ܣAgent.
ʯһ,1935,ڣʿʦ,ҪоΪ˹Ӧû֪ʶ.
ͨѶϵ:Сǿ100084,廪ѧѧ뼼ϵ
ߵλ廪ѧѧ뼼ϵ  100084
ο
1Hewitt C. Open information systems semantics for distributed artificial intelligence. Artificial Intelligence, 1991,47(1):79106
2Bratman M E. Intentions, Plans, and Practical Reason. Cambridge, MA: Hardvard University Press, 1987
3Cohen P R, Levesque H J. Intention is choice with commitment. Artificial Intelligence, 1990,42(3):213261
4Rao A S, Georgeff M P. The semantics of intention maintenance for rational agents. In: Mellish C S ed. Proceedings of the 14th International Joint Conference on Artificial Intelligence. San Mateo, CA: Morgan Kaufmann Publishers, 1995. 704710
5Konolige K, Pollack M E. A respresentationalist theory of intention. In: Bajcsy R ed. Proceedings of the 13th International Joint Conference on Artificial Intelligence. San Mateo, CA: Morgan Kaufmann Publishers, 1993. 390395
6Shoham Y. An overview of agent-oriented programming. In: Bradshaw M ed. Software Agents. Menlo Park, CA: AAAI Press, 1997. 271289
7Haddadi A S. Communication and Cooperation in Agent Systems. Berlin: Springer-Verlag, 1996. 1134
8Dunin-Keplicz B, Verbrugge R. Collective Commitments. In: Durfee F ed. Proceedings of the 2nd International Conference on Multi-Agent Systems. Menlo Park, CA: AAAI Press, 1996. 5663
9Castelfrachi C. Commitments: from individual intentions to groups and organizations. In: Lesser V R ed. Proceedings of the 1st International Conference on Multi-Agent Systems. Menlo Park, CA: AAAI Press/The MIT Press, 1995. 4148
1998-10-14յԭ,1998-12-28յ޸ĸ
