| Synopsis: This page explains how to use the three modules in the war of attrition simulation. This page also suggests things to try with the simulation and it asks a number of questions that you should be able to answer with the help of the simulation or hypertext. |
Contents:
Introduction: There are three "modules" to the war of attrition simulation:
The Q(x) calculator, uses up to three different values of V to construct plots of the chance that a mixed ("var") strategist will play up to some cost x. It is a good way to become familiar with the effects of V on quitting.
The single and multi game modules are considerably more complicated. Both allow you to define the resource value (V) and the strategies used by two contestants.
If you select single game you will see the progress of a game depicted by a graph of cost vs. time. When the game ends, a summary graph showing the costs and benefits received by each contestant will appear. This game is an excellent chance for you to review you understanding both of fixed and mixed strategies and the calculation of benefits and costs in the war of attrition.
If you select the multiple games module, the computer will play up to 5000 contests and then present a summary of the quitting times and payoffs. If one or both of the contestants is a var strategist, it will also draw a theoretical plot of quitting times which you can compare this with the observed pattern. Clearly, this simulation will be most useful after you have gained a general understanding of the war of attrition from reading the hypertext materials presented elsewhere at this site.
Notes Regarding Different Platforms
Notes to Windows Users: This simulation has been tested on machines running Windows95 and NT using Netscape and Internet Explorer 3.x and 4.x. If you use Netscape or Explorer 3.x for Windows, be advised that the colors of various windows objects (buttons menus etc.) will not be as described -- most will be in the background color (support for color is poor in this release). Please remember that Java does not work on any version of windows prior to Windows95. |
Notes to Macintosh Users: This simulation has been tested on machines running Mac OS 7.6, 8.1 and 8.5 using Netscape 4 and 4.5 and Internet Explorer 3, 4, and 4.5. If you are using Explorer, and have Apple's MRJ installed (a feature of OS 8.1 and 8.5, it can be gotten by pressing here if using an earlier OS), I recommend that you set the MRJ as the default Java for the Browser. To do this, go to the EDIT menu item, select "Preferences" and open the "Web Browser" menu (on the left side of the PREFERENCES dialog box). Then, select "Java". In the dialog box at the right, be sure that Java is enabled and that "AppleMRJ" is selected from the choice menu near the top. Restart Explorer and you're ready to go. Failure to make this change will mean that many objects (buttons etc.) will not be colored but will simply have the screen background color. I have attempted to use color to help make the layout of the various windows easier to understand. |
General Navigation: This section tells you how to get around the program. If you are comfortable with computers, you can probably skip it and move onto the detailed descriptions of the modules.
On starting the program, you will see the following screen:

The buttons at the bottom will give general information (blue) about the simulation or will send you on (red) to the next screen which contains a menu of the simulations:

The information button on this menu summarizes the features of each of the three simulations. Pressing one of the lower buttons will take you to that particular simulation and will hide this "menu" window. One important point -- notice that when you go to this window, the start-up window will remain visible in the background. You can get back to the "Select The Version of the Simulation" (menu) window at any time by going to the start-up window and pressing "Continue".
The Q(x) Calculator: This is a simple calculator/graphing utility to allow you to review the effects of V on a mixed ("var") strategist. Using the setup screen depicted below enter up to three different values of V and press the red "View" key:

Remember our convention that all resources must have values greater than zero -- entry of values =< 0 in any of the textfields or entry of any non-numeric characters will generate an error warning window like this one:

Simply close the error window and re-enter the data.
The resulting output window (below) consists of two coordinate axes. The top graph gives the chance of playing from a cost of zero to a particular cost x. Thus, it is a plot of Q(x) vs. x. A legend tells you which plot goes with which value of V:

The lower graph is a bit harder to understand. It shows the relative proportion of individuals who quit in any given cost interval. Recall that this is the difference between Q(x) and Q(x-1).
All of these data are referenced to the greatest number of individuals to quit on any of the three plots. For example, say that between a cost of 0 and 0.05 that:
Value of V |
Proportion Quitting for a Given V |
0.3 |
0.154 |
1.0 |
0.049 |
3.0 |
0.017 |
(note: this first interval must always be where the greatest number (proportion) of quits occur (you should know why -- if not review the hypertext). So, the program will find that the greatest proportion to quit between cost = 0 and 0.05 occurred where V = 0.3 which is 0.154 (see table).
It will then normalize all other values against it. What this means is that the values at all other cost intervals for all other values of V are divided by this number.
Value of V |
Proportion Quitting for a Given V |
Normalized Proportion Quitting for a Given V |
0.3 |
0.154 |
1.0 |
1.0 |
0.049 |
0.32 |
3.0 |
0.017 |
0.11 |
The advantages to doing it this way are that it emphasizes the difference in the quitting rates at different values of V.
The Single and Multigame Modules: How they Work
The heart of both of these modules are computational routines for deciding when a contest ends and who has won.
What follows is a description of how these routines work. Reading this description will not only help you understand the war of attrition but also it will help you understand the usefulness and limitations of these simulations.
Here goes:
Now that you understand how the program works, a few important points that affect its behavior can be made.
To avoid problems with resolution:
|
The Single and Multigame Modules -- Setup Features in Common to Both Modules
From the general menu window, select either the "Introduction -- Single Game" (green) button or the "Advanced: Many Games" (gold) button. These will bring up slightly different versions of the same setup window and will cause the menu screen to disappear.
Reminder -- to get back to the menu screen, find the start-up window and press the button labeled "Continue". |
Here is the single game version of the setup window:

After the title and the ubiquitous "Information" button (which reiterates much of the material about to be covered in this hypertext), the window can be thought of as having three sections:
Changing Resource and Strategy Values
Below the display of present V and strategy values are two yellow and red buttons. Pressing these will bring up a dialog box for changing either V or strategies.
Changing V: As we have learned, the net payoff to a contest winner is partially determined by V as is the quitting rate for the mixed 'var' strategy. Thus, there will be situations where you want to change these values. Pressing the yellow button labeled "Change V" will bring up the following dialog box:

To change V, simply highlight the presently displayed value by either double clicking the cell or by clicking dragging across the part of the value you wish to change. Alternately (of course) you can simply click in the cell, delete and then re-enter data. When you are satisfied with the result, press the continue button and you will return to the "Set-Up Menu" where the new value of V will be displayed. You can change these values as often as you wish.
Changing the Contestant's Strategies: Starting from the Set-Up Menu, pressing the button labeled "Change Strategies" will take you to the following dialog box:

On the left are choice menus for the two contestants, arbitrarily labeled "your strategy" and "opponent's strategy". Both give you the choice between selecting a fixed and variable cost strategy.
If you select fix as a strategy, you must also enter a maximum cost in the corresponding text field at the right. These costs must be equal or greater than zero, following our usual convention. No entry or entry of either a negative number (or the inadvertent entry of non-numeric data) will cause an error dialog box like the one below to appear:

If this happens, simply close the warning box and re-enter the appropriate data.
If you select "var" or "unknown" (see below) it doesn't matter whether or not a number is entered in the maximum cost fields. Any value that is there will be ignored.
Unknown Strategy Option: Besides explicitly selecting fix(x) or mixed (var), you can also select an "Unknown Strategy" for your opponent. The "unknown strategy" option gives you a chance to see if you can determine your opponent's strategy -- certainly something that any contestant would like to be able to do!
If you select this option, there is a pseudo-randomly determined 50% chance that your opponent will be either a var or fix strategist. If the computer selects fix, it will also make a pseudo-random selection of a maximum cost between 0 and 5*V (to two places with a 1/500 chance of any particular cost). You will not know what strategy the computer has selected.
It is possible to find out the strategy the computer used after you have run the simulation. I strongly urge you to try to figure out the opponent's strategy and not to mechanically utilize this feature. That said, here is the secret. When you have finished reviewing the output, simply:
Selecting a Cost Increment ("delta cost")
A Long-Winded Explanation and Review of Discrete and Continuous Versions
of Games (skip down if you remember this!):
Recall that most models of cost and time assume that cost increases
instantaneously with time. Generally this is a very reasonable assumption
-- for instance, a constant display with a metabolic cost will increase
in direct and essentially instantaneous proportion to the time of the display.
Likewise, recall that we assumed that animals could quit displays at any
moment in time (i.e., any value of cost). Thus, we have generally treated
both of these variables as continuous.
The problem is that digital computers treat all variables as discrete. Thus, they only approximate continuous variables. This has an effect on how the war of attrition is played. With a computer simulation we should think of cost as incrementing a certain amount and then remaining constant for a set period of time before incrementing again. Thus, discrete costs are step functions instead of continuous (straight or curved) lines.
Likewise, decisions as to whether or not to continue are also only made at regular intervals.
So, you will be given the opportunity to select between a number of different discrete cost increment/decision increments using a choice menu:

The default value is 0.01 and gives the highest resolution (thus it is potentially also the slowest). Only change this value if you believe that the simulation is running too slowly or if the program tells you to change it (multi-game simulations only).
Single game simulations are just that -- one game is played between the two strategies you have set using the "Select Contestant's Strategies" dialog box, at the resource value V selected using the set resource dialog box. However, one additional control labeled "Simulation Rate" will also need to be set. This is simply a measure of how fast (in real time) costs are incremented on a plot of cost vs. time. The default value of "Fast" will update the costs/decisions 4 times a second. There are other slower values available:

When you are satisfied with the settings you have selected, press the red and yellow button "Run One Contest". The setup screen will disappear and a new window, which plots the course of the contest as cost vs. time will appear:

The scales for this plot will be automatically defined according to the costs and rate at which costs increment. You will see a red line increase in a stepwise manner. Notice that at time zero the cost immediately increments by the value you specified in the setup window. This is like the analogy where players must pay a dollar "upfront" to play in through the next interval (see expanded description). Recall also that not paying they money means you quit -- thus quits only occur at the start of the interval and cannot quit at any other time. As long as both contestants continue to play, you will see the costs increment in a stepwise manner. When one or both contestants quit, the graph stops moving and a message is posted telling the cost that had been paid when the game ended.
| Note: Sometimes the coordinate axes for this graph inexplicably do not appear. However, the actual red line graph and summary will still appear; I'm working on this one! As usual I recommend using the latest version of Netscape or Explorer and there will be fewer problems. |
About 2.5 seconds later, this screen will disappear and a summary screen like the one below will appear:

The example above is for a case where one strategy ("you" in this case) has won. When there is a winner (as above) the screen is divided into results for each of the two competitors. The cost, resource value and net gain are summarized for the winner and the costs alone are given for the loser. The there is also text to this effect.
If the contest ends as tie, a more complicated window appears that explains how costs and benefits are calculated when ties occur. A small green dialog box that must be resized to be read accompanies this display, it gives details as to the calculations:

Single Game
Simulations -- What can you do with this simulation? The main use of this simulation is to increase your understanding of the characteristics (behavior) of fixed and mixed strategies in the war of attrition. There is also a secondary use -- this module can help increase your understanding of the advantages and disadvantages of discrete calculations. Things to try Cost intervals and precision: It is important to go through these first to get a feel for the limitations of the simulation and the situations where you might be misled by what the simulator tells you.
Learning About the Fix(x) and 'Var' Strategies Understanding the Calculation of Benefits and Costs:
Questions: 1. Does the model behave properly? Did you see examples where ties occurred when they should not have happened? If so, do you understand why the machine declared a tie and can you pick out cases when it shouldn't have done so? 2. With regards to fix(x) strategists, do the calculations of cost and benefit make sense to you? 3. With regards to 'var' strategists. When are quits most likely? Does
changing V in a contest against a given fix(x) strategist do what you might
expect to quitting times? Discussion You should gain some appreciation for the predictable unpredictability of 'var'. Even though a totally known function underlies its behavior, you can never know when it will quit (short of knowing when its opponent quits). Unknown Strategist Option: Once you think that you have gained a good understanding of fix(x) and var and that you understand how the model works and its limitations, try setting your opponent as an "unknown" strategist. It will be easiest to figure out what your opponent is doing if (i) you adopt a relatively high cost fix(x) strategy and (ii) you play the game many times. Play a number of times against different opponents -- there is probably nothing else that you can do to gain an intuitive understanding of fix and mixed ('var') strategies. Note that if you are a "real animal" you might be playing a 'var' or low max cost strategy -- see if it is as easy to figure out your opponent's strategy in a given number of contests if you are 'var' or fix(low value x). Think about this; you'll have a better chance to investigate this in more detail in the multigame section but by all means try it here also. |
Description: This module differs from the single game simulation in that two given strategists repeatedly play each other a specified number of times. The computer keeps track of who wins and the payoffs to each player. After the specified number of contests, an output screen displays a frequency distribution of quitting costs between zero and a user specified maximum. Also, another window appears that gives a text read out of wins by each contestant, ties, payoffs and where appropriate, theoretically expected payoffs.
Setup: Setup is identical to that for a single game with respect to strategy choice and resource value. The difference is that you will use choice menus to specify
Here is picture of the controls for setting these parameters. Default values are shown and they are located on the lower part of the Multigame Setup Screen (press here to view the almost identical single game setup screen):

Changing the number of games played will be useful when one or both contestants are var strategists; it will help to drive home the notion that var is only predictable within the context of a large number of games. And, as usual, the control can be used to speed up the simulation -- selecting large numbers of contests may cause the simulation to take a very long time on older computers.
The "Output Plot's Max. Cost" choice is useful purely to allow you to control the resolution of the output screen. Using very large values of max. x will tend to obscure results in contests that tend to end at low costs and vice versa. If you select the wrong maximum cost, you can always run the simulation again at a different value. One note: using a low deltaX (0.01 -- high resolution) will prevent you from using the largest two maximum costs (5 and 10 *V). This is because the extra resolution cannot be displayed at these settings on most computer screens (and so nothing is gained). Select a lower maximumx or a larger deltaX.
About the Output Screens: The picture below shows the frequency of all quits between costs 0 and 1.0 for 5000 repeats of a contest between a mixed 'var' strategist vs. a fix(x=1.0). Notice that the x axis is cost, and Y axis gives the proportion of individuals quitting after x=0.

| Important note: remember that this is a frequency distribution of all quits -- by both contestants. The data were deliberately not plotted to show the quits by either types of strategist so that you could use this plot to try to figure out strategies from quitting patterns. |
Thus, it is like the lower graph produced by the Q(x) calculator output except that here there is a single histogram giving the frequency of quitting at all costs up to the maximum screen x.
Notice also that since one of the strategists is a 'var' strategist, a theoretical plot of frequency of quits (like that given at the bottom of the Q(x) Calculator output) is also plotted for comparison with the actual proportion of quits. In the case shown, there is excellent agreement up to the point where fix(x=1.00) quits (and so everyone else quits along with it).
Finally, notice that the top of the screen are a number of lines of text that give the strategies being played, act as legend for the graph and tell when the greatest proportion of individuals quit:

Accompanying this plot is yellow textbox that contains additional information including both strategies used, the overall number of wins to each contestant, average payoffs and in the case of 'var' vs. a fix(x), the expected payoff to a 'var'.

Please note that this window sometimes comes up half empty -- if it does, simply resize it. Also, you will need to move it in order to read all the material on the graph. One downside -- if you selected "unknown" this window will tell you the strategy the computer picked. So, don't look at it until after you have figured out the strategy of your "unknown" opponent.
Multi Game
Simulations -- Things to try Comparisons Between Observed Data and Theoretical Predictions Setup 1: Set delta x to 0.01, V to 1, and select two different values for fix(x). Run the simulation and be sure that it works the way you expect. This will familiarize you with it for the next sections. Setup 2:
Questions on Example#2:
Setup 3: Make both contestants 'var'. Run the simulation using different numbers of contests. Remember that the histogram output is total quits (both contestants added together) and the theoretical line is for expected quits for a single contestant playing var. Questions on Example#3: Is there good agreement between the theoretical line and the actual data? If not, explain what you think is the cause of the difference and attempt to explain any differences you might observe. Discussion Setup 4: Set your opponent to "unknown" and select a strategy for yourself. Try to determine the unknown strategy without reading the yellow box. What is the relationship between strategy used and number of contests and your accuracy of determining the opponent's strategy? |
Copyright © 1999 by Kenneth N. Prestwich
About Fair Use of these materials Last modified 2 - 22 - 99 |