138
X-Machines for Agent-Based Modeling: FLAME Perspectives
the price in the system. Depending on the price, the firm agents can then
calculate how much profit they have received for each bided strategy.
Using the equations discussed earlier (Equations 6.1 - 6.4) the Nash equilibrium was calculated theoretically to compare the experimental results. These
have been listed in Table 6.3.
TABLE 6.3: Numerical values in Cournot experiment.
Variable Value
QM AX
511 (Assuming all bits in a 9 digit binary
string was 1)
n
3 (Number of firms)
Q
∗
127.5 (Quantity at equilibrium)
P
∗
128.5 (Price at equilibrium)
P rof it
∗
15108.75 (Profit at equilibrium)
The steps taken during the Cournot model are as follows:
Step 1: Firm Agent: If the beginning of the simulation, generate strategies
for firm database; else do nothing.
Step 2: Firm Agent: Select an elitist strategy from the memory database
based on roulette wheel selection. Post this as the chosen strategy.
Step 3: Demand Price Agent: Reads in all played strategies by firms and
calculates the price of the product depending on the demand in the
system.
Step 4: Firm Agent: Reads in the price of the product and calculates the
actual profit as a result of playing the strategy.
Step 5: Firm Agent: Choose two elitist strategies from the database using
new fitness. Perform crossover and mutation techniques to find three
child strategies and save them.
Evolution relies on the trial and error process, trying best strategies and
keeping a record of the most successful to produce new strategies. Figure 6.15
displays the results on quantities bid and profits collected. The quantities
(Figure 6.15(a)) depict large variations as the simulation does not stabilize
even after running it for 500 time steps. In Figure 6.15(b), profits were seen
to converge close to the equilibrium value.
Between t = 100 and t = 250 (Figure 6.16(a)), the price comes very close to
the ideal equilibrium price and oscillates about it, until at t = 250, one of the
self-interested firms bids a higher quantity to attain higher profits. Deviation
from the Nash equilibrium produces a loss to the firms, breaking the balance
X-Machines for Agent-Based Modeling: FLAME Perspectives
the price in the system. Depending on the price, the firm agents can then
calculate how much profit they have received for each bided strategy.
Using the equations discussed earlier (Equations 6.1 - 6.4) the Nash equilibrium was calculated theoretically to compare the experimental results. These
have been listed in Table 6.3.
TABLE 6.3: Numerical values in Cournot experiment.
Variable Value
QM AX
511 (Assuming all bits in a 9 digit binary
string was 1)
n
3 (Number of firms)
Q
∗
127.5 (Quantity at equilibrium)
P
∗
128.5 (Price at equilibrium)
P rof it
∗
15108.75 (Profit at equilibrium)
The steps taken during the Cournot model are as follows:
Step 1: Firm Agent: If the beginning of the simulation, generate strategies
for firm database; else do nothing.
Step 2: Firm Agent: Select an elitist strategy from the memory database
based on roulette wheel selection. Post this as the chosen strategy.
Step 3: Demand Price Agent: Reads in all played strategies by firms and
calculates the price of the product depending on the demand in the
system.
Step 4: Firm Agent: Reads in the price of the product and calculates the
actual profit as a result of playing the strategy.
Step 5: Firm Agent: Choose two elitist strategies from the database using
new fitness. Perform crossover and mutation techniques to find three
child strategies and save them.
Evolution relies on the trial and error process, trying best strategies and
keeping a record of the most successful to produce new strategies. Figure 6.15
displays the results on quantities bid and profits collected. The quantities
(Figure 6.15(a)) depict large variations as the simulation does not stabilize
even after running it for 500 time steps. In Figure 6.15(b), profits were seen
to converge close to the equilibrium value.
Between t = 100 and t = 250 (Figure 6.16(a)), the price comes very close to
the ideal equilibrium price and oscillates about it, until at t = 250, one of the
self-interested firms bids a higher quantity to attain higher profits. Deviation
from the Nash equilibrium produces a loss to the firms, breaking the balance
