Full text
Ope a ional Seman ic o an Agen Speak(L) In e p e e Using La e
Bindings
F an isek Vidensky a, F an isek Zbo il b, Radek Koci cand F an isek V. Zbo il d
Depa men o In elligen Sys ems, B no Uni e si y o Technology, Boze echo a 2, B no, Czech Republic
Keywo ds: BDI Agen s, Ope a ional Seman ics, Agen Speak(L).
Abs ac : Al hough BDI sys ems ha e long been s udied in he ield o agen -based p og amming, he e a e s ill p oblems
open o esea ch. One p oblem is ha some pa s o sys ems a e non-de e minis ic in he o iginal speci ica ion.
Howe e , inding a sui able de e minis ic me hod can lead o imp o ed a ionali y o an agen ’s beha iou .
In ou p e ious wo k, we in oduced la e binding in o he in e p e a ion o Agen Speak(L) language. The
main bene i o his app oach is ha he in e p e e chooses subs i u ions only when needed, hus a oiding
unnecessa y and inco ec subs i u ion selec ion. In his pape , we p esen a o mal ope a ional seman ics
o an in e p e e using la e binding a iables. A well-speci ied ope a ional seman ics is necessa y o he
implemen a ion o such an in e p e e and i s u he de elopmen .
1 INTRODUCTION
Languages based on BDI pa adigms ha e an im-
po an place in p og amming agen s as au onomous
p oac i e sys ems. Cu en ly, one o he basic lan-
guages is Agen Speak(L) (Rao, 1996) and i s dialec s,
such as he ASL language o he Jason sys em (Bo -
dini e al., 2007). In he pape (Rao, 1996), whe e
he o iginal language was i s in oduced, se e al se-
lec ion unc ions we e lis ed ha ul illed hei ole in
agen con ol only in he abs ac and in oduced non-
de e minism in o agen unc ionali y. In he p ac i-
cal easoning phase, hese we e unc ions o selec -
ing a goal o ollow and o choosing be ween sui able
plans o he selec ed goal. In he execu ion phase, i
was a selec ion unc ion o choose an in en ion o be
ollowed in a gi en cycle. F om hen o he p esen ,
a numbe o app oaches ha e been published o ad-
d ess hese non-de e minisms o imp o e he a ional-
i y o he beha iou o such agen s. Fo example, in
(Caillou e al., 2017) he au ho s p esen ed a cogni-
i e agen a chi ec u e based on he BDI pa adigm us-
ing p io i ies in plan selec ion. In (Nunes and Luck,
2014), so goals we e used o in luence he selec ion
o a plan o achie e goals. The au ho s o pape (Wa-
ah ps://o cid.o g/0000-0003-1808-441X
bh ps://o cid.o g/0000-0001-7861-8220
ch ps://o cid.o g/0000-0003-1313-6946
dh ps://o cid.o g/0000-0002-6965-4104
e s e al., 2015) in oduced wo new app oaches o
in en ion selec ion. The same eam o au ho s in he
pape (Wa e s e al., 2018) used a pa ial plan ha
does no speci y he exac o de o ope a ions in he
body o a plan, leading o inc easing he agen ’s lex-
ibili y and obus ness. Pape (Yao and Logan, 2016)
in oduced he use o he Mon e Ca lo T ee Sea ch
me hod o selec in en ion o a oid con lic s in con-
cu en ly execu ing plans.
One addi ional p oblem ha we belie e has no
ecei ed as much a en ion in his sys em has been
he choice o subs i u ions du ing bo h phases, i.e.,
he easoning and execu ion phases. In a simila
BDI sys em, dMa s (d’In e no e al., 1997), he need
o choose subs i u ions was also men ioned bu also
wi hou de ailed me hods o choosing hem. The
mo e ad anced CAN (Sa dina and Padgham, 2011)
sys em men ions subs i u ions as op ions o choosing
plans, which a e chosen i he p e iously chosen plan
ins ance (i.e., he plan and any subs i u ions) ails.
In his pape , we wan o demons a e he ope a-
ional seman ics de ining ansi ion ela ion o in e -
p e ing he Agen Speak(L) language using la e bind-
ings a iables. We in oduced his app oach in he
(Zbo il J e al., 2022) pape .
This pape is s uc u ed as ollows. The ollowing
sec ion gi es a e y b ie o e iew o Agen Speak(L)
and i s cons uc s (such as belie s, goals and plans).
Sec ions 3 and 4 will desc ibe he undamen al ope -
a ions o la e binding and i s use o in e p e ing an
Vidensky, F., Zbo il, F., Koci, R. and V. Zbo il, F.
Ope a ional Seman ic o an Agen Speak(L) In e p e e Using La e Bindings.
DOI: 10.5220/0011620700003393
In P oceedings o he 15 h In e na ional Con e ence on Agen s and A i icial In elligence (ICAART 2023) - Volume 1, pages 173-180
ISBN: 978-989-758-623-1; ISSN: 2184-433X
Copy igh c
2023 by SCITEPRESS – Science and Technology Publica ions, Lda. Unde CC license (CC BY-NC-ND 4.0)
173
agen p og am. We hen p esen he main con ibu ion
o his wo k, i.e. he ope a ional seman ics o in e -
p e ing he Agen Speak(L) language using la e bind-
ing a iables in Sec ion 5. Fu u e wo k is discussed
in he las sec ion.
2 AGENT PROGRAM WRITTEN
Agen Speak(L)
This sec ion will desc ibe he basics o an agen p o-
g am w i en in Agen Speak(L). The ollowing ex is
based on (Rao, 1996).
The essen ial elemen in an agen p og am is he
agen , which is de ined as ollows:
An agen is gi en by a uple
hPB,EQ,BB,AS,IS,Sε,SO,SIi, whe e PB is a
plan base, EQ is an e en queue, BB is a belie base,
AS is a se o ac ions ha a e execu able by he agen ,
IS is a se o in en ion s uc u es and Sε,SO,SIa e
e en s, op ions and in en ions selec ion unc ions.
The pu pose o an agen is o achie e ce ain goals.
The e a e wo ypes o goals: achie emen goals and
es goals. Goals a e w i en as !g( )and ?g( ) e-
spec i ely, whe e gis a p edica e symbol and is a
sequence o e ms. Achie emen goals s a e ha he
agen wan s o achie e an en i onmen al s a e whe e
he a om ep esen ing he goal is ue. The es goal
says ha he agen wan s o es whe he he e is uni-
ica ion wi h a belie om he base BB, which is a se
o belie s in he o m o li e al.
Essen ial elemen s o an agen p og am a e plans
ha speci y how o achie e a goal. Plans a e w i -
en in he o m o e:Ψ←plan. Each plan consis s
o he igge ing e en e, con ex condi ions Ψand
he body o he plan is composed o a sequence o
elemen s ha may be a goal o an ac ion. A igge
e en can be in e nal (when a sub-goal needs o be
achie ed) o ex e nal ( igge ed when he belie base
is upda ed while obse ing he en i onmen ). Gen-
e ally, an e en is igge ed by adding (p e ix +) o
emo ing (-) a belie o a goal.
Fo cla i ica ion, we men ion ha belie s, e en s
and goals a e w i en as i s -o de logic a omic o -
mulas (a oms). Also, a con ex condi ion o a plan is
ei he a omic o mula o a se o a omic o mulas in
conjunc ion.
In each cycle, an e en is selec ed o p ocessing
using he unc ion Sε. This e en is hen uni ied wi h
he igge ing e en s o he plans in he plan base PB.
Plans whose igge ing e en s a e uni ied a e called
ele an plans. Rele an plans, whose con ex condi-
ions a e a logical consequence o he belie base, a e
called applicable plans. One o he applicable plans
is hen selec ed using he unc ion SO. This plan is
called a possible means o achie ing he goal.
The p oblem ha he sys em using la e a iables
binding du ing in e p e a ion sol es is ha he subs i-
u ions selec ed in one s ep may no longe be applica-
ble in he nex s ep. In ha case, he whole delibe -
a ion cycle would ha e o be epea ed, which can be
a big p oblem in a e y dynamic en i onmen . Ou
p oposed sys em uses delayed selec ion o subs i u-
ion un il necessa y o sol e his p oblem. This p in-
ciple is called la e bindings. The basic me hods used
in his sys em a e desc ibed in he ollowing sec ion.
3 OVERVIEW OF OPERATIONS
AND FUNCTIONS FOR LATE
BINDINGS
As men ioned, in ou p e ious a icle (Zbo il J e al.,
2022) we de ined ope a ions and unc ions o la e
bindings. Fo he pu pose o comple eness, hey will
be e-in oduced and b ie ly desc ibed in his sec ion.
Uni ie s and subs i u ions play an essen ial ole in
la e bindings, as hey a e c ea ed and hen modi ied in
each pa o he agen ’s in e p e a ion cycle. The pu -
pose o he basic unc ion is o c ea e se s o uni ie s.
We called his unc ion b oad uni ica ion.
De ini ion 1. B oad uni ica ion, deno ed as ρU, is
o mally de ined as:
ρU(p,PS)de
== {mgu(p,p0):p0∈PS}
maps he a om pand a om p0 om he se o a oms PS
o a se o all possible mos gene al uni ie s wi hou
a iables enaming.
The esul o a b oad uni ica ion is a se o uni ie s,
which we call a possible uni ie se (PUS). In he ol-
lowing ex , we will use he simpli ied o m ρU o
he b oad uni ica ion o he a om pand a se o a oms.
De ini ion 2. The ins ance se is deno ed by Iσ. This
unc ion maps an a om and a PUS o a se o a oms.
This ins ance se is de ined as ollows:
Iσ(p,ρU)de
== {pσ:σ∈ρU}
In o mally, he ins ance se con ains each a om
ha is c ea ed a e applying each uni ie om he
PUS o an a om. I mus be no ed ha he ins ance
se is no he in e se unc ion o he b oad uni ica ion.
De ini ion 3. The Sho ing unc ion which we de-
no ed ≺, is de ined as ollows:
ρU≺pde
== {σ:∃σ0(σ0∈ρU,σ⊆σ0,
∀[ /x]∈σ0(x∈Va (p)→[ /x]∈σ))}
ICAART 2023 - 15 h In e na ional Con e ence on Agen s and A i icial In elligence
174
The esul ing se con ains such subs i u ions ha sub-
s i u e ee a iables om p.
The ollowing unc ions and ope a ions a e used o
modi y PUSs and play an essen ial ole in la e bind-
ings. The i s is he me ging ope a ion. I s pu pose is
o c ea e a subs i u ion om wo o he subs i u ions.
The ope a ion uni es subs i u ions when each a iable
is subs i u ed o he same e m in bo h o hem. I a
si ua ion a ises whe e he subs i u ions map he same
a iable o wo di e en e ms, he esul o he ope -
a ion is an emp y se .
De ini ion 4. The me ging ope a ion is deno ed as n
and is de ined as ollows:
σ1nσ2
de
==
σ1∪σ2i ∀[ 1/x1]∈σ1∀[ 2/x2]∈
σ2(x1=x2→ 1= 2)
/
0else
Assume ha he me ging subs i u ions uni y wo
di e en a oms in wo belie bases. I he esul is
a non-emp y se , bo h subs i u ions uni y bo h a oms
in o he belie bases. Ne e heless, he e may be an-
o he pai o uni ie s o which his ope a ion p o-
duces a non-emp y se . To ind such a pai , we de ined
he es ic ion ope a o .
De ini ion 5. We deno ed he es ic ion ope a o by
u, his ope a o is de ined as:
ρU1uρU2
de
== [
σ1∈ρU1,σ2∈ρU2
σ1nσ2
The esul o his ope a o o wo PUS
ρU(p1,BB1)and ρU(p2,BB2)is a se o uni ie s ha
con ain all he mos gene al uni ie s ha uni y p1in
he belie base BB1and p2in he belie base BB2.
To ans e subs i u ions when mo ing om one
plan o ano he , we in oduced he PUS in e sec ion
unc ion.
De ini ion 6. The in e sec ion unc ion deno ed by ∼
o PUS ρUand wo a oms p1and p2is de ined as
ollows:
p1,ρU∼p2
de
== ρU(p2,Iσ(p1,ρU))
4 LATE BINDINGS IN
INTERPRETATION OF
Agen Speak(L)
The easoning p ocess p oduces subs i u ions ha a e
used in plan selec ion. I also c ea es subs i u ions by
uni ying a plan’s igge ing e en and con ex condi-
ions wi h he selec ed (by he Sεselec ion unc ion)
e en o p ocess and he agen ’s belie base.
In mos BDI sys ems, subs i u ion mus be se-
lec ed immedia ely when a plan is selec ed as a means
o achie e a goal. Ne e heless, he la e binding sys-
em will keep he subs i u ions sepa a e as a PUS.
We call his PUS con ex o he plan. This con-
ex changes when he agen pe o ms an ac ion o
achie es a goal. The sys em can also assign con ex
o e en s. Plans and e en s ha do no ha e a selec ed
subs i u ion bu ha e an associa ed con ex a e called
weak ins ances o plans and e en s.
De ini ion 7. A weak plan ins ance is a iple
h e,h,c xi, whe e e is a plan’s igge ing e en , h=
h1;h2;...;hmis he plan’s body, and c x is he plan’s
con ex .
Simila ly, we can de ine a weak e en ins ance.
De ini ion 8. A weak e en ins ance is a iple
he ,ix,c xi, whe e e is an e en , ix is an iden i ie
o he in en ion ha aises he e en (o null in case o
an ex e nal e en ) and c x is a con ex .
We should no e he e ha in he p e ious pape
(Zbo il J e al., 2022), he weak e en ins ance was
de ined as a uple, and he iden i ie o he in en-
ion was missing. This was o simplici y, as we did
no need o dis inguish be ween in e nal and ex e nal
e en s. Howe e , his will be necessa y o his pape ,
as you will see la e .
The pu pose o a weak e en ins ance is o ep e-
sen an e en ha has a isen du ing he execu ion o
a weak plan ins ance. Thus, he con ex o he cu -
en ly execu ing plan is used o c ea e his weak e en
ins ance.
In he ollowing ex , we will use he abb e ia ion
WPI o weak plan ins ance and WEI o weak e en
ins ance.
The las de ini ion in his sec ion will be he de i-
ni ion o in en ion.
De ini ion 9. The in en ion is a s uc u e con aining
WEIs o a plan’s igge ing e en and a s ack o WPI
plans. Fo mally, i is de ined as ollows:
he ,ix,c xi[h e1,h1,c x1i‡h e2,h2,c x2i‡...
‡h en,hn,c xni|
whe e he op o he s ack is on he le .
I we need o sho en he in en ion no a ion, we
eplace pa o all o he s ack con en s wi h P. So
he ,ix,c xi[h en,hn,c xni‡P|is also an in en ion.
In his and he p e ious sec ions he undamen als
o la e binding ha e been p esen ed, and in he nex
sec ion he co e o his pape , ope a ional seman ics,
will be desc ibed.
Ope a ional Seman ic o an Agen Speak(L) In e p e e Using La e Bindings
175
5 OPERATIONAL SEMANTICS
A sys em using la e binding a iables pe o ms a p o-
g am w i en in he Agen Speak(L) language and in-
e p e s i using weak ins ances. I s unc ioning can
be desc ibed by ce ain ansi ion ules ha speci y
i s ope a ional seman ic (Plo kin, 1981). This is a
common ins umen o p ecise o mal speci ica ion
o sys em beha iou based on labelled ansi ion ules
which de ine he s eps in which a sys em may e ol e.
I has been used many imes in he a ea o agen sys-
ems; o example, o Agen Speak(L) in e p e a ion
in i s basic e sion (Mo ei a and Bo dini, 2002) as
well as in he ex ended e sion wi h speech ac s (Mo -
ei a e al., 2003), goal dynamic in CAN (Ha land
e al., 2014), e c.
Labelled ansi ion ules de ine a ela ion among
an agen ’s con igu a ions.
De ini ion 10. Agen con igu a ion is a uple
hPB,EQ,BB,AS,ISi, whe e PB is a se o plans, EQ
is an e en queue ha con ains WEIs, BB is a belie
base which consis s o g ound a oms, AS is a se o
ac ions, and IS is a se o in en ions.
When an agen is execu ed, i ’s unning in a se-
quence o con igu a ions om an ini ial con igu a-
ion o a inal one. The agen ’s cu en con igu a-
ion changes ei he when i does some easoning, o
when i execu es a plan. Le he e be a ela ion =⇒
AEX
(agen ’s execu ion) ha is composed o wo ela ions
=⇒
RSN ( easoning) and =⇒
ACT (ac ing), whe e he i s
ela ion ep esen s he change o he agen ’s con igu-
a ion du ing i s p ac ical easoning p ocess and he
second ela ion ep esen s he agen ’s ac ions. Then
we de ine ha =⇒
AEX = ( =⇒
RSN ∪=⇒
ACT ), which means
ha he AEX ela ion ep esen s bo h p ac ical ea-
soning as well as ac ing.
The ansi ion ules o he agen ’s execu ion co e
bo h hese ela ions. Recall ha he agen i s looks
o a means o a goal e en . The means should be a
plan which is ele an o he e en , and i is applica-
ble due o an agen ’s belie s abou he cu en en i on-
men . In his pape , we do no conside any ad anced
easoning abou e en selec ion; we assume ha an
e en is selec ed as he i s elemen in he e en queue
i he queue is no emp y. I di e s om he o igi-
nal in e p e a ion in he way i ecognises applicabil-
i y and ele ance.
5.1 Rele an and Applicable Plans
Fo comple eness, he e is he de ini ion o a ele an
and applicable plan in he sys em. Mo e abou p ac i-
cal easoning o weak ins ances can be ound in ou
p e ious pape (Zbo il J e al., 2022).
Assume ha he e is WEI and a plan p, hen he
plan pis ele an o he WEI when he PUS in e sec-
ion o i s igge ing e en and he e en wi h con ex
c ea e a se con aining a leas one subs i u ion. No e
ha his is ue e en i he subs i u ion is an emp y se .
Fo mally:
De ini ion 11. A plan e :b1∧b2∧... ∧bn←
h1;h2;...;hmis ele an o a weak e en ins ance
he ,ix,c xiwhen (e ,c x ∼ e)6=/
0
Fo a ele an plan o be applicable, all i s con ex
condi ions mus be sa is ied in he belie base. Mo e
conc e ely, i mus be possible o ind a PUS o each
con ex condi ion and belie base and hen make he
es ic ion be ween hem.
De ini ion 12. A plan e :b1∧b2∧... ∧bn←
h1;h2;...;hmis applicable in he cu en belie base
BB i i is ue ha :
ρU(b1,BB)u... uρU(bn,BB)6=/
0
One plan is hen selec ed om he applicable plans
using he selec ion unc ion SO.
Any plan ha is ele an and applicable can be
conside ed a means o achie e a goal, and he agen
may choose i as i s in ended means. I he plan is
bo h ele an and applicable, hen he es ic ion o
PUSs (con ex s) o bo h WPI and WEI mus be a
non-emp y PUS. Using he PUS in e sec ion, we can
w i e:
c x1= ((e ,c x ∼ e)uρU(b1,BB)u
...uρU(bn,BB)) 6=/
0
and hen c x1is a con ex o a plan which, oge he
wi h he plan’s body h1;h2;...;hm, o ms a new WPI
ha can be an in ended means o he WEI.
5.2 T ansi ion Rules
In he ollowing ex , we can di ide he p esen ed
ules in o h ee g oups o de ine he ela ions men-
ioned abo e. The i s g oup de ines he ela ion =⇒
RSN
using wo ules.
The i s ule (PR −EXTEVT) is used in si u-
a ions when he agen deals wi h an ex e nal e en
and he second ule (PR −INT EV T ) is o he case
o an in e nal e en . Bo h hese ules change he
agen ’s e en queue and in en ion s uc u e. Bo h also
compu e con ex s o ele an and applicable plans,
which can all be an in ended means o he e en .
Whe he he e en is in e nal o ex e nal depends on
he o m
ICAART 2023 - 15 h In e na ional Con e ence on Agen s and A i icial In elligence
176
PR-EXTEVT
e=he ,null,c xi ∈ EQ
p= e :b1∧...∧bn←h∈PB
c x1= ((e ,c x ∼ e),ρU(b1,BB)u...uρU(bn,BB)) 6=/
0
hPB,EQ,BB,AS,ISi=⇒
RSN hPB,EQ −{e},BB,AS,IS ∪{he ,ix,c xi[h e,h,c x1i]}i
PR-INTEVT
e=he ,ix,c xi ∈ EQ
p= e :b1∧...∧bn←h∈PB
c x1= ((e ,c x ∼ e),ρU(b1,BB)u...uρU(bn,BB)) 6=/
0
hPB,EQ,BB,AS,ISi=⇒
RSN
hPB,EQ −{e},BB,AS,(IS −{he 2,ix,c x2}i[P]})∪{he 2,ix,c x2i[h e,h,c x1i‡P|}i
EXEC1
i=he ,ix,c xi[h e1,h1,c x1i| ∈ IS1
hEQ1,BB1,AS1,(ix :h1,c x1)i → hEQ2,BB2,AS2,(ix :h2,c x2)i
hPB1,EQ1,BB1,AS1,IS1i=⇒
ACT
hPB1,EQ2,BB2,AS2,(IS1−{i})∪{he ,ix,c xi[h e1,h2,c x2i|})i
EXEC2
i=he ,ix,c xi[h e1,h1,c x1i‡P| ∈ IS1
hEQ1,BB1,AS1,(ix :h1,c x1)i → hEQ2,BB2,AS2,(ix :h2,c x2)i
hPB1,EQ1,BB1,AS1,IS1i=⇒
ACT
hPB1,EQ2,BB2,AS2,(IS1−{i})∪{he ,ix,c xi[h e1,h2,c x2i‡P|})i
CLEARINT1 i=he ,ix,c xi[h e1,null,c x1i| ∈ IS
hPB,EQ,BB,AS,ISi=⇒
ACT hPB,EQ,BB,AS,(IS −{i})i
CLEARFAIL1 i=he ,ix,c xi[h e1, ail,c x1i| ∈ IS
hPB,EQ,BB,AS,ISi=⇒
ACT hPB,EQ ∪{he ,null,c xi},BB,AS,(IS −{i})i
o he WEI. When he e is no pa en in en ion men-
ioned, be e say i is null, hen a new in en ion s ack
is c ea ed and an in ended means is inse ed he e.
O he wise, he means a e added o he co esponding
in en ion s ack.
I all h ee condi ions abo e he line a e sa is ied
(null in his ule means ha no in en ion is bound
o he e en ), hen WEI eis emo ed om an e en
queue EQ and a new in en ion ix is c ea ed. This in-
en ion is composed o new WEIs he ,ix,c xiand a
plan s ack ha con ains WPI h e,h,c x1i. No e ha
e is a igge ing e en o he chosen plan, his i s
body, and c x1is he con ex compu ed as was shown
in De ini ions 11 and 12.
The PR −INT EV T ule is simila o he p e ious
one. I di e s only in he o m o he p ocessed WEI.
The second g oup o ules de ines he =⇒
ACT ela-
ion. A he in en ion le el, he agen s y o execu e
one s ep o an in en ion om i s in en ion se ( he
in en ion was c ea ed o some WEI he 2,ix,c x2i).
The e a e six ules (EXEC1, EXEC2, CLEARINT1,
CLEARFAIL1, CLEARINT 2, CLEARFAIL2) ha de-
ine how he in en ion can change when he agen pe -
o ms he i s i em o i s op-le el plan. These ules
a e used in si ua ions when an in en ion s ep inishes
ei he success ully o unsuccess ully. I he s ep was
success ul, hen he e a e wo sepa a e ules o when
i comple es he en i e plan, and o when any ac ions
emain in he body o he plan. We mus dis inguish
whe he he comple ed plan was a op-le el plan o
he in en ion o a sub-plan wi hin he in en ion.
All hese ules use one mo e lowe -le el ansi ion
ela ion ha de e mines he beha iou o he agen
a he plan le el. This ansi ion ela ion is deno ed
as →and ep esen s one s ep in he plan execu ion.
The ollowing ules ans o m n- uples o he o m
hEQ,BB,AS,(ix :h,c x)i, whe e EQ,BB and AS a e
he same as in De ini ion 10. Se s PB and IS a e omi -
ed and ins ead he e is a sho ed e sion o an in en-
ion s ack ha con ains i s iden i ie ix,his he body
o i s op-le el plan, and c x is i s con ex .
The EXEC1 and EXEC2 ules a e de ined o any
non-emp y in en ion s ack wi h a non-emp y plan on
op o i . Fu he mo e, he execu ion o a plan is as-
Ope a ional Seman ic o an Agen Speak(L) In e p e e Using La e Bindings
177
sumed o lead nei he o an emp y plan no o i s ail-
u e. The body o he plan should emain in he in-
en ion s ack, bu i s body is always unca ed by one
i em. In addi ion, o he pa s wi hin he con igu a ion
may also be changed.
The i s ule is applicable i he WIP is he only
elemen o he in en ion s ack, and he second ule is
applicable i he e is mo e han one WIP in he in en-
ion s ack.
When he agen comple es a sub-plan, he sub-
plan is emo ed om he in en ion s ack. A sub-plan
is comple ed when he e a e no mo e i ems in he body
o he plan, which is ep esen ed by null. Ne e he-
less, i he plan is he las plan in he in en ion s ack,
hen he agen success ully achie es he op-le el goal
and he co esponding plan is also emo ed om he
IS. Failu e o comple e he plan will esul in he e-
mo al o he co esponding plan, and mo eo e , he
WEI mus be pu back in o he EQ.
The si ua ion is a li le mo e complica ed when he
agen comple es a plan o achie e a goal. Some in-
o ma ion should be ansmi ed upwa d o he goal-
se ing plan. The jus -comple ed plan con ains a con-
ex wi h subs i u ions co esponding o all he goals
he agen has achie ed du ing execu ion.
The highe -le el plan decla ed he achie emen
goal !g( 1)in he cu en con ex c x1. Fo his goal, a
plan wi h igge e en +!g( 2)was chosen. Assume
ha his plan has been success ully comple ed wi h
a con ex c x2. I we c ea e an ins ance se om he
igge e en g( 2)o he plan and he con ex c x2, we
ge all he goals ha he plan achie ed. Using he in-
e sec ion g( 2),c x2∼g( 1),c x1o he achie emen
goal g( 1)in he con ex c x1wi h he igge ing e en
g( 2)in he con ex c x2we ob ain a new con ex c x3.
No e ha he body o he plan in he i s line con-
sis s o wo pa s - he abs ac pa deno ed as h1and
hen he achie emen goal !g( 1). Only he i s pa
o h1 emains a e his s ep.
I he plan ails and is no he las plan in he in-
en ion s ack, hen he plan is emo ed om he s ack
and he highe -le el plan s ill con ains he achie e-
men goal.
The hi d and inal se o ules de ines he agen ’s
beha iou a he plan le el.
In he la e binding sys em, he es a ge is he
only plan i em ha can ail. Whe he i succeeds de-
pends on he esul o he es ic ion o he goal a om,
he cu en con ex o he plan, and he cu en s a e o
he agen ’s belie base. I he esul is an emp y se , i
means ha he plan can con inue o execu e, and he
se is he new con ex o he plan.
In case he es goal ails, he whole plan ails.
An achie emen goal may cause a new weak e en
ins ance. I he e is no co esponding WEI in he
agen ’s EQ and he in en ion s ack o he WEI does
no ye exis , he agen c ea es a new weak e en in-
s ance and pu s i in o he agen ’s EQ e en queue.
O he wise, he achie emen goal is al eady p ocessed
o eady o be p ocessed so he agen igno es i . Thus,
i a new WEI is c ea ed, hen i consis s o he achie e-
men goal a om, an in en ion iden i ie , and a con ex
ha is compu ed om he con ex o he o iginal plan
unca ed o he a iables o he achie emen goal. In
his case, he achie emen goal is no emo ed om
he plan and emains in he body o he plan un il he
agen achie es i .
CLEARINT2
i=he ,ix,c xi[h e1,!g( 1);h1,c x1i‡h+!g( 2),null,c x2i‡P| ∈ IS
c x3=g( 2),c x2∼g( 1),c x1
hPB,EQ,BB,AS,ISi=⇒
ACT
hPB,EQ,BB,AS,(IS −{i})∪{he ,ix,c xi[h e1,h1,c x3i‡P|}i
CLEARFAIL2 i=he ,ix,c xi[h e1,!g( 1);h1,c x1i‡h e2, ail,c x2i‡P| ∈ IS
hPB,EQ,BB,AS,ISi=⇒
ACT
hPB,EQ,BB,AS,(IS −{i})∪{he ,ix,c xi[h e1,!g( 1);h1,c x1i‡P|}i
TESTG c x1=c x uρU(g( ),BB)6=/
0
hEQ,BB,AS,(ix :?g( );h,c x)i → hEQ,BB,AS,(ix :h,c x1)i
TESTFL c x uρU(g( ),BB) = /
0
hEQ,BB,AS,(ix :?g( );h,c x)i → hEQ,BB,AS,(ix : ail,c x)i
ACHIEVEG
c x1=c x ≺q( )
h!q( ),ix,c x1i[P|/∈IS
h+!q( ),ix,c x1i/∈EQ
hEQ,BB,AS,(ix :!q( );h,c x)i →
hEQ ∪{h!q( ),ix,c x1i},BB,AS,(ix :!q( );h,c x)i
ICAART 2023 - 15 h In e na ional Con e ence on Agen s and A i icial In elligence
178
ADDBB σ∈(c x ≺c( ))
hEQ,BB,AS,(ix :+c( );h,c x)i → hEQ ∪{h+c( )σ,ix,c xi},BB ∪{c( )σ},AS,(ix :h,c x u {σ})i
DELBB σ∈(c x ≺c( ))
hEQ,BB,AS,(ix :−c( );h,c x)i → hEQ ∪{h−c( )σ,ix,c xi},BB {c( )σ},AS,(ix :h,c x u {σ})i
EXTACT σ∈(c x ≺c( ))
hEQ,BB,AS,(ix :c( );h,c x)i → hEQ,BB,AS ∪{c( )σ},(ix :h,c x u{σ})i
The p e ious ules changed he con ex using e-
s ic ions and o he unc ions and ope a ions in o-
duced in sec ion 3. Ex e nal ac ions, as well as bo h
ypes o in e nal ac ions, mus be p ecisely speci ied.
In o he wo ds, he agen mus know exac ly wha o
do. Fo his eason, he ac ion a om mus be g ound
and he agen mus decide which conc e e subs i u ion
o subs i u ions o use om he con ex o he plan.
This does no mean ha only one se o subs i u ions
can emain in he con ex . No e ha he e can be mo e
han one se o subs i u ions ha map ee a iables o
ac ion a oms o he same e ms. Again, he sho ing
unc ion is used use he e, which akes a con ex wi h
an ac ion a om and maps hem o one pa icula se
o subs i u ions o ha a om. I we use hese subs i-
u ions o es ic he con ex o he o iginal plan, we
ge a new con ex ha sui s he execu ed ac ion.
The ollowing h ee ules ADDBB,DELBB and
EXTACT espond o he execu ion o an ac ion du ing
he execu ion o a plan. I may be he addi ion o e-
mo al o a belie om he belie base. Rules ADDBB
and DELBB a e used in hese si ua ions.
Simila ly, we can de ine he DELBB ule. In bo h
ules, he mos sui able subs i u ion is selec ed i s
and he ac ion is emo ed om he body o he cu -
en ly execu ing plan. A new WEI is hen pu in o he
agen ’s e en queue EQ. The esul o he es ic ion
o he con ex o he plan and {σ}is used as he new
con ex o he op-le el plan. The subs i u ion σis
applied o he belie c( )and he esul is inse ed o
emo ed om he belie base BB.
The las ule is used when an ex e nal ac ion is
pe o med.
Also in his ule, he subs i u ion σis chosen and
is used o compu e he new con ex . The chosen sub-
s i u ion is also applied o he ex e nal e en c( )and
he esul is inse ed in o he se o ac ion AS.
6 CONCLUSIONS
We conside he ansi ion sys em in oduced in his
pape o be a basic o mal speci ica ion o he in e -
p e a ion o Agen Speak(L) language using la e bind-
ings. Such an in e p e a ion in oduces mo e lexibil-
i y in o agen decision-making by p ese ing op ions
un il a speci ic decision needs o be made o pe o m
an ac ion, compa ed o he o iginal app oaches. This
agen does no gi e up op ions o i s u u e ac ions
p ema u ely and can co ec i s beha iou du ing he
execu ion o each plan acco ding o he cu en si ua-
ion o i s cu en belie s abou he s a e o he sys em.
Cu en ly, such an in e p e a ion is implemen ed in
he sys em we p og am in he PROLOG language. In
his sys em, i can also be p ac ically e i ied ha o
some agen p og ams in ha language, he agen can
deal wi h si ua ions ha ail in sys ems wi h classi-
cal in e p e a ion. Howe e , he e a e s ill a ew open
a eas, o example, he in en ion selec ion unc ion is
no de ined. I s implemen a ion can be done in se -
e al ways, so i will be necessa y o design se e al
solu ions and compa e hem wi h each o he on a p e-
p epa ed se o examples using well-de ined me ics.
This will be he di ec ion o ou u u e wo k.
ACKNOWLEDGEMENTS
This wo k has been suppo ed by he in e nal BUT
p ojec FIT-S-20-6427.
REFERENCES
Bo dini, R. H., H¨
ubne , J. F., and Woold idge, M. (2007).
P og amming mul i-agen sys ems in Agen Speak us-
ing Jason, olume 8. John Wiley & Sons.
Caillou, P., Gaudou, B., G igna d, A., T uong, C. Q., and
Taillandie , P. (2017). A simple- o-use bdi a chi ec u e
o agen -based modeling and simula ion. In Ad ances
in Social Simula ion 2015, pages 15–28. Sp inge .
Ope a ional Seman ic o an Agen Speak(L) In e p e e Using La e Bindings
179
d’In e no, M., Kinny, D., Luck, M., and Woold idge, M.
(1997). A o mal speci ica ion o dma s. In In e -
na ional Wo kshop on Agen Theo ies, A chi ec u es,
and Languages, pages 155–176. Sp inge .
Ha land, J., Mo ley, D. N., Thanga ajah, J., and Yo ke-
Smi h, N. (2014). An ope a ional seman ics o he
goal li e-cycle in bdi agen s. Au onomous agen s and
mul i-agen sys ems, 28(4):682–719.
Mo ei a, ´
A. F. and Bo dini, R. H. (2002). An ope a ional
seman ics o a bdi agen -o ien ed p og amming lan-
guage. In P oceedings o he wo kshop on logics
o agen -based sys ems (LABS-02), held in conjunc-
ion wi h he Eigh h In e na ional Con e ence on P in-
ciples o Knowledge Rep esen a ion and Reasoning
(KR2002), Ap il, olume 22, pages 45–59.
Mo ei a, ´
A. F., Viei a, R., and Bo dini, R. H. (2003).
Ex ending he ope a ional seman ics o a bdi agen -
o ien ed p og amming language o in oducing
speech-ac based communica ion. In In e na ional
Wo kshop on Decla a i e Agen Languages and Tech-
nologies, pages 135–154. Sp inge .
Nunes, I. and Luck, M. (2014). So goal-based plan selec-
ion in model-d i en bdi agen s. In P oceedings o he
2014 in e na ional con e ence on Au onomous agen s
and mul i-agen sys ems, pages 749–756.
Plo kin, G. D. (1981). A s uc u al app oach o ope a ional
seman ics. Aa hus uni e si y.
Rao, A. S. (1996). Agen speak (l): Bdi agen s speak
ou in a logical compu able language. In Eu opean
wo kshop on modelling au onomous agen s in a mul i-
agen wo ld, pages 42–55. Sp inge .
Sa dina, S. and Padgham, L. (2011). A bdi agen p o-
g amming language wi h ailu e handling, decla a i e
goals, and planning. Au onomous Agen s and Mul i-
Agen Sys ems, 23(1):18–70.
Wa e s, M., Nebel, B., Padgham, L., and Sa dina, S. (2018).
Plan elaxa ion ia ac ion debinding and deo de ing.
In Twen y-Eigh h In e na ional Con e ence on Au o-
ma ed Planning and Scheduling.
Wa e s, M., Padgham, L., and Sa dina, S. (2015). Imp o -
ing domain-independen in en ion selec ion in bdi sys-
ems. Au onomous Agen s and Mul i-Agen Sys ems,
29(4):683–717.
Yao, Y. and Logan, B. (2016). Ac ion-le el in en ion se-
lec ion o bdi agen s. In P oceedings o he 2016
In e na ional Con e ence on Au onomous Agen s &
Mul iagen Sys ems, AAMAS ’16, page 1227–1236.
In e na ional Founda ion o Au onomous Agen s and
Mul iagen Sys ems.
Zbo il J , F., Vidensky, F., Koci, R., and Zbo il, F. V. (2022).
La e bindings in agen speak (l). In ICAART (3), pages
715–724.
ICAART 2023 - 15 h In e na ional Con e ence on Agen s and A i icial In elligence
180