Information Technology Reference
In-Depth Information
Algorithm 4.
Evaluating the violation
Require:
Desires base D
Require:
Intentions base I
Require:
Beliefs
base N: norms stored in the beliefs base
1: x = 0
2:
if
n.punishment == Prohibition
then
3:
for all
din(
D ∪ I
)
do
4:
if
n.punishment.state == d
then
5: x = x - g (n.punishments.DeonticConcept, n.punishments.State)
6:
end if
7:
end for
8:
end if
9:
if
n.punishment == Obligation
then
10:
for all
din(
D ∪ I
)
do
11:
if
n.punishment.state == d
then
12: x = x + g (n.punishments.DeonticConcept, n.punishments.State)
13:
end if
14:
end for
15:
end if
16:
return
x
Algorithm 5.
Reasoning about norms (Main)
Require:
fulfilSet
NF: norms stored in the fulfil set
Require:
vilateSet
NV: norms stored in the violate set
Require:
Norms base N
1:
for all
NormninN
do
2: fulfil = Execute Algorithm 3 using n
3: violate = Execute Algorithm 4 using n
4:
if
fulfil
>
= violate
then
5: NF.
add(n)
6:
else
7: NV.
add(n)
8:
end if
9:
end for
its contribution if the agent chooses to violate the norm (
Algorithm
4 line 16). There-
fore,
Algorithm
3 should be used to evaluate the contribution of the fulfilment of the
norm to the agents' desires/intentions and
Algorithm
4 should be used to calculate the
contribution of the violation of the norm to the agents' desires/intentions.
If the contribution for fulfilling the norm is greater than or equal to the contribution
for violating the norm, the norm is selected to be fulfilled and added to the sub-set
Fulfill
of the activated norms. Such step is represented in
Algorithm
5 from line 4 to 6.
Otherwise, it is selected to be violated and added to the sub-set
Violate
of the activated
norms. Such step is represented in
Algorithm
5 from line 6 to 8.
In order to exemplify the applicability of the EN task, let's consider the rescue oper-
ation scenario. The evaluation of the benefits of fulfilling and violating the three norms