170
X-Machines for Agent-Based Modeling: FLAME Perspectives
.....
P a y o f f
S u g a r s
S c o r e
S t a t e 1
S t a t e 2
S t a t e 3
S t a t e 4
S t a t e 5
S t a t e 1 6
S t r a t e g y 1
.....
P a y o f f
S u g a r s
S c o r e
S t a t e 1
S t a t e 2
S t a t e 3
S t a t e 4
S t a t e 5
S t a t e 1 6
S t r a t e g y 1 0
.....
S t r a t e g y
d a t a b a s e
FIGURE 6.26: Strategy database of ten strategies in player memory.
C
0
1
0
1
1
0
0
1
S t a t e t o m o v e t o
i f o t h e r p l a y e r c o o p e r a t e s
S t a t e t o m o v e t o
i f o t h e r p l a y e r d e f e c t s
C o o p e r a t e i n t h i s s t a t e
S t a t e N u m b e r 4
FIGURE 6.27: One state in a strategy.
state which is represented by the next 4 bits in the strings or move to the
state represented by the last 4 bits, if the other player defected.
Because the length of each strategy was 16 states the game was played
16 times between the players. This ensured that all the states in the strategy
were reached during the plays testing the complete strategy.
Using this, ideal payoffs for the players were calculated. If all players
started to cooperate, this would be the maximum payoff they will strive to
achieve. This will be given as
Cooperating equilibrium = Average payof f × 16 = (3 + 3)/2 × 16 = 48
(6.12)
Similarly the other equilibriums for the other situations will be given as
Def ecting equilibrium = (1 + 1)/2 × 16 = 16
(6.13)
M ixed equilibrium = (0 + 5)/2 + (0 + 5)/2 × 16 = 2.25 × 16 = 36 (6.14)
Figure 6.28 displays two parents strategies in a three-state automaton. The
parent are performing crossover at a point denoted by state number and the
length in the state. Therefore as depicted in the Figures 6.28(a) and 6.28(b),
the crossover point is at state number = 1 and state length = 4.
Figure 6.29 depicts the two children created by crossing over the two parents. Figure 6.30 depicts a mutant child of Parent 1 which was mutated at
the same position. The diagrams show how through crossover and mutation
techniques, new strategies can be generated by just moving the bits in the
strings. Table 6.9 summarizes the values used during the experiment.
Steps taken in the PD model:
• Step 1: Citizen agent chooses a chosen strategy it might play using the
roulette wheel selection mechanism. Posts the first step which is either
to cooperate (C) or defect (D).
X-Machines for Agent-Based Modeling: FLAME Perspectives
.....
P a y o f f
S u g a r s
S c o r e
S t a t e 1
S t a t e 2
S t a t e 3
S t a t e 4
S t a t e 5
S t a t e 1 6
S t r a t e g y 1
.....
P a y o f f
S u g a r s
S c o r e
S t a t e 1
S t a t e 2
S t a t e 3
S t a t e 4
S t a t e 5
S t a t e 1 6
S t r a t e g y 1 0
.....
S t r a t e g y
d a t a b a s e
FIGURE 6.26: Strategy database of ten strategies in player memory.
C
0
1
0
1
1
0
0
1
S t a t e t o m o v e t o
i f o t h e r p l a y e r c o o p e r a t e s
S t a t e t o m o v e t o
i f o t h e r p l a y e r d e f e c t s
C o o p e r a t e i n t h i s s t a t e
S t a t e N u m b e r 4
FIGURE 6.27: One state in a strategy.
state which is represented by the next 4 bits in the strings or move to the
state represented by the last 4 bits, if the other player defected.
Because the length of each strategy was 16 states the game was played
16 times between the players. This ensured that all the states in the strategy
were reached during the plays testing the complete strategy.
Using this, ideal payoffs for the players were calculated. If all players
started to cooperate, this would be the maximum payoff they will strive to
achieve. This will be given as
Cooperating equilibrium = Average payof f × 16 = (3 + 3)/2 × 16 = 48
(6.12)
Similarly the other equilibriums for the other situations will be given as
Def ecting equilibrium = (1 + 1)/2 × 16 = 16
(6.13)
M ixed equilibrium = (0 + 5)/2 + (0 + 5)/2 × 16 = 2.25 × 16 = 36 (6.14)
Figure 6.28 displays two parents strategies in a three-state automaton. The
parent are performing crossover at a point denoted by state number and the
length in the state. Therefore as depicted in the Figures 6.28(a) and 6.28(b),
the crossover point is at state number = 1 and state length = 4.
Figure 6.29 depicts the two children created by crossing over the two parents. Figure 6.30 depicts a mutant child of Parent 1 which was mutated at
the same position. The diagrams show how through crossover and mutation
techniques, new strategies can be generated by just moving the bits in the
strings. Table 6.9 summarizes the values used during the experiment.
Steps taken in the PD model:
• Step 1: Citizen agent chooses a chosen strategy it might play using the
roulette wheel selection mechanism. Posts the first step which is either
to cooperate (C) or defect (D).
