The Hawks and Doves Simulation
Contents
Introduction
This page contains a description of how to use the Java simulation ofthe Hawks and Doves game. This game was explained in detail on a previous page; you will not get muchout of this simulation unless you already thoroughly understand the Hawksand Doves game.
Computer simulations are useful in that theyallow you:
- to explore a large number of situations in a short time thereby providing a means to quickly test your understanding of the system being modeled and
- to visualize how the system acts
However, it cannot be emphasized too strongly that simply playing withsimulation without understanding what it does and without relating the inputsand outputs to some biologically meaningful situation is largely, if notentirely, a fruitless exercise.
Back to the top of this frame
What the Simulation Does:
The material below will give you an overview of the simulation. Pleasetake the time to read it so that you have some basic familiarity with whatit does and how it works.
When you launch the simulation a panel will appear like this one:
At the bottom of the panel are two buttons:
- The blue button will bring up a window that gives you general information about the simulation -- copyright, acknowledgments etc. Close this window using the normal close box after you read it.
- The red button will take you to another screen to set up the game.
Note -- If you are using the Applet (web-based) version, this firstscreen must remain opened the entire time you use the simulation. Closingit will close the simulation |
The set-up window will allow you to alter the payoffs by changingthe benefits and costs to the Hawk and Dove strategies. You will not beable to change the ways the payoffs to the strategies are calculated, youcan only change the parameters used to make these calculations.
Here's a brief outline of the set-up screen:
- The top panel gives general information about using the setup screen -- it is more detailed than what is presented here (since only an over view is presented here).
- The middle panel has three text fields and a button:
When you first run the simulation at any session, the text fields willcontain default values (shown above), which are the same numbers we usedwhen we considered the Hawks and Doves game. However, you can changeany of these values by simply dragging the mouse across themand then typing in the new value, or you can position the insertionpoint and use your delete key.
- I must emphasize that this is the only way that you will be able to alter the payoffs.
- Also, please note that simply typing in a new value will not alter the payoff matrix. You must press the red and yellow button labeled "Calculate Payoff Matrix" to recalculate with the new values. This also applies to using the default values.
- The bottom panel has a number of important features.
- The first two rows are the game payoff matrix:
- The blue buttons will bring up windows that explain how a given payoff is calculated.
- Adjacent to each blue button is the associated payoff. When you first open this page, the payoffs will not be given, you need to press the red button ("Calculate...") in the middle panel to get a display.
- The last row has three buttons:
- On the left is a gold "Reset" button -- pressing it will restores the benefits and costs to their original values. I
- The Button labeled "Plot Fitness Graph" makes a plot of the fitness of H and D vs. the frequency of H using the current payoff values. For example, here is the plot for the default values (you saw this graph when we first learned about mixed ESSs):
There are a couple of things to notice about the plot.
First,fitness on the y axis is expressed relatively. Thus, it always has a value between zero and 1.0.
Secondly, be aware that there are some slight rounding errors. For instance, the fitness of the Hawk line does not start exactly at 1.0 on the y-axis, nor does it end exactly on the x axis at a frequency of 1.0 as it should. The errors, however, are not large.
Thirdly, below the graph , a text print-out will tell you whether or not there is a pure or mixed ESS and if mixed, what the equilibrial freq. will be. It uses the rules given in previous sections to find out whether there is a pure ESS and if a mix, it uses the technique we learned earlier to find the value of that mix.
- The last yellow button, labeled "Evolve" (view control layout) will take you to another set-up page. This page is used to set up a simulation that shows the change in strategy frequencies and relative fitness over time given the current payoff matrix and an initial frequency of Hawk, which you set. Here is what it looks like:
- Notice that this window has three panels:
- General instructions can be obtained from the blue button on the top panel;
- The bottom panel is for reference. It contains a display of the present payoff matrix and predicted strategy equilibrial frequencies. Note that you will not be able to change any of these values -- the only way to alter them is to go back to the last window and change the values of the benefit and cost.
- The middle panel is where the action is! Here you can:
- Use the top (yellow) text field to set the initial frequency of the Hawk strategy (and thereby also set the freq(Dove) since it equals 1 - freq(Hawk)).You should enter an initial value for the frequency of the Hawk strategy by typing in a value in the yellow textfield next to the text about "Initial Freq. of Hawk". Since mutation and migration do not occur, be sure to pick a value greater than 0 and not more than 1 otherwise you are guaranteed stasis.
- Use the middle gold pulldown menu to set the number of generations in the simulation using a pulldown menu (that has a default value of 25 generations),
- When these are set, use the red button to run the simulation. When you press "Run Simulation" you will get a graph like the one below:
Notice that there are two graphs with two plots on each
- one each for the frequency of each strategy and
- one for the relative fitness for each strategy.
If you want to review the concepts of fitness and frequencyand especially if you want see an example of how the "evolve"graph is calculated, presshere. |
Below the graphs, there is a text message that will tell you the numberof generations required to reach a new equilibrium, if at all. Please notethat biologically-speaking equilibrium would probably arrive at a different,earlier number of generations. The program does not assign equilibriumuntil the frequency of H remains constant to 38 places for two successivegenerations!
Back to the top of this frame
Differences Between the Applicationand Simulation
There are few differences between the stand-alone application and theweb-based applet. Here they are:
- Launching:
- Applet:, simply press the appropriate link.
- Application: you must first download the application (see navigation window) and be sure that it is unpacked (your web browser should do this automatically, but follow the instructions that can be found on the download window). Once it's unpacked, double click on it and it'll launch (provided you have a java interpreter installed in your OS -- if you use some version of Windows 32 this may be a bit more complicated; see notes on the download page).
- Quitting:
- Applet: you simply close all windows, this will exit you from the simulation.
- Application: you must go to the File menu and select "Quit" (Mac) or "Exit" (windows).
Back to the top of this frame
Questions to Address and Thingsto Try
! Try to answer all of the questions below. Discussion materialis provided for some of the questions (follow the link after the questionbut please try to answer the question first). If you have trouble answeringother questions, ask about them in class. |
- Payoffs and pure vs. mixed ESSs
- Try altering the payoffs and see how this affects the equilibrium of the mixed ESS.
- Find the values of gain, loss and display that produce pure ESS for both H and D. You should probably look at them as ratios or in relative terms.
- What generalizations can you make?
- If you produce a pure ESS, are the relative payoffs that you are using still realistic? Can you use realistic numbers to produce a pure Hawk ESS? Pure Dove? Or are totally unbelievable numbers required? (Discussion)
- When there is a pure ESS, where do the fitness lines for H and D converge relative to the frequency of Hawk? (Discussion)
- Using the insights you gained from trying the previous set of questions, alter all values of costs and benefits but keep them constant in terms of ratios with respect to each other.
- If the ratios remain the same, does it make any difference in the equilibrial frequencies?
- Should it -- is ratio what matters or is it absolute difference that matters?
- Would you expect the relative fitnesses of the two strategies to be equal or different (and if so, how different) when a mixed equilibrium is reached? How about a pure ESS? Try it and see.
- Why is it that the relative fitness of H does not change (up or down) in simulations when H increases in frequency? Recall that we learned earlier that the absolute fitness of both H and D decrease as the frequency of H increases.
- What does this tell you about measures of relative fitness? (Discussion)
- Do you still think that relative fitness is a good measure to use in evolutionary studies?
- Why should there be cases where the fitness of a strategy increases as its frequency decreases? (Discussion)
- Imagine a situation where losing a fight causes severe injury, but that fighting is the only way to procure a critical resource without which reproduction is impossible.
- In this situation, what is the fitness of an individual playing a strategy that does not fight and therefore does not obtain the resource but lives a long time? (Discussion)
- Compared to the individual just discussed,what would be the average relative payoff to an individual playing an alternative strategy that fights for the resource. Assume that most individuals of this strategy die in fights without procuring the resource. Nevertheless, some of them are successful and leave offspring. (Discussion)
- If death occurs in a fight, is it appropriate to use sequential contest games like Hawk and Dove? (Discussion).
- There are many cases where there are highly escalated contests leading to serious fights that might cause death of one of the contestants. For example, male elephant seals engage in such contests over sections of a beach and "breeding rights" with the females in this area. Does that mean that males that lose such fights or that do not engage in fighting have no fitness? What does this tell you about simple games like Hawk and Dove? (Discussion)
Back to the top of this frame
Go to:
Copyright © 1999 by Kenneth N. Prestwich College of the Holy Cross, Worcester, MA USA 01610email: kprestwi@holycross.edu About FairUse of these materials Last modified 12 - 1 - 09 |