Information Technology Reference
In-Depth Information
Every agent could solve its own subgoal planning according to algorithm
14.6. In algorithm 14.6, agents construct and maintain planning according to the
UCPOP framework; when need for requesting services from and cooperating
with other agents to judge consistency in the distributed partial order constraint,
agents communicate with each other.
Algorithm 14.6
Planning algorithm.
planning
(
)
S
,
B
,
O
,
L
,
G
,
Λ
S
,
B
,
O
,
L
1. Termination conditions: if G is empty, return
;
Q
,
A
2. Targets resolution: get a target
from G,
c
Q
Q
,
A
①
If Q is a conjunction of
, add every
into G, and go to step 2;
i
c
Q
Q
②
If Q is a disjunction of
, randomly choose a
, and add it into G, and go
k
to step 2;
③
If Q is a character and
¾
¬
¾
→
Q
A
A
exists in L, return failure.
p
c
3. Select operator: randomly choose an action existing in
S
, or from Λ choose a new
action
A
p
, which has effection
e
and an universal clause
p
, where
(
)
p
∈
Τ θ
and
^
(
)
≠⊥
(Q and
p
have a general resolution); if there is not any action
MGU
Q, p
A
β
satisfying conditions in
Λ and there is a agent
β whose action
satisfies
j
conditions, send a request to
β; if there are joint-actions satisfying conditions, send
requests to all executors of joint-actions; the agent which receives a request executes
the step 7 and 8 in its pl
an
ning
P
b
, if it succeeds, β returns Comm(
A
β
) and add
j
A
β
joint-actions or Comm(
) into S, and go to 2; otherwise, β returns failure.
j
S '
=
S
A
∉
S
A'
4. Enabling new action: Let
,
G
'=
G
. If
, add
A
p
into
, and add
preconds( A )\ MGU ( Q,R,B ), A
into
G
', and add non-cd-constraints(
A
p
)
p
p
B'
.
5. Protection of Causal Link: for every causal link
into
p
= ¾¾→
and every action
A
t
which may be a threat to
l
, choose one from following three solutions (if do not
choose any solution, return failure)
①
Upgrade: for
l
A
A
i
j
judge consistency in the distributed
partial order constraint, if
constraint is consistent,
O
{
}
= ''
②
Degrade: for
O
judge consistency in the distributed
partial order constraint, if
constraint is consistent,
O
O
∪
A
<
A
j
t
{
}
O
'
=
O
'
∪
A
<
A
t
j