<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://evolutionandgames.nl/wiki/skins/common/feed.css?207"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Evolution and Games - User contributions [en]</title>
		<link>http://evolutionandgames.nl/wiki/index.php?title=Special:Contributions/Julian.garcia</link>
		<description>From Evolution and Games</description>
		<language>en</language>
		<generator>MediaWiki 1.15.3</generator>
		<lastBuildDate>Thu, 22 Oct 2026 11:30:01 GMT</lastBuildDate>
		<item>
			<title>Repeated Games and Population Structure</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Repeated_Games_and_Population_Structure</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Run the simulations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Repeated Games and Population Structure]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The paper is out in PNAS! ==&lt;br /&gt;
&lt;br /&gt;
Matthijs van Veelen*, Julián García*, David G Rand and Martin A Nowak. '''Direct reciprocity in structured populations''' (2012) PNAS 109 9929-9934. [http://www.pnas.org/content/109/25/9929.abstract Go to the paper on PNAS] or  [http://www.evolbio.mpg.de/~garcia/preprints/11.pdf Download a copy in PDF format here].&lt;br /&gt;
&lt;br /&gt;
== Run the simulations ==&lt;br /&gt;
&lt;br /&gt;
You can download the software [http://web.evolbio.mpg.de/~garcia/jars/RepeatedGamesAndStructureOnline.jar here]. Once the program is running just click on the big ''play'' button to start the fun. Feel free to re-arrange and re-size the windows, zoom-in and out as the program is running. Click [[Repeated Games and Population Structure Simulation | here]] if you need more information about running this program.&lt;br /&gt;
&lt;br /&gt;
== Lifecycle ==&lt;br /&gt;
The following figure represents the lifecycle in the computer program. &lt;br /&gt;
&lt;br /&gt;
* In '''step one''' we start with an even-sized population of finite state automata (initial population is made out of ALLD strategies).&lt;br /&gt;
* In '''step two''' individuals are matched in pairs to play the game - your are matched with your rightmost neighbor. The repeated game is played between each pair of matched players (one PD game is played for sure and from then on the game is repeated with probability &amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt;).  &lt;br /&gt;
* In '''step three''' reproduction takes place, a payoff proportional distribution is constructed. To fill up the population in the next generation we proceed in the following manner: the individuals in even positions (we start counting at 0) are determined by sampling from the probability distribution; for odd positions, with probability &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; a copy of the parent of your left neighbor is created, and  with probability &amp;lt;math&amp;gt;1-r&amp;lt;/math&amp;gt; an individual is sampled from the payoff proportional distribution (this takes care of assortment). &lt;br /&gt;
* Finally, in '''step four''', every individual can mutate with a given probability. From then we go back to matching, and so on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:RepeatedGamesAndPopulationStructureLifeCycle.png|550px|center|thumb|Lifecycle]] &lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Strategies in the computer ==&lt;br /&gt;
&lt;br /&gt;
=== Representation ===&lt;br /&gt;
&lt;br /&gt;
Strategies are programmed explicitly as finite state automata(the program also has options for regular expressions, or Turing machines - see information on[[Repeated Games]] for more details about these additional representations). &lt;br /&gt;
&lt;br /&gt;
A finite automaton is a list of states, and for every state it prescribes what the automaton plays when in that state, to which state it goes if the opponent plays cooperate, and to which state it goes if the opponent plays defect. &lt;br /&gt;
&lt;br /&gt;
[[File:grimTriggerFSA.png|300px|thumb|center|Example Finite State Automata (Grim Trigger)]]&lt;br /&gt;
&lt;br /&gt;
The computer representation of the automate above is an array with the following values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
'''[C, 0, 1 | D, 1, 1]'''&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each array position represents a state. Every state codes for an action and two indexes, where to go on cooperation, and where to go on defection. The first state (indexed 0) codes the action for the empty game history. &lt;br /&gt;
&lt;br /&gt;
Some example (well-known) strategies and their computer code are as follows: &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:AlwaysCooperateFSA.png | Always Cooperate |  '''[C 0 0]'''&lt;br /&gt;
File:AlwaysDefectFSA.png | Always Defect  | '''[D 0 0]'''&lt;br /&gt;
File:ConditionOnFirstMoveFSA.png  | Condition on the first move  ''' [C 1 2 | C 1 1 | D 2 2]'''&lt;br /&gt;
File:TitForTatFSA.png |Tit for Tat | ''' [C 0 1 | D 0 1]'''&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that there is no limit on the size of ''these arrays that can grow and shrink dynamically as mutations produce new strategies''.&lt;br /&gt;
&lt;br /&gt;
=== Mutation ===&lt;br /&gt;
&lt;br /&gt;
Possible mutations are adding (randomly constructed) states , deleting states (if the array has more than one state), and reassigning destination states at random. On deleting a state the transitions are rewired to the remaining states. The following video shows an example path of mutations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{{#ev:youtube|mPUrB8aFFuI|450}}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Results ==&lt;br /&gt;
&lt;br /&gt;
Please check our paper [http://www.pnas.org/content/109/25/9929.abstract on the PNAS website] or [http://www.evolbio.mpg.de/~garcia/preprints/11.pdf Download a PDF preprint here].&lt;/div&gt;</description>
			<pubDate>Fri, 18 Jan 2013 19:30:10 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Repeated_Games_and_Population_Structure</comments>		</item>
		<item>
			<title>Main Page</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Main_Page</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Evolution and Games'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;color:#000&amp;quot; | [[Image:wikiBar.jpg|center|665px]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
We study the evolution of behavior using mathematical and computational models. You will find here a series of tutorials and software related to papers in this area. Use the '''Navigation''' panel on the left side to make your way on the website. &lt;br /&gt;
&lt;br /&gt;
This wiki is mantained by [http://www.evolbio.mpg.de/~garcia Julian Garcia]  and [http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Available tutorials'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Repeated_Games_and_Population_Structure|Repeated games and population structure]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Price|How to quit the Price equation]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Sociality|It takes grouping and cooperation to get sociality]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Parochialism|Evolution of parochial altruism by multilevel selection]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games|In and out of equilibrium: Evolution in repeated games with discounting]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Under construction... '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Construction | Adaptive Dynamics and Population Structure]]'''.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''What do I need in my computer '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Most of the software is written in Java 5.0. See [[How to use the software]] for more details. Some parts of this website also require a working applet plugin in your browser.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Contact and Info'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[http://www.evolbio.mpg.de/~garcia/ Julián García] : garcia at evolbio dot mpg dot de&lt;br /&gt;
&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen] c dot m dot veelen at uva dot nl&lt;br /&gt;
&lt;br /&gt;
This website has been kindly funded by [http://www1.fee.uva.nl/creed/ CREED - University of Amsterdam]&lt;br /&gt;
&lt;br /&gt;
This website was inspired by [http://www.univie.ac.at/virtuallabs/ Virtual Labs] by Christoph Hauert and Karl Sigmund.  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</description>
			<pubDate>Fri, 29 Jun 2012 09:59:25 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Main_Page</comments>		</item>
		<item>
			<title>Repeated Games and Population Structure</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Repeated_Games_and_Population_Structure</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Repeated Games and Population Structure]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The paper is out in PNAS! ==&lt;br /&gt;
&lt;br /&gt;
Matthijs van Veelen*, Julián García*, David G Rand and Martin A Nowak. '''Direct reciprocity in structured populations''' (2012) PNAS 109 9929-9934. [http://www.pnas.org/content/109/25/9929.abstract Go to the paper on PNAS] or  [http://www.evolbio.mpg.de/~garcia/preprints/11.pdf Download a copy in PDF format here].&lt;br /&gt;
&lt;br /&gt;
== Run the simulations ==&lt;br /&gt;
&lt;br /&gt;
You can download the software [http://staff.feweb.vu.nl/j.garcia/software/RepeatedGamesAndStructureOnline.jar here]. Once the program is running just click on the big ''play'' button to start the fun. Feel free to re-arrange and re-size the windows, zoom-in and out as the program is running. Click [[Repeated Games and Population Structure Simulation | here]] if you need more information about running this program.&lt;br /&gt;
&lt;br /&gt;
== Lifecycle ==&lt;br /&gt;
The following figure represents the lifecycle in the computer program. &lt;br /&gt;
&lt;br /&gt;
* In '''step one''' we start with an even-sized population of finite state automata (initial population is made out of ALLD strategies).&lt;br /&gt;
* In '''step two''' individuals are matched in pairs to play the game - your are matched with your rightmost neighbor. The repeated game is played between each pair of matched players (one PD game is played for sure and from then on the game is repeated with probability &amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt;).  &lt;br /&gt;
* In '''step three''' reproduction takes place, a payoff proportional distribution is constructed. To fill up the population in the next generation we proceed in the following manner: the individuals in even positions (we start counting at 0) are determined by sampling from the probability distribution; for odd positions, with probability &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; a copy of the parent of your left neighbor is created, and  with probability &amp;lt;math&amp;gt;1-r&amp;lt;/math&amp;gt; an individual is sampled from the payoff proportional distribution (this takes care of assortment). &lt;br /&gt;
* Finally, in '''step four''', every individual can mutate with a given probability. From then we go back to matching, and so on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:RepeatedGamesAndPopulationStructureLifeCycle.png|550px|center|thumb|Lifecycle]] &lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Strategies in the computer ==&lt;br /&gt;
&lt;br /&gt;
=== Representation ===&lt;br /&gt;
&lt;br /&gt;
Strategies are programmed explicitly as finite state automata(the program also has options for regular expressions, or Turing machines - see information on[[Repeated Games]] for more details about these additional representations). &lt;br /&gt;
&lt;br /&gt;
A finite automaton is a list of states, and for every state it prescribes what the automaton plays when in that state, to which state it goes if the opponent plays cooperate, and to which state it goes if the opponent plays defect. &lt;br /&gt;
&lt;br /&gt;
[[File:grimTriggerFSA.png|300px|thumb|center|Example Finite State Automata (Grim Trigger)]]&lt;br /&gt;
&lt;br /&gt;
The computer representation of the automate above is an array with the following values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
'''[C, 0, 1 | D, 1, 1]'''&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each array position represents a state. Every state codes for an action and two indexes, where to go on cooperation, and where to go on defection. The first state (indexed 0) codes the action for the empty game history. &lt;br /&gt;
&lt;br /&gt;
Some example (well-known) strategies and their computer code are as follows: &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:AlwaysCooperateFSA.png | Always Cooperate |  '''[C 0 0]'''&lt;br /&gt;
File:AlwaysDefectFSA.png | Always Defect  | '''[D 0 0]'''&lt;br /&gt;
File:ConditionOnFirstMoveFSA.png  | Condition on the first move  ''' [C 1 2 | C 1 1 | D 2 2]'''&lt;br /&gt;
File:TitForTatFSA.png |Tit for Tat | ''' [C 0 1 | D 0 1]'''&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that there is no limit on the size of ''these arrays that can grow and shrink dynamically as mutations produce new strategies''.&lt;br /&gt;
&lt;br /&gt;
=== Mutation ===&lt;br /&gt;
&lt;br /&gt;
Possible mutations are adding (randomly constructed) states , deleting states (if the array has more than one state), and reassigning destination states at random. On deleting a state the transitions are rewired to the remaining states. The following video shows an example path of mutations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{{#ev:youtube|mPUrB8aFFuI|450}}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Results ==&lt;br /&gt;
&lt;br /&gt;
Please check our paper [http://www.pnas.org/content/109/25/9929.abstract on the PNAS website] or [http://www.evolbio.mpg.de/~garcia/preprints/11.pdf Download a PDF preprint here].&lt;/div&gt;</description>
			<pubDate>Fri, 29 Jun 2012 09:58:35 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Repeated_Games_and_Population_Structure</comments>		</item>
		<item>
			<title>Repeated Games and Population Structure</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Repeated_Games_and_Population_Structure</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Repeated Games and Population Structure]]&lt;br /&gt;
The paper is out in PNAS!&lt;br /&gt;
&lt;br /&gt;
Matthijs van Veelen*, Julián García*, David G Rand and Martin A Nowak. '''Direct reciprocity in structured populations''' (2012) PNAS 109 9929-9934. [http://www.pnas.org/content/109/25/9929.abstract Go to the paper on PNAS] or  [http://www.evolbio.mpg.de/~garcia/preprints/11.pdf Download a copy in PDF format here].&lt;br /&gt;
&lt;br /&gt;
== Run the simulations ==&lt;br /&gt;
&lt;br /&gt;
You can download the software [http://staff.feweb.vu.nl/j.garcia/software/RepeatedGamesAndStructureOnline.jar here]. Once the program is running just click on the big ''play'' button to start the fun. Feel free to re-arrange and re-size the windows, zoom-in and out as the program is running. Click [[Repeated Games and Population Structure Simulation | here]] if you need more information about running this program.&lt;br /&gt;
&lt;br /&gt;
== Lifecycle ==&lt;br /&gt;
The following figure represents the lifecycle in the computer program. &lt;br /&gt;
&lt;br /&gt;
* In '''step one''' we start with an even-sized population of finite state automata (initial population is made out of ALLD strategies).&lt;br /&gt;
* In '''step two''' individuals are matched in pairs to play the game - your are matched with your rightmost neighbor. The repeated game is played between each pair of matched players (one PD game is played for sure and from then on the game is repeated with probability &amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt;).  &lt;br /&gt;
* In '''step three''' reproduction takes place, a payoff proportional distribution is constructed. To fill up the population in the next generation we proceed in the following manner: the individuals in even positions (we start counting at 0) are determined by sampling from the probability distribution; for odd positions, with probability &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; a copy of the parent of your left neighbor is created, and  with probability &amp;lt;math&amp;gt;1-r&amp;lt;/math&amp;gt; an individual is sampled from the payoff proportional distribution (this takes care of assortment). &lt;br /&gt;
* Finally, in '''step four''', every individual can mutate with a given probability. From then we go back to matching, and so on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:RepeatedGamesAndPopulationStructureLifeCycle.png|550px|center|thumb|Lifecycle]] &lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Strategies in the computer ==&lt;br /&gt;
&lt;br /&gt;
=== Representation ===&lt;br /&gt;
&lt;br /&gt;
Strategies are programmed explicitly as finite state automata(the program also has options for regular expressions, or Turing machines - see information on[[Repeated Games]] for more details about these additional representations). &lt;br /&gt;
&lt;br /&gt;
A finite automaton is a list of states, and for every state it prescribes what the automaton plays when in that state, to which state it goes if the opponent plays cooperate, and to which state it goes if the opponent plays defect. &lt;br /&gt;
&lt;br /&gt;
[[File:grimTriggerFSA.png|300px|thumb|center|Example Finite State Automata (Grim Trigger)]]&lt;br /&gt;
&lt;br /&gt;
The computer representation of the automate above is an array with the following values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
'''[C, 0, 1 | D, 1, 1]'''&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each array position represents a state. Every state codes for an action and two indexes, where to go on cooperation, and where to go on defection. The first state (indexed 0) codes the action for the empty game history. &lt;br /&gt;
&lt;br /&gt;
Some example (well-known) strategies and their computer code are as follows: &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:AlwaysCooperateFSA.png | Always Cooperate |  '''[C 0 0]'''&lt;br /&gt;
File:AlwaysDefectFSA.png | Always Defect  | '''[D 0 0]'''&lt;br /&gt;
File:ConditionOnFirstMoveFSA.png  | Condition on the first move  ''' [C 1 2 | C 1 1 | D 2 2]'''&lt;br /&gt;
File:TitForTatFSA.png |Tit for Tat | ''' [C 0 1 | D 0 1]'''&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that there is no limit on the size of ''these arrays that can grow and shrink dynamically as mutations produce new strategies''.&lt;br /&gt;
&lt;br /&gt;
=== Mutation ===&lt;br /&gt;
&lt;br /&gt;
Possible mutations are adding (randomly constructed) states , deleting states (if the array has more than one state), and reassigning destination states at random. On deleting a state the transitions are rewired to the remaining states. The following video shows an example path of mutations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{{#ev:youtube|mPUrB8aFFuI|450}}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Results ==&lt;br /&gt;
&lt;br /&gt;
Please check our paper [http://www.pnas.org/content/109/25/9929.abstract on the PNAS website] or [http://www.evolbio.mpg.de/~garcia/preprints/11.pdf Download a PDF preprint here].&lt;/div&gt;</description>
			<pubDate>Fri, 29 Jun 2012 09:57:47 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Repeated_Games_and_Population_Structure</comments>		</item>
		<item>
			<title>Repeated Games and Population Structure</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Repeated_Games_and_Population_Structure</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Repeated Games and Population Structure]]&lt;br /&gt;
The paper is out in PNAS!&lt;br /&gt;
&lt;br /&gt;
Matthijs van Veelen*, Julián García*, David G Rand and Martin A Nowak. '''Direct reciprocity in structured populations''' (2012) PNAS 109 9929-9934. [http://www.pnas.org/content/109/25/9929.abstract Go to the paper on PNAS] or  [http://www.evolbio.mpg.de/~garcia/preprints/11.pdf Download a copy in PDF format here].&lt;br /&gt;
&lt;br /&gt;
== Run the simulations ==&lt;br /&gt;
&lt;br /&gt;
You can download the software [http://staff.feweb.vu.nl/j.garcia/software/RepeatedGamesAndStructureOnline.jar here]. Once the program is running just click on the big ''play'' button to start the fun. Feel free to re-arrange and re-size the windows, zoom-in and out as the program is running. Click [[Repeated Games and Population Structure Simulation | here]] if you need more information about running this program.&lt;br /&gt;
&lt;br /&gt;
== Lifecycle ==&lt;br /&gt;
The following figure represents the lifecycle in the computer program. &lt;br /&gt;
&lt;br /&gt;
* In '''step one''' we start with an even-sized population of finite state automata (initial population is made out of ALLD strategies).&lt;br /&gt;
* In '''step two''' individuals are matched in pairs to play the game - your are matched with your rightmost neighbor. The repeated game is played between each pair of matched players (one PD game is played for sure and from then on the game is repeated with probability &amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt;).  &lt;br /&gt;
* In '''step three''' reproduction takes place, a payoff proportional distribution is constructed. To fill up the population in the next generation we proceed in the following manner: the individuals in even positions (we start counting at 0) are determined by sampling from the probability distribution; for odd positions, with probability &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; a copy of the parent of your left neighbor is created, and  with probability &amp;lt;math&amp;gt;1-r&amp;lt;/math&amp;gt; an individual is sampled from the payoff proportional distribution (this takes care of assortment). &lt;br /&gt;
* Finally, in '''step four''', every individual can mutate with a given probability. From then we go back to matching, and so on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:RepeatedGamesAndPopulationStructureLifeCycle.png|550px|center|thumb|Lifecycle]] &lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Strategies in the computer ==&lt;br /&gt;
&lt;br /&gt;
=== Representation ===&lt;br /&gt;
&lt;br /&gt;
Strategies are programmed explicitly as finite state automata(the program also has options for regular expressions, or Turing machines - see information on[[Repeated Games]] for more details about these additional representations). &lt;br /&gt;
&lt;br /&gt;
A finite automaton is a list of states, and for every state it prescribes what the automaton plays when in that state, to which state it goes if the opponent plays cooperate, and to which state it goes if the opponent plays defect. &lt;br /&gt;
&lt;br /&gt;
[[File:grimTriggerFSA.png|300px|thumb|center|Example Finite State Automata (Grim Trigger)]]&lt;br /&gt;
&lt;br /&gt;
The computer representation of the automate above is an array with the following values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
'''[C, 0, 1 | D, 1, 1]'''&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each array position represents a state. Every state codes for an action and two indexes, where to go on cooperation, and where to go on defection. The first state (indexed 0) codes the action for the empty game history. &lt;br /&gt;
&lt;br /&gt;
Some example (well-known) strategies and their computer code are as follows: &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:AlwaysCooperateFSA.png | Always Cooperate |  '''[C 0 0]'''&lt;br /&gt;
File:AlwaysDefectFSA.png | Always Defect  | '''[D 0 0]'''&lt;br /&gt;
File:ConditionOnFirstMoveFSA.png  | Condition on the first move  ''' [C 1 2 | C 1 1 | D 2 2]'''&lt;br /&gt;
File:TitForTatFSA.png |Tit for Tat | ''' [C 0 1 | D 0 1]'''&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that there is no limit on the size of ''these arrays that can grow and shrink dynamically as mutations produce new strategies''.&lt;br /&gt;
&lt;br /&gt;
=== Mutation ===&lt;br /&gt;
&lt;br /&gt;
Possible mutations are adding (randomly constructed) states , deleting states (if the array has more than one state), and reassigning destination states at random. On deleting a state the transitions are rewired to the remaining states. The following video shows an example path of mutations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{{#ev:youtube|mPUrB8aFFuI|450}}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Results ==&lt;br /&gt;
&lt;br /&gt;
Please check our paper. [http://www.pnas.org/content/109/25/9929.abstract on the PNAS website] or [http://www.evolbio.mpg.de/~garcia/preprints/11.pdf Download a PDF preprint here].&lt;/div&gt;</description>
			<pubDate>Fri, 29 Jun 2012 09:57:30 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Repeated_Games_and_Population_Structure</comments>		</item>
		<item>
			<title>Parochialism</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Parochialism</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Evolution of Parochial Altruism by Multilevel Selection */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Parochialism]]&lt;br /&gt;
&lt;br /&gt;
=Evolution of Parochial Altruism by Multilevel Selection=&lt;br /&gt;
&lt;br /&gt;
Here you find a piece of software that helps estimating the probability of fixation for discriminate and indiscriminate altruists in a prisoner's dilemma game. Please see the details on the paper.  &lt;br /&gt;
&lt;br /&gt;
'''You can download the software [http://www.evolbio.mpg.de/~garcia/jars/ParochialismOnline.jar here].'''&lt;br /&gt;
&lt;br /&gt;
== Editorial Information ==&lt;br /&gt;
[http://staff.feweb.vu.nl/sociality/ García Julián] and van den Bergh, Jeroen. '''Evolution of parochial altruism by multilevel selection'''.  ''Evolution and Human Behavior'' 32  Pages 277-287. (2011)  [http://www.ehbonline.org/article/S1090-5138(10)00078-4/abstract Download the article]&lt;br /&gt;
&lt;br /&gt;
= Abstract = &lt;br /&gt;
&lt;br /&gt;
The evolution of parochial altruism is not well understood. We study this problem by considering a prisoner’s dilemma game with four strategies: altruists who cooperate with everyone; parochialists who only cooperate with members of their own group; traitors who only cooperate with outgroup individuals; and egoists who never cooperate. We develop a model that allows for both assortment and conflict between groups. Individuals discriminate between in- and outgroup members. While assortment and conflict allow for the evolution of both indiscriminate and parochial altruism, discriminate behavior creates an advantage for parochialists over altruists, as the latter waste help on outgroup members. We use computer simulations to study the multilevel selection dynamics. The simulation model describes an ab-&lt;br /&gt;
sorbing Markov chain. We examine the absorption probabilities of altruists and parochialists. Three model versions are compared, with only assortment, with only group conflict, and with both mechanisms. We find that parochialism is selected for by group conflict as well as assortment. Discrimination allows for cooperation inside groups to withstand regular interactions with outgroup members.&lt;br /&gt;
&lt;br /&gt;
= Run the software =&lt;br /&gt;
&lt;br /&gt;
You can download the software [http://www.evolbio.mpg.de/~garcia/jars/ParochialismOnline.jar here]. &lt;br /&gt;
&lt;br /&gt;
Once the program is running just '''click on the big ''play'' button''' to start the fun. Feel free to re-arrange and re-size the windows, zoom-in and out as the program is running. &lt;br /&gt;
&lt;br /&gt;
[[File:Parochialism Simulations Screenshot.png|300px|center|thumb|Screenshot of the simulations]]&lt;br /&gt;
&lt;br /&gt;
Use [http://www.java.com/en/download/index.jsp Java RunTime] 5.0 or newer to run the software. It should be just fine if you already have java installed in your machine, just double click once you have downloaded the file, or choose open from the browser box.&lt;br /&gt;
&lt;br /&gt;
= Parameters =&lt;br /&gt;
&lt;br /&gt;
Here's the list of parameters in the order they appear in the software, and how they relate to the model in the paper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!width=&amp;quot;225&amp;quot;|'''Parameter'''&lt;br /&gt;
!width=&amp;quot;50&amp;quot;|'''Model'''&lt;br /&gt;
!width=&amp;quot;225&amp;quot;|'''Simulation'''&lt;br /&gt;
!width=&amp;quot;225&amp;quot;|'''Recommended range'''&lt;br /&gt;
|-&lt;br /&gt;
|Frequency of group conflict || &amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt; || AverageFrequencyOfGroupsInConflict || 0.0 - 0.1&lt;br /&gt;
|-&lt;br /&gt;
|Benefit (in the PD game) || &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; || B || Any value greater than c&lt;br /&gt;
|-&lt;br /&gt;
|Cost (in the PD game) || &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; || C || Positive value (or zero for snow-drift game)&lt;br /&gt;
|-&lt;br /&gt;
|Group size || &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; || GroupSize || Greater than 2&lt;br /&gt;
|-&lt;br /&gt;
|Probability of ingroup interaction || &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; || IngroupProbability || 0.0 - 1.0 &lt;br /&gt;
|-&lt;br /&gt;
|Probability of migration || &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; || MigrationProbability || 0.0 - 1.0&lt;br /&gt;
|-&lt;br /&gt;
|Incumbent (or mutant) strategy ||  || Mutant || Either altruist or parochialist&lt;br /&gt;
|-&lt;br /&gt;
|Number of groups || &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; || NumberOfGroups || Greater than 3&lt;br /&gt;
|-&lt;br /&gt;
|Seed for random number generation ||  || Seed || Any value&lt;br /&gt;
|-&lt;br /&gt;
|Intensity of selection || &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; || SelectionIntensity || For weak selection 0.1&lt;br /&gt;
|-&lt;br /&gt;
|Re-shuffle groups every generation ||  || ShuffleGroupsEveryGeneration || Set to true, if you want to avoid assortment&lt;br /&gt;
|-&lt;br /&gt;
|Splitting probability || &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; || SplittingProbability || Between 0 and 1.0 (default is 0.01)&lt;br /&gt;
|-&lt;br /&gt;
|Steepness of winning probability curve || &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt; || Steepness || Between 0 and 1.0 (default is 0.5)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a more detailed description on these values please refer to section 4.2 in the paper.&lt;br /&gt;
&lt;br /&gt;
= Assortment, Group Conflict or Both =&lt;br /&gt;
&lt;br /&gt;
=== Only assortment ===&lt;br /&gt;
&lt;br /&gt;
For only assortment please set the ''frequency of group conflict'' (&amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt;) to 0. And ''ShuffleGroupsEveryGeneration'' to false.&lt;br /&gt;
&lt;br /&gt;
=== Assortment and Group conflict ===&lt;br /&gt;
&lt;br /&gt;
For assortment and group conflict please set the ''frequency of group conflict'' (&amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt;) to a positive value. And ''ShuffleGroupsEveryGeneration'' to false.&lt;br /&gt;
&lt;br /&gt;
=== Only Group conflict ===&lt;br /&gt;
&lt;br /&gt;
For only group conflict please set the ''frequency of group conflict'' (&amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt;) to a positive value. And ''ShuffleGroupsEveryGeneration'' to true.&lt;/div&gt;</description>
			<pubDate>Wed, 02 Nov 2011 10:51:47 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Parochialism</comments>		</item>
		<item>
			<title>Parochialism</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Parochialism</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Editorial Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Parochialism]]&lt;br /&gt;
&lt;br /&gt;
=Evolution of Parochial Altruism by Multilevel Selection=&lt;br /&gt;
&lt;br /&gt;
== Editorial Information ==&lt;br /&gt;
[http://staff.feweb.vu.nl/sociality/ García Julián] and van den Bergh, Jeroen. '''Evolution of parochial altruism by multilevel selection'''.  ''Evolution and Human Behavior'' 32  Pages 277-287. (2011)  [http://www.ehbonline.org/article/S1090-5138(10)00078-4/abstract Download the article]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here you find a piece of software that helps estimating the probability of fixation for discriminate and indiscriminate altruists in a prisoner's dilemma game. Please see the details on the paper.  &lt;br /&gt;
&lt;br /&gt;
'''You can download the software [http://www.evolbio.mpg.de/~garcia/jars/ParochialismOnline.jar here].'''&lt;br /&gt;
&lt;br /&gt;
= Abstract = &lt;br /&gt;
&lt;br /&gt;
The evolution of parochial altruism is not well understood. We study this problem by considering a prisoner’s dilemma game with four strategies: altruists who cooperate with everyone; parochialists who only cooperate with members of their own group; traitors who only cooperate with outgroup individuals; and egoists who never cooperate. We develop a model that allows for both assortment and conflict between groups. Individuals discriminate between in- and outgroup members. While assortment and conflict allow for the evolution of both indiscriminate and parochial altruism, discriminate behavior creates an advantage for parochialists over altruists, as the latter waste help on outgroup members. We use computer simulations to study the multilevel selection dynamics. The simulation model describes an ab-&lt;br /&gt;
sorbing Markov chain. We examine the absorption probabilities of altruists and parochialists. Three model versions are compared, with only assortment, with only group conflict, and with both mechanisms. We find that parochialism is selected for by group conflict as well as assortment. Discrimination allows for cooperation inside groups to withstand regular interactions with outgroup members.&lt;br /&gt;
&lt;br /&gt;
= Run the software =&lt;br /&gt;
&lt;br /&gt;
You can download the software [http://www.evolbio.mpg.de/~garcia/jars/ParochialismOnline.jar here]. &lt;br /&gt;
&lt;br /&gt;
Once the program is running just '''click on the big ''play'' button''' to start the fun. Feel free to re-arrange and re-size the windows, zoom-in and out as the program is running. &lt;br /&gt;
&lt;br /&gt;
[[File:Parochialism Simulations Screenshot.png|300px|center|thumb|Screenshot of the simulations]]&lt;br /&gt;
&lt;br /&gt;
Use [http://www.java.com/en/download/index.jsp Java RunTime] 5.0 or newer to run the software. It should be just fine if you already have java installed in your machine, just double click once you have downloaded the file, or choose open from the browser box.&lt;br /&gt;
&lt;br /&gt;
= Parameters =&lt;br /&gt;
&lt;br /&gt;
Here's the list of parameters in the order they appear in the software, and how they relate to the model in the paper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!width=&amp;quot;225&amp;quot;|'''Parameter'''&lt;br /&gt;
!width=&amp;quot;50&amp;quot;|'''Model'''&lt;br /&gt;
!width=&amp;quot;225&amp;quot;|'''Simulation'''&lt;br /&gt;
!width=&amp;quot;225&amp;quot;|'''Recommended range'''&lt;br /&gt;
|-&lt;br /&gt;
|Frequency of group conflict || &amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt; || AverageFrequencyOfGroupsInConflict || 0.0 - 0.1&lt;br /&gt;
|-&lt;br /&gt;
|Benefit (in the PD game) || &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; || B || Any value greater than c&lt;br /&gt;
|-&lt;br /&gt;
|Cost (in the PD game) || &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; || C || Positive value (or zero for snow-drift game)&lt;br /&gt;
|-&lt;br /&gt;
|Group size || &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; || GroupSize || Greater than 2&lt;br /&gt;
|-&lt;br /&gt;
|Probability of ingroup interaction || &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; || IngroupProbability || 0.0 - 1.0 &lt;br /&gt;
|-&lt;br /&gt;
|Probability of migration || &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; || MigrationProbability || 0.0 - 1.0&lt;br /&gt;
|-&lt;br /&gt;
|Incumbent (or mutant) strategy ||  || Mutant || Either altruist or parochialist&lt;br /&gt;
|-&lt;br /&gt;
|Number of groups || &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; || NumberOfGroups || Greater than 3&lt;br /&gt;
|-&lt;br /&gt;
|Seed for random number generation ||  || Seed || Any value&lt;br /&gt;
|-&lt;br /&gt;
|Intensity of selection || &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; || SelectionIntensity || For weak selection 0.1&lt;br /&gt;
|-&lt;br /&gt;
|Re-shuffle groups every generation ||  || ShuffleGroupsEveryGeneration || Set to true, if you want to avoid assortment&lt;br /&gt;
|-&lt;br /&gt;
|Splitting probability || &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; || SplittingProbability || Between 0 and 1.0 (default is 0.01)&lt;br /&gt;
|-&lt;br /&gt;
|Steepness of winning probability curve || &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt; || Steepness || Between 0 and 1.0 (default is 0.5)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a more detailed description on these values please refer to section 4.2 in the paper.&lt;br /&gt;
&lt;br /&gt;
= Assortment, Group Conflict or Both =&lt;br /&gt;
&lt;br /&gt;
=== Only assortment ===&lt;br /&gt;
&lt;br /&gt;
For only assortment please set the ''frequency of group conflict'' (&amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt;) to 0. And ''ShuffleGroupsEveryGeneration'' to false.&lt;br /&gt;
&lt;br /&gt;
=== Assortment and Group conflict ===&lt;br /&gt;
&lt;br /&gt;
For assortment and group conflict please set the ''frequency of group conflict'' (&amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt;) to a positive value. And ''ShuffleGroupsEveryGeneration'' to false.&lt;br /&gt;
&lt;br /&gt;
=== Only Group conflict ===&lt;br /&gt;
&lt;br /&gt;
For only group conflict please set the ''frequency of group conflict'' (&amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt;) to a positive value. And ''ShuffleGroupsEveryGeneration'' to true.&lt;/div&gt;</description>
			<pubDate>Wed, 02 Nov 2011 10:51:31 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Parochialism</comments>		</item>
		<item>
			<title>Parochialism</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Parochialism</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Parochialism]]&lt;br /&gt;
&lt;br /&gt;
=Evolution of Parochial Altruism by Multilevel Selection=&lt;br /&gt;
&lt;br /&gt;
== Editorial Information ==&lt;br /&gt;
[http://staff.feweb.vu.nl/sociality/ García Julián] and van den Bergh, Jeroen. '''Evolution of parochial altruism by multilevel selection'''.  ''Evolution and Human Behavior'' 32  Pages 277-287. (2011)  http://www.ehbonline.org/article/S1090-5138(10)00078-4/abstract Download the article]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here you find a piece of software that helps estimating the probability of fixation for discriminate and indiscriminate altruists in a prisoner's dilemma game. Please see the details on the paper.  &lt;br /&gt;
&lt;br /&gt;
'''You can download the software [http://www.evolbio.mpg.de/~garcia/jars/ParochialismOnline.jar here].''' &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
= Abstract = &lt;br /&gt;
&lt;br /&gt;
The evolution of parochial altruism is not well understood. We study this problem by considering a prisoner’s dilemma game with four strategies: altruists who cooperate with everyone; parochialists who only cooperate with members of their own group; traitors who only cooperate with outgroup individuals; and egoists who never cooperate. We develop a model that allows for both assortment and conflict between groups. Individuals discriminate between in- and outgroup members. While assortment and conflict allow for the evolution of both indiscriminate and parochial altruism, discriminate behavior creates an advantage for parochialists over altruists, as the latter waste help on outgroup members. We use computer simulations to study the multilevel selection dynamics. The simulation model describes an ab-&lt;br /&gt;
sorbing Markov chain. We examine the absorption probabilities of altruists and parochialists. Three model versions are compared, with only assortment, with only group conflict, and with both mechanisms. We find that parochialism is selected for by group conflict as well as assortment. Discrimination allows for cooperation inside groups to withstand regular interactions with outgroup members.&lt;br /&gt;
&lt;br /&gt;
= Run the software =&lt;br /&gt;
&lt;br /&gt;
You can download the software [http://www.evolbio.mpg.de/~garcia/jars/ParochialismOnline.jar here]. &lt;br /&gt;
&lt;br /&gt;
Once the program is running just '''click on the big ''play'' button''' to start the fun. Feel free to re-arrange and re-size the windows, zoom-in and out as the program is running. &lt;br /&gt;
&lt;br /&gt;
[[File:Parochialism Simulations Screenshot.png|300px|center|thumb|Screenshot of the simulations]]&lt;br /&gt;
&lt;br /&gt;
Use [http://www.java.com/en/download/index.jsp Java RunTime] 5.0 or newer to run the software. It should be just fine if you already have java installed in your machine, just double click once you have downloaded the file, or choose open from the browser box.&lt;br /&gt;
&lt;br /&gt;
= Parameters =&lt;br /&gt;
&lt;br /&gt;
Here's the list of parameters in the order they appear in the software, and how they relate to the model in the paper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!width=&amp;quot;225&amp;quot;|'''Parameter'''&lt;br /&gt;
!width=&amp;quot;50&amp;quot;|'''Model'''&lt;br /&gt;
!width=&amp;quot;225&amp;quot;|'''Simulation'''&lt;br /&gt;
!width=&amp;quot;225&amp;quot;|'''Recommended range'''&lt;br /&gt;
|-&lt;br /&gt;
|Frequency of group conflict || &amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt; || AverageFrequencyOfGroupsInConflict || 0.0 - 0.1&lt;br /&gt;
|-&lt;br /&gt;
|Benefit (in the PD game) || &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; || B || Any value greater than c&lt;br /&gt;
|-&lt;br /&gt;
|Cost (in the PD game) || &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; || C || Positive value (or zero for snow-drift game)&lt;br /&gt;
|-&lt;br /&gt;
|Group size || &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; || GroupSize || Greater than 2&lt;br /&gt;
|-&lt;br /&gt;
|Probability of ingroup interaction || &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; || IngroupProbability || 0.0 - 1.0 &lt;br /&gt;
|-&lt;br /&gt;
|Probability of migration || &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; || MigrationProbability || 0.0 - 1.0&lt;br /&gt;
|-&lt;br /&gt;
|Incumbent (or mutant) strategy ||  || Mutant || Either altruist or parochialist&lt;br /&gt;
|-&lt;br /&gt;
|Number of groups || &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; || NumberOfGroups || Greater than 3&lt;br /&gt;
|-&lt;br /&gt;
|Seed for random number generation ||  || Seed || Any value&lt;br /&gt;
|-&lt;br /&gt;
|Intensity of selection || &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; || SelectionIntensity || For weak selection 0.1&lt;br /&gt;
|-&lt;br /&gt;
|Re-shuffle groups every generation ||  || ShuffleGroupsEveryGeneration || Set to true, if you want to avoid assortment&lt;br /&gt;
|-&lt;br /&gt;
|Splitting probability || &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; || SplittingProbability || Between 0 and 1.0 (default is 0.01)&lt;br /&gt;
|-&lt;br /&gt;
|Steepness of winning probability curve || &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt; || Steepness || Between 0 and 1.0 (default is 0.5)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a more detailed description on these values please refer to section 4.2 in the paper.&lt;br /&gt;
&lt;br /&gt;
= Assortment, Group Conflict or Both =&lt;br /&gt;
&lt;br /&gt;
=== Only assortment ===&lt;br /&gt;
&lt;br /&gt;
For only assortment please set the ''frequency of group conflict'' (&amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt;) to 0. And ''ShuffleGroupsEveryGeneration'' to false.&lt;br /&gt;
&lt;br /&gt;
=== Assortment and Group conflict ===&lt;br /&gt;
&lt;br /&gt;
For assortment and group conflict please set the ''frequency of group conflict'' (&amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt;) to a positive value. And ''ShuffleGroupsEveryGeneration'' to false.&lt;br /&gt;
&lt;br /&gt;
=== Only Group conflict ===&lt;br /&gt;
&lt;br /&gt;
For only group conflict please set the ''frequency of group conflict'' (&amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt;) to a positive value. And ''ShuffleGroupsEveryGeneration'' to true.&lt;/div&gt;</description>
			<pubDate>Wed, 02 Nov 2011 10:51:19 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Parochialism</comments>		</item>
		<item>
			<title>Parochialism</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Parochialism</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Parochialism]]&lt;br /&gt;
&lt;br /&gt;
Here you find a piece of software that helps estimating the probability of fixation for discriminate and indiscriminate altruists in a prisoner's dilemma game. Please see the details on the paper.  &lt;br /&gt;
&lt;br /&gt;
'''You can download the software [http://www.evolbio.mpg.de/~garcia/jars/ParochialismOnline.jar here].''' &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
= Abstract = &lt;br /&gt;
&lt;br /&gt;
The evolution of parochial altruism is not well understood. We study this problem by considering a prisoner’s dilemma game with four strategies: altruists who cooperate with everyone; parochialists who only cooperate with members of their own group; traitors who only cooperate with outgroup individuals; and egoists who never cooperate. We develop a model that allows for both assortment and conflict between groups. Individuals discriminate between in- and outgroup members. While assortment and conflict allow for the evolution of both indiscriminate and parochial altruism, discriminate behavior creates an advantage for parochialists over altruists, as the latter waste help on outgroup members. We use computer simulations to study the multilevel selection dynamics. The simulation model describes an ab-&lt;br /&gt;
sorbing Markov chain. We examine the absorption probabilities of altruists and parochialists. Three model versions are compared, with only assortment, with only group conflict, and with both mechanisms. We find that parochialism is selected for by group conflict as well as assortment. Discrimination allows for cooperation inside groups to withstand regular interactions with outgroup members.&lt;br /&gt;
&lt;br /&gt;
= Run the software =&lt;br /&gt;
&lt;br /&gt;
You can download the software [http://www.evolbio.mpg.de/~garcia/jars/ParochialismOnline.jar here]. &lt;br /&gt;
&lt;br /&gt;
Once the program is running just '''click on the big ''play'' button''' to start the fun. Feel free to re-arrange and re-size the windows, zoom-in and out as the program is running. &lt;br /&gt;
&lt;br /&gt;
[[File:Parochialism Simulations Screenshot.png|300px|center|thumb|Screenshot of the simulations]]&lt;br /&gt;
&lt;br /&gt;
Use [http://www.java.com/en/download/index.jsp Java RunTime] 5.0 or newer to run the software. It should be just fine if you already have java installed in your machine, just double click once you have downloaded the file, or choose open from the browser box.&lt;br /&gt;
&lt;br /&gt;
= Parameters =&lt;br /&gt;
&lt;br /&gt;
Here's the list of parameters in the order they appear in the software, and how they relate to the model in the paper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!width=&amp;quot;225&amp;quot;|'''Parameter'''&lt;br /&gt;
!width=&amp;quot;50&amp;quot;|'''Model'''&lt;br /&gt;
!width=&amp;quot;225&amp;quot;|'''Simulation'''&lt;br /&gt;
!width=&amp;quot;225&amp;quot;|'''Recommended range'''&lt;br /&gt;
|-&lt;br /&gt;
|Frequency of group conflict || &amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt; || AverageFrequencyOfGroupsInConflict || 0.0 - 0.1&lt;br /&gt;
|-&lt;br /&gt;
|Benefit (in the PD game) || &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; || B || Any value greater than c&lt;br /&gt;
|-&lt;br /&gt;
|Cost (in the PD game) || &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; || C || Positive value (or zero for snow-drift game)&lt;br /&gt;
|-&lt;br /&gt;
|Group size || &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; || GroupSize || Greater than 2&lt;br /&gt;
|-&lt;br /&gt;
|Probability of ingroup interaction || &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; || IngroupProbability || 0.0 - 1.0 &lt;br /&gt;
|-&lt;br /&gt;
|Probability of migration || &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; || MigrationProbability || 0.0 - 1.0&lt;br /&gt;
|-&lt;br /&gt;
|Incumbent (or mutant) strategy ||  || Mutant || Either altruist or parochialist&lt;br /&gt;
|-&lt;br /&gt;
|Number of groups || &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; || NumberOfGroups || Greater than 3&lt;br /&gt;
|-&lt;br /&gt;
|Seed for random number generation ||  || Seed || Any value&lt;br /&gt;
|-&lt;br /&gt;
|Intensity of selection || &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; || SelectionIntensity || For weak selection 0.1&lt;br /&gt;
|-&lt;br /&gt;
|Re-shuffle groups every generation ||  || ShuffleGroupsEveryGeneration || Set to true, if you want to avoid assortment&lt;br /&gt;
|-&lt;br /&gt;
|Splitting probability || &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; || SplittingProbability || Between 0 and 1.0 (default is 0.01)&lt;br /&gt;
|-&lt;br /&gt;
|Steepness of winning probability curve || &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt; || Steepness || Between 0 and 1.0 (default is 0.5)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a more detailed description on these values please refer to section 4.2 in the paper.&lt;br /&gt;
&lt;br /&gt;
= Assortment, Group Conflict or Both =&lt;br /&gt;
&lt;br /&gt;
=== Only assortment ===&lt;br /&gt;
&lt;br /&gt;
For only assortment please set the ''frequency of group conflict'' (&amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt;) to 0. And ''ShuffleGroupsEveryGeneration'' to false.&lt;br /&gt;
&lt;br /&gt;
=== Assortment and Group conflict ===&lt;br /&gt;
&lt;br /&gt;
For assortment and group conflict please set the ''frequency of group conflict'' (&amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt;) to a positive value. And ''ShuffleGroupsEveryGeneration'' to false.&lt;br /&gt;
&lt;br /&gt;
=== Only Group conflict ===&lt;br /&gt;
&lt;br /&gt;
For only group conflict please set the ''frequency of group conflict'' (&amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt;) to a positive value. And ''ShuffleGroupsEveryGeneration'' to true.&lt;/div&gt;</description>
			<pubDate>Fri, 21 Oct 2011 09:36:09 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Parochialism</comments>		</item>
		<item>
			<title>Repeated Games Simulation</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Repeated_Games_Simulation</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Repeated Games Simulations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Repeated Games]]&lt;br /&gt;
Here you can run the simulations!&lt;br /&gt;
&lt;br /&gt;
== Repeated Games Simulations ==&lt;br /&gt;
&lt;br /&gt;
You can download the software [http://www.evolbio.mpg.de/~garcia/jars/RepeatedGamesOnline.jar here]. &lt;br /&gt;
&lt;br /&gt;
Once the program is running just click on the big ''play'' button to start the fun. Feel free to re-arrange and re-size the windows, zoom-in and out as the program is running. &lt;br /&gt;
&lt;br /&gt;
[[File:Repeated Games Screenshot.png|300px|center|thumb|Screenshot of the simulations]]&lt;br /&gt;
&lt;br /&gt;
Use [http://www.java.com/en/download/index.jsp Java RunTime] 5.0 or newer to run the software. It should be just fine if you already have java installed in your machine, just double click once you have downloaded the file, or choose open from the browser box.&lt;br /&gt;
&lt;br /&gt;
Go [[Repeated Games | back to the main project entry]].&lt;br /&gt;
&lt;br /&gt;
== Notes on using the software ==&lt;br /&gt;
&lt;br /&gt;
* If you use measures (of cooperation and reciprocity) the software will run considerably slower than when not using measures.&lt;br /&gt;
&lt;br /&gt;
* The parameter ''precisionMeasures'' determines how long in the history of the game will you go to compute measures of reciprocity and cooperation. Tune it to your machine's power and consider the continuation probability.&lt;br /&gt;
&lt;br /&gt;
* Send us an email if you want to generate data from the software in plain files, or if you just have questions or comments ('''Matthijs''' c.m.vanveelen AT uva.nl - or - '''Julian''' garcia AT evolbio dot mpg . de )&lt;br /&gt;
&lt;br /&gt;
* If you use the ''Moran process'' (instead of the default ''Wright-Fisher process'') use a mutation rate that is considerably smaller than ''1/populationSize'' so that the strength of selection is meaningful&lt;/div&gt;</description>
			<pubDate>Fri, 21 Oct 2011 09:29:49 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Repeated_Games_Simulation</comments>		</item>
		<item>
			<title>Repeated Games Simulation</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Repeated_Games_Simulation</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Notes on using the software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Repeated Games]]&lt;br /&gt;
Here you can run the simulations!&lt;br /&gt;
&lt;br /&gt;
== Repeated Games Simulations ==&lt;br /&gt;
&lt;br /&gt;
You can download the software [http://staff.feweb.vu.nl/j.garcia/software/RepeatedGamesOnline.jar here]. &lt;br /&gt;
&lt;br /&gt;
Once the program is running just click on the big ''play'' button to start the fun. Feel free to re-arrange and re-size the windows, zoom-in and out as the program is running. &lt;br /&gt;
&lt;br /&gt;
[[File:Repeated Games Screenshot.png|300px|center|thumb|Screenshot of the simulations]]&lt;br /&gt;
&lt;br /&gt;
Use [http://www.java.com/en/download/index.jsp Java RunTime] 5.0 or newer to run the software. It should be just fine if you already have java installed in your machine, just double click once you have downloaded the file, or choose open from the browser box.&lt;br /&gt;
&lt;br /&gt;
Go [[Repeated Games | back to the main project entry]].&lt;br /&gt;
&lt;br /&gt;
== Notes on using the software ==&lt;br /&gt;
&lt;br /&gt;
* If you use measures (of cooperation and reciprocity) the software will run considerably slower than when not using measures.&lt;br /&gt;
&lt;br /&gt;
* The parameter ''precisionMeasures'' determines how long in the history of the game will you go to compute measures of reciprocity and cooperation. Tune it to your machine's power and consider the continuation probability.&lt;br /&gt;
&lt;br /&gt;
* Send us an email if you want to generate data from the software in plain files, or if you just have questions or comments ('''Matthijs''' c.m.vanveelen AT uva.nl - or - '''Julian''' garcia AT evolbio dot mpg . de )&lt;br /&gt;
&lt;br /&gt;
* If you use the ''Moran process'' (instead of the default ''Wright-Fisher process'') use a mutation rate that is considerably smaller than ''1/populationSize'' so that the strength of selection is meaningful&lt;/div&gt;</description>
			<pubDate>Fri, 21 Oct 2011 09:29:18 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Repeated_Games_Simulation</comments>		</item>
		<item>
			<title>Repeated Games</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Repeated_Games</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Repeated Games]]&lt;br /&gt;
This project studies the evolution of cooperation in a repeated prisoner's dilemma with discounting.   A version of the paper can be downloaded [http://www.tinbergen.nl/ti-publications/discussion-papers.php?paper=1587 here] &lt;br /&gt;
&lt;br /&gt;
= Run the simulations =&lt;br /&gt;
&lt;br /&gt;
You can download the software [http://www.evolbio.mpg.de/~garcia/jars/RepeatedGamesOnline.jar here]. Once the program is running just click on the big ''play'' button to start the fun. Feel free to re-arrange and re-size the windows, zoom-in and out as the program is running. Click [[Repeated Games Simulation | here]] if you need more information about running this program.&lt;br /&gt;
&lt;br /&gt;
= The simulation program =&lt;br /&gt;
&lt;br /&gt;
== What are strategies? ==&lt;br /&gt;
&lt;br /&gt;
Strategies are either programmed explicitly as finite automata, as regular expressions, or as Turing machines. The set of regular expressions is equivalent to the set of finite automata, but because they are represented differently, the likelihoods of mutations also are different; a mutation that is a single step in one representation requires a series of steps in the other and vice versa. &lt;br /&gt;
&lt;br /&gt;
A finite automaton is a list of states, and for every state it prescribes what the automaton plays when in that state, to which state it goes if the opponent plays cooperate, and to which state it goes if the opponent plays defect. &lt;br /&gt;
&lt;br /&gt;
[[File:grimTriggerFSA.png|300px|thumb|center|Example Finite State Automata (Grim Trigger)]]&lt;br /&gt;
&lt;br /&gt;
The computer representation of the automate above is an array with the following values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
'''[C, 0, 1 | D, 1, 1]'''&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each array position represents a state. Every state codes for an action and two indexes, where to go on cooperation, and where to go on defection. The first state (indexed 0) codes the action for the empty game history. &lt;br /&gt;
Go to [[Computer representation of strategies for repeated games]] to see more details  and more ways to represent strategies.&lt;br /&gt;
&lt;br /&gt;
== The simulation ==&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; individuals and every generation they are randomly matched in pairs to play the repeated game. The repeated game has a probability of breakdown smaller than &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;, hence the number of repetitions is a random variable. The payoffs from the interactions are used in the update step. There are two options; the Moran process and the Wright-Fisher process. In the Moran process, in every generation one individual is chosen to be replaced, and one is chosen to replace. All individuals are equally likely to be chosen to be replaced. Probabilities of being chosen to replace are proportional to fitness. In the Wright-Fisher process all individuals in the new generations are drawn one by one, and independently, from a distribution where, again, the probability of being the offspring of individual &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; from the old generation is proportional to the payoff of &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;. The Moran process is extremely inefficient, so we always use the Wright-Fisher process, but the option is there.&lt;br /&gt;
&lt;br /&gt;
After the new generation has been drawn, all individuals have a small and independent probability with which they mutate. There are four types of mutations; mutations that add a state, mutations that delete a state, mutations that change the output when in a state, and mutations that change for a given state to which state this player goes, given an action of the opponent. This completes the cycle for a generation. The cycle is repeated a large number of times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:RepeatedGamesLifecycle.png|650px|center|thumb|Lifecycle]]&lt;br /&gt;
&lt;br /&gt;
= Mutations =&lt;br /&gt;
&lt;br /&gt;
Possible mutations are adding (randomly constructed) states , deleting states (if the array has more than one state), and reassigning destination states at random. On deleting a state the transitions are rewired to the remaining states. The following video shows an example path of mutations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{{#ev:youtube|mPUrB8aFFuI|450}}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Measures of cooperativeness and reciprocity =&lt;br /&gt;
&lt;br /&gt;
(See the formal and longer version of this section[[Measuring Cooperation and Reciprocity | here]])&lt;br /&gt;
&lt;br /&gt;
There are two reasons why we would like to have measures for cooperativeness and reciprocity. The first and most important reason is obvious; we would simply like to know how cooperative, and how reciprocal, strategies are during a run. The second reason is that these measures may serve as an indication of indirect invasions. Typically an indirect invasion is characterized by a change in reciprocity followed by a change in cooperativeness.&lt;br /&gt;
&lt;br /&gt;
Any measure of cooperativeness will have to weigh the different histories, and as we will see, every choice how to weigh them has appealing properties and drawbacks. In contrast to the definitions earlier, here it is more natural to look at histories that only reflect what actions the ''other'' player has played. This captures all relevant histories for the measurement of cooperativeness, because what a strategy &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; itself has played is uniquely determined by the history of actions by the other player. We propose measures of reciprocity and cooperation that are more formally described [[Measuring Cooperation and Reciprocity | here]].&lt;br /&gt;
&lt;br /&gt;
An intuition for what this measure does can be gained from the following figures. The top bar represents the empty history. The second bar represents histories of length &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;, and is split in two; the history where the other has cooperated, and the one where the other has defected. The third bar represents histories of lenth &amp;lt;math&amp;gt;2&amp;lt;/math&amp;gt;, and is split in four; the histories &amp;lt;math&amp;gt;CC&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;CD&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;DC&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;DD&amp;lt;/math&amp;gt;. This continues indefinitely, but for the pictures we restrict ourselves to histories of length &amp;lt;math&amp;gt;5&amp;lt;/math&amp;gt; or less. If a part is blue, then that means that the strategy reacts to this history with cooperation, if it is red, then the strategy reacts with defection. Cooperativeness weighs the blueness of those pictures.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:AlwaysCooperate.png | Always Cooperate&lt;br /&gt;
File:AlwaysCooperateFSA.png&lt;br /&gt;
File:AlwaysDefect.png | Always Defect&lt;br /&gt;
File:AlwaysDefectFSA.png&lt;br /&gt;
File:FirstMove.png | Condition on first move&lt;br /&gt;
File:ConditionOnFirstMoveFSA.png&lt;br /&gt;
File:GrimTrigger.png | Grim Trigger&lt;br /&gt;
File:GrimTriggerFSA.png&lt;br /&gt;
File:NegativeHandshake.png | Negative Handshake (DTFT)&lt;br /&gt;
File:NegativeHandshakeFSA.png&lt;br /&gt;
File:TitForTat.png |Tit for Tat&lt;br /&gt;
File:TitForTatFSA.png&lt;br /&gt;
File:TatForTit.png | Tat for Tit&lt;br /&gt;
File:TatForTitFSA.png&lt;br /&gt;
File:TitForTwoTats.png | Tit for two Tats&lt;br /&gt;
File:TitForTwoTatsFSA.png&lt;br /&gt;
File:Wsls.png | Win stay lose shift&lt;br /&gt;
File:WslsFSA.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A measure for reciprocity can be constructed by comparing how much the cooperativeness of strategy &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is changed if its opponent plays &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; rather than &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;. In the figure above, this is visualized as the difference in blueness below two neighbouring bits that share their history up to the one before last period. &lt;br /&gt;
&lt;br /&gt;
[[Measuring Cooperation and Reciprocity | See in more detail how the measures are defined]].&lt;br /&gt;
&lt;br /&gt;
= Analyzing the simulation output =&lt;br /&gt;
&lt;br /&gt;
Population states are classified by ranking the composing strategies from frequent to infrequent. Then we look at the minimum number of strategies that is needed to capture at least a fixed percentage of the population. As a default, we choose ''90%'' for the threshold. A population state is then characterized by its dimensionality (pure, 2 strategies, 3 strategies, more&lt;br /&gt;
than 3 strategies) and the actual most popular strategy, resp. the 2 most popular and the 3 most popular strategies, as they are ranked. If 3 strategies are not enough to capture this fixed percentage of the population, then we think of the population as being lost in the interior, or in the dark zone. With mutation rates that are not too high, the population hardly ever gets into the dark zone.&lt;br /&gt;
&lt;br /&gt;
The software first reduces a simulation run by registring transitions from area to area, as pictured blow (pictures), and thereby it reduces the simulation run to a sequence of areas in which the population finds itself. At every transition, the software then determines if this is a transition that is advantageous, disadvantageous or neutral. Going from area &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; (where strategy &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; accounts for more than ''90%'' of the population) to &amp;lt;math&amp;gt;AB&amp;lt;/math&amp;gt; (where strategy &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; accounts for less, and &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; together count for more than ''90%'' of the population, and &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is most and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is second most popular) is for instance a neutral transition if &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are neutral mutants, advantageous if &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; dominates &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and disadvantageous if &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; dominates &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If a matrix game with strategies than &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; would result in a coordination game, then this transition is also classified as disadvantageous, as the replicator dynamics would point towards pure &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and not away from it. If this matrix game would only have a mixed equilibrium, then the transition is classified as advantageous, as the replicator dynamics would point away from pure &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;. This more or less ignores that the fraction of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; in the actual equilibrium mixture might be more than ''90%''. &lt;br /&gt;
&lt;br /&gt;
As explained in the paper, this is unavoidable, but if we want data invasions of which we can actually analyse, it is also an argument to choose high thresholds. (High thresholds come with large dark zones, so if we want to avoid the simulation run to (temporarily) get lost in the dark zone, they will have to go together with low mutation probabilities). The harm done is expected to be limited though. The results indicate that if we restrict the game to &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, then all mixed equilibria are prone to fixation out of a mixture anyway, even if the equilibrium mixture is 50-50. Equilibria that are close to the boundary are enormously more prone to a fixation event, because not only are they close to the brorder already, but the dynamics are also weaker, the closer to the equilibrium. Therefore we do not expect that it happens a lot that we classify a population as &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, while it really is spending a considerable amount of time in an equilibrium mixture of more than ''90%'' &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; an less than ''10%'' &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; - and ever less so the higher the threshold.&lt;br /&gt;
&lt;br /&gt;
Within this sequence of areas, we can classify states as...&lt;br /&gt;
&lt;br /&gt;
= The best responder =&lt;br /&gt;
&lt;br /&gt;
In order to be able to determine if a finite automaton - and hence a pure strategy - is a Nash equilibrium, we have constructed a small routine in the program called the best responder. This routine finds the payoff of the best response against strategy &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, as well as a best response. If the payoff of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; against itself equals this payoff, then &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a Nash equilibrium. This is a useful device, since the infinity of the strategy space does not allow us to simply compare the payoff of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; against itself to the payoff of all other strategies against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; one after the other. &lt;br /&gt;
&lt;br /&gt;
Suppose strategy &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is an automaton with &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; states. Any state &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; is characterized by an action played by &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; when it finds itself in this state, and a list of transitions as a function of the action played by the opponent of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;. With a slightly abusive notation - &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a function of histories elsewhere, while here it is easier to make it a function of states - we will write the first as &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S:{ 1,...,K} \rightarrow A&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
and the latter as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;t_{k}:A\rightarrow { 1,...,K}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;k=1,...,K&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The value of being in state &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; is denoted by &amp;lt;math&amp;gt;V(k)&amp;lt;/math&amp;gt;. We aim to find a solution to the following system: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
V(k) = \max_{a \in A}{\pi_{1} (a, S(k))+\delta V(t_{k}(a))} \qquad k=1,...,K&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;V^{\ast}(k) ,k=1,...,K&amp;lt;/math&amp;gt; be the solution to this system. The discounted value in the initial state, &amp;lt;math&amp;gt;(1-\delta) V^{\ast }(1)&amp;lt;/math&amp;gt;, is the maximal discounted payoff to be earned against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;a_{k}^{\ast}=\arg \max_{a\in A}{\pi_{1}(a,S(k)) +\delta V^{\ast }(t_{k}(a))}&amp;lt;/math&amp;gt; gives the optimal action when &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is in state &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The best responder does the following iteration.&lt;br /&gt;
&lt;br /&gt;
Initialisation step:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
V_{1}(k) =0, \qquad k=1,...,K&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Iteration step:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
V_{n+1}(k) =\max_{a \in A}{\pi_{1}(a,S(k)) +\delta V_{n}(t_{k}(a))} \qquad k=1,...,K&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is quite straightforward that this iteration converges, as is shown in the following simple lemma. We will assume that the initialisation makes sure that we begin with values for all states that are below the solution of the system (whenever this procedure is invoked, we make sure that is in fact the case) but that is not actually necessary for convergence. &lt;br /&gt;
&lt;br /&gt;
 '''Lemma'''&lt;br /&gt;
 If &amp;lt;math&amp;gt;V_{1}(k)\leq V^{\ast}(k)&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; and if &amp;lt;math&amp;gt;\delta \in [0,1)&amp;lt;/math&amp;gt; then the above iteration converges to &amp;lt;math&amp;gt;V^{\ast}(k), \qquad k=1,...,K&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''Proof'''&lt;br /&gt;
 First, if &amp;lt;math&amp;gt;V_{n}(k)\leq V^{\ast}(k)&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;, then also &lt;br /&gt;
 &amp;lt;math&amp;gt;V_{n+1}(k) = \max_{a\in A}{\pi_{1}(a,S(k)) +\delta V_{n}(t_{k}(a))}\leq \max_{a \in A}{\pi_{1}(a,S(k))+\delta V^{\ast }(t_{k}(a))} = V^{\ast}(k)&amp;lt;/math&amp;gt; &lt;br /&gt;
 for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;.&lt;br /&gt;
 Hence &amp;lt;math&amp;gt;V^{\ast }(k) -V_{n}(k) \geq 0&amp;lt;/math&amp;gt; for all states  &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; and all iterations &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. By definition we also have&lt;br /&gt;
 &amp;lt;math&amp;gt;V_{n+1}(k) \geq \pi_{1}(a_{k}^{\ast},S(k)) + \delta V_{n}(t_{k}(a_{k}^{\ast }))&amp;lt;/math&amp;gt; &lt;br /&gt;
 for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;&lt;br /&gt;
 Therefore  &lt;br /&gt;
 &amp;lt;math&amp;gt;0\leq V^{\ast}(k)-V_{n+1}(k) \leq \delta (V^{\ast }(t_{k}(a_{k}^{\ast})) -V_{n}(t_{k}(a_{k}^{\ast })))&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;&lt;br /&gt;
 This implies that &lt;br /&gt;
 &amp;lt;math&amp;gt;0\leq \max_{k}(V^{\ast }(k) -V_{n+1}(k)) \leq \delta \max (V^{\ast }(k) -V_{n}(k))&amp;lt;/math&amp;gt;&lt;br /&gt;
 and since &amp;lt;math&amp;gt;\delta&amp;lt;0&amp;lt;/math&amp;gt; we find that &amp;lt;math&amp;gt;\lim_{n\rightarrow \infty }(V^{\ast }(k) -V_{n}(k)) =0&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. QED.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The best responder gives us both the maximum payoff &amp;lt;math&amp;gt;(1-\delta) V^{\ast}(1)&amp;lt;/math&amp;gt; when playing against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, and an optimal strategy  when playing against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, as &amp;lt;math&amp;gt;a_{k}^{\ast }&amp;lt;/math&amp;gt; prescribes what to play when &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is in state &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. For numerical reasons, we actually use the latter. It is important for us to determine whether or not the payoff of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; against itself is exactly equal to the maximum payoff when playing against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;. The iteration with which the best responder finds the latter can have a numerical inaccuracy in it, and the evaluating the payoff of two given strategies against each other (here: &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;) can too. These are however different inaccuracies, so in order to have the ''same'' inaccuracies in both, we use the strategy that the best responder gives, first let it play that against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, then let &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; play against itself, and compare the two payoffs. If they are equal, then &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a best response&lt;br /&gt;
to itself.&lt;br /&gt;
&lt;br /&gt;
Note that the computer program works with phenotypes, not with genotypes, so two different ways to encode for instance the strategy &amp;lt;math&amp;gt;AllD&amp;lt;/math&amp;gt; will be treated as one and the same strategy.&lt;/div&gt;</description>
			<pubDate>Fri, 21 Oct 2011 09:28:28 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Repeated_Games</comments>		</item>
		<item>
			<title>Category:It takes grouping and cooperation to get sociality</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Category:It_takes_grouping_and_cooperation_to_get_sociality</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This category groups information related to the paper: [http://www1.fee.uva.nl/creed/people/veelen/index.shtml van Veelen, Matthijs], [http://staff.feweb.vu.nl/sociality/ García Julián] and [http://www.zoology.ubc.ca/person/laviles Avilés Leticia]. '''It takes grouping and cooperation to get sociality'''.  ''Journal of Theoretical Biology'' 264(4) Pages 1240-1253.  [http://dx.doi.org/10.1016/j.jtbi.2010.02.043 Download the article]&lt;/div&gt;</description>
			<pubDate>Fri, 21 Oct 2011 09:26:10 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Category_talk:It_takes_grouping_and_cooperation_to_get_sociality</comments>		</item>
		<item>
			<title>Sociality</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Sociality</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Run the simulations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:It takes grouping and cooperation to get sociality]]&lt;br /&gt;
The software we provide and describe here reimplements simulations first described in [http://www.pnas.org/content/99/22/14268.abstract Aviles 2002] using Java . Our simulation program also has alternative fitness functions and some additional features. If you have questions or require further information about this work or this tutorial please do email [mailto:garciaATevolbio.mpg.de Julian Garcia], [mailto:c.m.veelenATuva.nl Matthijs van Veelen] or [mailto:lavilesATzoology.ubc.ca Leticia Avilés].&lt;br /&gt;
&lt;br /&gt;
= Editorial Information =&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml van Veelen, Matthijs], [http://staff.feweb.vu.nl/sociality/ García Julián] and [http://www.zoology.ubc.ca/person/laviles Avilés Leticia]. '''It takes grouping and cooperation to get sociality'''.  ''Journal of Theoretical Biology'' 264(4) Pages 1240-1253.  [http://dx.doi.org/10.1016/j.jtbi.2010.02.043 Download the article]&lt;br /&gt;
&lt;br /&gt;
= Abstract =&lt;br /&gt;
Cooperation and grouping are regularly studied as separate traits. The evolution of sociality however requires both that individuals get together in groups and that they cooperate within them. Because the level of cooperation can influence selection for group size, and vice versa, it is worth studying how these traits coevolve. Using a generally applicable two-trait optimization approach, we provide analytical solutions for three specific models. These solutions describe how cooperative associations of nonrelatives evolve, and predict how large and how cooperative they will be. The analytical solutions help understand how changes in parameter values, such as the group carrying capacity and the costs of cooperation, affect group size and the level of cooperation in equilibrium. Although the analytical model makes a few simplifying assumptions - populations are assumed to be monomorphic for grouping as well as for cooperative tendencies, and group size is assumed to be deterministic - simulations show that its predictions are matched quite closely by  results for settings where these assumptions do not hold.&lt;br /&gt;
&lt;br /&gt;
= Run the simulations =&lt;br /&gt;
&lt;br /&gt;
Click on the link corresponding to the model you want to run, and ''choose download and double click, or just open with Java Runtime''. You should set the parameters and press the ''play button'' to start a run. If you want to change the parameters press stop, and then refresh so that new values can be introduced. Feel free to re-arrange the windows or zoom into the graphs. &lt;br /&gt;
&lt;br /&gt;
* [http://www.evolbio.mpg.de/~garcia/jars/LimitedOnlineVersion.jar Start the Limited Nesting Sites model]&lt;br /&gt;
&lt;br /&gt;
* [http://www.evolbio.mpg.de/~garcia/jars/GlobalOnlineVersion.jar Start the Global Density Dependence model]&lt;br /&gt;
&lt;br /&gt;
* [http://www.evolbio.mpg.de/~garcia/jars/ConstantOnlineVersion.jar Start the Constant Population Size model]&lt;br /&gt;
&lt;br /&gt;
= The genetic system = &lt;br /&gt;
&lt;br /&gt;
== What individuals are made of ==&lt;br /&gt;
&lt;br /&gt;
Individuals are characterized by a diploid genome coding for two separate traits; grouping and cooperative tendencies. The number of loci for each of these traits can be chosen by the user of the program. The number of loci for grouping will be denoted by n, and the number of loci for cooperation will be denoted by m. We followed [http://www.pnas.org/content/99/22/14268.abstract Avilés et al. (2002)] by choosing 15 as a default value for the number of loci for both traits. The loci of an individual will be numbered from &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;n+m&amp;lt;/math&amp;gt;, where the first n loci code for grouping tendencies and the loci from n+1 to n+m code for cooperative tendencies. The alleles will be indicated as left and right. At each locus, two alleles (1 or 0) can occur. The tendency of individual i to form groups is denoted by gi, and equals the proportion of 1’s in the grouping portion of its genome, or the number of 1’s divided by 2n. The tendency of individual i to cooperate, denoted by Íi, is the proportion of 1’s in the cooperation part of its genome, or the number of 1’s in the second part of its genome, divided by 2m. This implies that gi and Íi vary between 0 and 1, and are multiples of 1 over twice the number of loci.&lt;br /&gt;
&lt;br /&gt;
[[File:GenomeSociality.png|500px|center|thumb|Example genome as represented in the computer]]&lt;br /&gt;
&lt;br /&gt;
The choice for the genome size has an effect on the speed of selection. Reducing the genome size for any one of the tendencies increases the speed of selection for that tendency. This is because the marginal effect of one allele changing from a 0 into a 1 on fitness is larger with a smaller number of loci. The speed of selection of one of the tendencies relative to the other can obviously be tuned by adjusting the one genome size and keeping the other genome size constant.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
| [[File:SlowCooperation.png|400px|center|thumb|Cooperation is slow relative to grouping tendencies]]  ||[[File:FastCooperation.png|390px|center|thumb|Cooperation is fast relative to grouping tendencies]]||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mutations; inversions and translocations first ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the mutation stage (see below for when that is) one Bernouilli trial determines whether or not a mutation occurs in the grouping part of the genome of an individual, and another Bernouilli trial determines whether or not a mutation occurs at the cooperation part. These trials are independently run for every population member again. The probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; with which a mutation occurs is chosen by the user of the program, and &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt; obviously is the probability with which no mutation occurs. If the outcome of the Bernouilli trial is, for instance, that a mutation will occur in the grouping part of the genome, then first a random allele is selected from that part of the genome, with all alleles having equal probability to be chosen. Then the program tries to find an allele that is dissimilar to it (that is: a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; if it is a &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; itself, and a &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; if it is a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; itself) in order to swap places. It starts looking for a dissimilar allele at the same side of the genome. Suppose the randomly determined first allele is the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j \in \{1,...,n\}&amp;lt;/math&amp;gt; The program then starts checking the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j+ 1&amp;lt;/math&amp;gt;. If that is the same as the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;, then it moves on to the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j+2&amp;lt;/math&amp;gt;, and so on, and after locus &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; it continues looking from locus &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; and goes on until locus &amp;lt;math&amp;gt;j-1&amp;lt;/math&amp;gt;. If it has found a first different allele, then the two are interchanged, which is equivalent to inverting the string in between and including them. If it has not found a different allele, then it continues looking for a different allele at the other side; in this case, it starts at the right allele at locus &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;, and then repeats the search for an allele that is different. If the program finds one, the &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; are interchanged, imitating translocation. If the program does not find one here either, then there are either only &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s or only &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s to be found, and then a random allele is chosen to be changed into the other value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This procedure is repeated for all individuals in the pool. Only at the edges, where a substantial share of the individuals will be either all be all &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s or all be all &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s, there will be mutation pressure with a bias against the most common allele, but the priority of inversion and translocation reduces that as much as possible when not almost at the extremes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mating ==&lt;br /&gt;
&lt;br /&gt;
If an individual reproduces, then a random other member of the population is chosen with which it will reproduce. This implies that there is sex, but there are no different sexes. Both individuals then produce a gamete, and these together form the new individual. &lt;br /&gt;
&lt;br /&gt;
== Producing gametes ==&lt;br /&gt;
&lt;br /&gt;
If an individual produces a gamete, then locus 1 of the gamete will with probability one half be a copy of the &amp;lt;math&amp;gt;right&amp;lt;/math&amp;gt; allele at locus one of the individual, and with probability one half it will be a copy of the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus one of the individual. The next locus of the gamete will be a copy from the same side of the genome with probability &amp;lt;math&amp;gt;0.5 + 0.5 P_l&amp;lt;/math&amp;gt;, and with probability &amp;lt;math&amp;gt;0.5 - 0.5 P_l&amp;lt;/math&amp;gt; it will be a copy from the other side of the genome. Here, &amp;lt;math&amp;gt;P_l \in [0,1]&amp;lt;/math&amp;gt; is the linkage level. In the current version of the program, the linkage is set to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Asexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
In the program, the user can also uncheck sexual reproduction. In that case individuals just produce exact copies of themselves. Automatically, the mutation procedure will then also change; it will not consist of inversion and translocation, but only change &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s in &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s and &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s in &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s. If asexual reproduction were to be combined with translocation and inversion first, then once all individuals share the same number of loci for grouping and/or for cooperation, this would remain stable forever, if that number is positive, because translocation and inversion keep the number of &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s and &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s constant.  &lt;br /&gt;
&lt;br /&gt;
== Initial population ==&lt;br /&gt;
&lt;br /&gt;
The default initial population consists of individuals with grouping and cooperative tendency &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;. The user can choose to initialize the population randomly with positive grouping and cooperative tendencies by choosing positive values for parameters &amp;lt;math&amp;gt;ProbabilityActiveLociCooperation&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;ProbabilityActiveLociGroupishness&amp;lt;/math&amp;gt;. Then the initial population is determined by drawing every allele in the genome of every individual randomly, with these probabilities as parameters.&lt;br /&gt;
&lt;br /&gt;
= Lifecycle =&lt;br /&gt;
&lt;br /&gt;
== Global pool and group formation ==&lt;br /&gt;
&lt;br /&gt;
A central and shared feature of all simulation models encompassed in the program is that there are two distinct stages in a life cycle. At one stage, all individuals are gathered together without structure in a global population pool. At the other stage, individuals form groups, in which reproduction takes place. The transition of a population from the global pool to the groups, and the reproduction within the groups before the offspring returns to the global pool is where the simulation program offers different possibilities. Mutation takes place when individuals are in the global pool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:LifecycleSociality.png|600px|thumb|center|Lifecycle]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== From the global pool to the groups ==&lt;br /&gt;
Individuals leave the global pool in random order. When they leave, they go to visit sites, where they either initiate new groups, or join already formed groups. If a site is empty, they ''join'' (initiate a new group) with probability &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;. If a site is not empty, then the program offers two possibilities for the probability with which they join, from which the user can choose. &lt;br /&gt;
&lt;br /&gt;
For the default option, the probability that individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;, that itself has grouping tendency &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt;, will join a group whose average grouping tendency of &amp;lt;math&amp;gt;\bar{g}&amp;lt;/math&amp;gt; is&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;g_i \times \bar{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
The second option for the joining probability is called ''truncated joining'' in the computer program, and it truncates the possible group sizes at &amp;lt;math&amp;gt;n^{*}&amp;lt;/math&amp;gt;, and reduces the probability of joining more for larger groups than for smaller groups. Here the probability of joining a group that consists of n individuals is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;g_i \times \bar{g} \left(1- \frac{n}{n^{*}}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for &amp;lt;math&amp;gt;n &amp;lt; n^{*}&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;n^{*}&amp;lt;/math&amp;gt; is the expected stable group size. The stable group size is the fixed point of the fitness function (see below), assuming that &amp;lt;math&amp;gt;\gamma_i = \bar{\gamma}&amp;lt;/math&amp;gt;. Whenever &amp;lt;math&amp;gt;n\geq n^{*}&amp;lt;/math&amp;gt;, the group acceptance probability is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option matches the model in [http://www.journals.uchicago.edu/doi/abs/10.1086/324792 Avilés et al. (2002)]. Given a distribution of &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt;’s in the population, the distribution of sizes will be somewhat different between the two. Also, if selection would produce the same average group size, the shape of the distribution of group sizes will differ a bit. Running the two options however shows that this does not really make a difference for the group size in the fixed point. Because the computation of &amp;lt;math&amp;gt;n^{*}&amp;lt;/math&amp;gt; requires information that individuals in realistic situations may not have, one can therefore, without changing the model results, resort to the first version that requires less information. The only advantage of the second, truncated version is that it gets to the fixed point faster.&lt;br /&gt;
&lt;br /&gt;
The program allows for three options for the order in which the sites are visited. One option (called ''Random'' in the program) is that every individual visits the sites in random order. Another option (''Forward'') is that everyone starts at site number ''1'', then goes to site number ''2'', then to number ''3'' and so on. The third option (''Backwards'') is that everyone starts trying to be admitted at the non-empty site with the highest number. Say that this is site number ''n''. Then it goes backwards, first to site ''n-1'', then to ''n-2'' and so on, until it is at site number ''1''. If the individual is then still not admitted, it starts a new group at site ''n+1''.&lt;br /&gt;
&lt;br /&gt;
These different orders of visiting will produce different size distributions; with ''Forward'', the variance in sizes will be the largest, with ''Backwards'' it will be the smallest, and with ''Random'' it will be somewhere in between. &lt;br /&gt;
&lt;br /&gt;
How many sites there will be and when the flow from the global population pool to the groups stops, depends on the way in which the size of the global population is balanced; there are three options (limited nesting sites, global density dependence, limited total population) that are discussed below.&lt;br /&gt;
&lt;br /&gt;
== From the groups to the global pool ==&lt;br /&gt;
Within the group, a hump-shaped function will determine the expected number of offspring that an individual contributes to the global pool. In the program, we coded three such functions, called &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt; respectively. The expected number of offspring of individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; with cooperativeness &amp;lt;math&amp;gt;\gamma_i&amp;lt;/math&amp;gt;, in a group with &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; individuals in it and average cooperativeness &amp;lt;math&amp;gt;\overline{\gamma}&amp;lt;/math&amp;gt; is then   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;f_{i}\left(n,\overline{\gamma },\gamma _{i}\right) =e^{r}e^{-cn}n^{\overline{\gamma}}\left(1+\beta\left(\overline{\gamma}-\gamma_{i}\right)\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;g_{i}\left(n,\overline{\gamma },\gamma _{i}\right)=e^{r}e^{-cn}\left( 1+n\overline{\gamma}\right) \left( 1+\beta \left(\overline{\gamma }-\gamma_{i}\right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;h_{i}\left( n,\overline{\gamma },\gamma _{i}\right)=e^{r}e^{-cn}n\overline{\gamma }\left( 1+\beta \left( \overline{\gamma }-\gamma _{i}\right)\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is an intrinsic rate of growth parameter, &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; is a local negative density-dependent parameter inversely proportional to a group carrying capacity, and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; determines the cost of cooperation. The functions &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt; can be seen as special cases of a function &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;e^{r}e^{-cn}\left( \alpha +n\overline{\gamma }\right) \left(1+\beta \left(\overline{\gamma }-\gamma _{i}\right) \right) &amp;lt;/math&amp;gt;, &lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
with &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; determining the relative importance of cooperation. &lt;br /&gt;
&lt;br /&gt;
The default initialization of the population is one where all individuals have grouping tendency ''0'' and cooperative tendency ''0''. For &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt;, not too low choices for &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; can guarantee that the population will not go extinct from that initial population. For &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt;, that will be different; when &amp;lt;math&amp;gt;\gamma = 0&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;g_i(n,\gamma,\gamma_i)&amp;lt;/math&amp;gt; will be &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; too, and the population will go extinct. One can however initialize the population with higher values of grouping and cooperative tendencies, by choosing positive probabilities with which alleles in the initial population will be a &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; instead of a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Global population control: Limited nesting sites, global density dependence and limited total population ==&lt;br /&gt;
&lt;br /&gt;
The ecology can put a limit on the growth of the overall population in different ways. One can assume that there is only a limited number of nesting sites. In Avilés et al. ([http://www.journals.uchicago.edu/doi/abs/10.1086/324792 2002], [http://www.journals.uchicago.edu/doi/abs/10.1086/422263 2004]) this is implemented by choosing a fixed number of sites, and assuming that the flow from the global pool towards the groups stops as soon as the last nesting site has been occupied by one individual. The Limited Nesting Sites version in this program also does exactly that. If the user however unchecks the Limited Season option, then the flow from the population pool does not stop when the last nesting site is occupied, but goes on until the global pool is empty. Because individuals that do not get admitted to any of the groups are discarded, this implies that selective pressure for higher grouping tendencies is increased. The possibility of not being admitted at all therefore heavily distorts the link between grouping tendency and how that brings the expected group size closer to the optimal group size; not getting into a group at all will always be (much) worse than making it into a group that has a suboptimal size. Grouping tendencies and group size will therefore explode.  &lt;br /&gt;
&lt;br /&gt;
One can also assume that the global density negatively affects individual fitnesses. In the Global Density Dependence version of the simulation model, as in Avilés et al. (2002, 2004), the local per capita growth function (in our case: &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt;,&amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt;) is multiplied by a factor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
e^{-w\left( N-n\right) }&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; is a global negative density-dependence parameter, inversely proportional to a global carrying capacity, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the total number of individuals in the global population.&lt;br /&gt;
&lt;br /&gt;
A third option is to assume that every generation, the global pool is reduced to a fixed number of individuals before they leave in order to form groups. This option (Fixed Population Size) is similar to the Limited Nesting Sites; the difference is that with the Limited Nesting Sites, the number of groups is fixed, and the total population size is a random variable, with a very moderate variance, while with a Fixed Population Size, the total population size is fixed, and the number of groups is a random variable, with a very moderate variance. The average group size will be a random variable for both cases, and will be pretty comparable. &lt;br /&gt;
&lt;br /&gt;
The most important distinctive feature of the global density dependence version is that, in combination with particular choices of the parameters, this model can allow for cyclical or chaotic behaviour of the size of the total population. Group sizes will cycle along, and this implies that the optimal grouping and cooperative tendencies become moving targets; if the overall size of the population is large, then low grouping and cooperative tendencies can do relatively well, but the next period the overall population size might already be very small, implying that high grouping and cooperative tendencies do better. &lt;br /&gt;
&lt;br /&gt;
=== Equlibrium values for different models ===&lt;br /&gt;
The figures below compare equilibrium values for a Limited Nesting Sites simulation (''first figure'') and a Global Density Dependence simulation (''second figure''). Equilibrium values are shifted to the right in the Global density dependence as a result of moving optimal targets. For further details see the paper.&lt;br /&gt;
&lt;br /&gt;
[[File:LimitedNestingEquilibriaSociality.png|center|thumb|450px|Limited nesting sites. Function G.]]&lt;br /&gt;
[[File:GlobalDensityEquilibriaSociality.png|center|thumb|450px|Global density dependence.  Function G. R equals 1.]]&lt;/div&gt;</description>
			<pubDate>Fri, 21 Oct 2011 09:25:12 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Sociality</comments>		</item>
		<item>
			<title>Sociality</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Sociality</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Editorial Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:It takes grouping and cooperation to get sociality]]&lt;br /&gt;
The software we provide and describe here reimplements simulations first described in [http://www.pnas.org/content/99/22/14268.abstract Aviles 2002] using Java . Our simulation program also has alternative fitness functions and some additional features. If you have questions or require further information about this work or this tutorial please do email [mailto:garciaATevolbio.mpg.de Julian Garcia], [mailto:c.m.veelenATuva.nl Matthijs van Veelen] or [mailto:lavilesATzoology.ubc.ca Leticia Avilés].&lt;br /&gt;
&lt;br /&gt;
= Editorial Information =&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml van Veelen, Matthijs], [http://staff.feweb.vu.nl/sociality/ García Julián] and [http://www.zoology.ubc.ca/person/laviles Avilés Leticia]. '''It takes grouping and cooperation to get sociality'''.  ''Journal of Theoretical Biology'' 264(4) Pages 1240-1253.  [http://dx.doi.org/10.1016/j.jtbi.2010.02.043 Download the article]&lt;br /&gt;
&lt;br /&gt;
= Abstract =&lt;br /&gt;
Cooperation and grouping are regularly studied as separate traits. The evolution of sociality however requires both that individuals get together in groups and that they cooperate within them. Because the level of cooperation can influence selection for group size, and vice versa, it is worth studying how these traits coevolve. Using a generally applicable two-trait optimization approach, we provide analytical solutions for three specific models. These solutions describe how cooperative associations of nonrelatives evolve, and predict how large and how cooperative they will be. The analytical solutions help understand how changes in parameter values, such as the group carrying capacity and the costs of cooperation, affect group size and the level of cooperation in equilibrium. Although the analytical model makes a few simplifying assumptions - populations are assumed to be monomorphic for grouping as well as for cooperative tendencies, and group size is assumed to be deterministic - simulations show that its predictions are matched quite closely by  results for settings where these assumptions do not hold.&lt;br /&gt;
&lt;br /&gt;
= Run the simulations =&lt;br /&gt;
&lt;br /&gt;
Click on the link corresponding to the model you want to run, and ''choose download and double click, or just open with Java Runtime''. You should set the parameters and press the ''play button'' to start a run. If you want to change the parameters press stop, and then refresh so that new values can be introduced. Feel free to re-arrange the windows or zoom into the graphs. &lt;br /&gt;
&lt;br /&gt;
* [http://staff.feweb.vu.nl/j.garcia/sociality/Limited.jar Start the Limited Nesting Sites model]&lt;br /&gt;
&lt;br /&gt;
* [http://staff.feweb.vu.nl/j.garcia/sociality/Global.jar Start the Global Density Dependence model]&lt;br /&gt;
&lt;br /&gt;
* [http://staff.feweb.vu.nl/j.garcia/sociality/Limited.jar Start the Constant Population Size model]&lt;br /&gt;
&lt;br /&gt;
= The genetic system = &lt;br /&gt;
&lt;br /&gt;
== What individuals are made of ==&lt;br /&gt;
&lt;br /&gt;
Individuals are characterized by a diploid genome coding for two separate traits; grouping and cooperative tendencies. The number of loci for each of these traits can be chosen by the user of the program. The number of loci for grouping will be denoted by n, and the number of loci for cooperation will be denoted by m. We followed [http://www.pnas.org/content/99/22/14268.abstract Avilés et al. (2002)] by choosing 15 as a default value for the number of loci for both traits. The loci of an individual will be numbered from &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;n+m&amp;lt;/math&amp;gt;, where the first n loci code for grouping tendencies and the loci from n+1 to n+m code for cooperative tendencies. The alleles will be indicated as left and right. At each locus, two alleles (1 or 0) can occur. The tendency of individual i to form groups is denoted by gi, and equals the proportion of 1’s in the grouping portion of its genome, or the number of 1’s divided by 2n. The tendency of individual i to cooperate, denoted by Íi, is the proportion of 1’s in the cooperation part of its genome, or the number of 1’s in the second part of its genome, divided by 2m. This implies that gi and Íi vary between 0 and 1, and are multiples of 1 over twice the number of loci.&lt;br /&gt;
&lt;br /&gt;
[[File:GenomeSociality.png|500px|center|thumb|Example genome as represented in the computer]]&lt;br /&gt;
&lt;br /&gt;
The choice for the genome size has an effect on the speed of selection. Reducing the genome size for any one of the tendencies increases the speed of selection for that tendency. This is because the marginal effect of one allele changing from a 0 into a 1 on fitness is larger with a smaller number of loci. The speed of selection of one of the tendencies relative to the other can obviously be tuned by adjusting the one genome size and keeping the other genome size constant.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
| [[File:SlowCooperation.png|400px|center|thumb|Cooperation is slow relative to grouping tendencies]]  ||[[File:FastCooperation.png|390px|center|thumb|Cooperation is fast relative to grouping tendencies]]||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mutations; inversions and translocations first ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the mutation stage (see below for when that is) one Bernouilli trial determines whether or not a mutation occurs in the grouping part of the genome of an individual, and another Bernouilli trial determines whether or not a mutation occurs at the cooperation part. These trials are independently run for every population member again. The probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; with which a mutation occurs is chosen by the user of the program, and &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt; obviously is the probability with which no mutation occurs. If the outcome of the Bernouilli trial is, for instance, that a mutation will occur in the grouping part of the genome, then first a random allele is selected from that part of the genome, with all alleles having equal probability to be chosen. Then the program tries to find an allele that is dissimilar to it (that is: a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; if it is a &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; itself, and a &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; if it is a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; itself) in order to swap places. It starts looking for a dissimilar allele at the same side of the genome. Suppose the randomly determined first allele is the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j \in \{1,...,n\}&amp;lt;/math&amp;gt; The program then starts checking the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j+ 1&amp;lt;/math&amp;gt;. If that is the same as the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;, then it moves on to the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j+2&amp;lt;/math&amp;gt;, and so on, and after locus &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; it continues looking from locus &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; and goes on until locus &amp;lt;math&amp;gt;j-1&amp;lt;/math&amp;gt;. If it has found a first different allele, then the two are interchanged, which is equivalent to inverting the string in between and including them. If it has not found a different allele, then it continues looking for a different allele at the other side; in this case, it starts at the right allele at locus &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;, and then repeats the search for an allele that is different. If the program finds one, the &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; are interchanged, imitating translocation. If the program does not find one here either, then there are either only &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s or only &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s to be found, and then a random allele is chosen to be changed into the other value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This procedure is repeated for all individuals in the pool. Only at the edges, where a substantial share of the individuals will be either all be all &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s or all be all &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s, there will be mutation pressure with a bias against the most common allele, but the priority of inversion and translocation reduces that as much as possible when not almost at the extremes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mating ==&lt;br /&gt;
&lt;br /&gt;
If an individual reproduces, then a random other member of the population is chosen with which it will reproduce. This implies that there is sex, but there are no different sexes. Both individuals then produce a gamete, and these together form the new individual. &lt;br /&gt;
&lt;br /&gt;
== Producing gametes ==&lt;br /&gt;
&lt;br /&gt;
If an individual produces a gamete, then locus 1 of the gamete will with probability one half be a copy of the &amp;lt;math&amp;gt;right&amp;lt;/math&amp;gt; allele at locus one of the individual, and with probability one half it will be a copy of the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus one of the individual. The next locus of the gamete will be a copy from the same side of the genome with probability &amp;lt;math&amp;gt;0.5 + 0.5 P_l&amp;lt;/math&amp;gt;, and with probability &amp;lt;math&amp;gt;0.5 - 0.5 P_l&amp;lt;/math&amp;gt; it will be a copy from the other side of the genome. Here, &amp;lt;math&amp;gt;P_l \in [0,1]&amp;lt;/math&amp;gt; is the linkage level. In the current version of the program, the linkage is set to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Asexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
In the program, the user can also uncheck sexual reproduction. In that case individuals just produce exact copies of themselves. Automatically, the mutation procedure will then also change; it will not consist of inversion and translocation, but only change &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s in &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s and &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s in &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s. If asexual reproduction were to be combined with translocation and inversion first, then once all individuals share the same number of loci for grouping and/or for cooperation, this would remain stable forever, if that number is positive, because translocation and inversion keep the number of &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s and &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s constant.  &lt;br /&gt;
&lt;br /&gt;
== Initial population ==&lt;br /&gt;
&lt;br /&gt;
The default initial population consists of individuals with grouping and cooperative tendency &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;. The user can choose to initialize the population randomly with positive grouping and cooperative tendencies by choosing positive values for parameters &amp;lt;math&amp;gt;ProbabilityActiveLociCooperation&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;ProbabilityActiveLociGroupishness&amp;lt;/math&amp;gt;. Then the initial population is determined by drawing every allele in the genome of every individual randomly, with these probabilities as parameters.&lt;br /&gt;
&lt;br /&gt;
= Lifecycle =&lt;br /&gt;
&lt;br /&gt;
== Global pool and group formation ==&lt;br /&gt;
&lt;br /&gt;
A central and shared feature of all simulation models encompassed in the program is that there are two distinct stages in a life cycle. At one stage, all individuals are gathered together without structure in a global population pool. At the other stage, individuals form groups, in which reproduction takes place. The transition of a population from the global pool to the groups, and the reproduction within the groups before the offspring returns to the global pool is where the simulation program offers different possibilities. Mutation takes place when individuals are in the global pool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:LifecycleSociality.png|600px|thumb|center|Lifecycle]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== From the global pool to the groups ==&lt;br /&gt;
Individuals leave the global pool in random order. When they leave, they go to visit sites, where they either initiate new groups, or join already formed groups. If a site is empty, they ''join'' (initiate a new group) with probability &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;. If a site is not empty, then the program offers two possibilities for the probability with which they join, from which the user can choose. &lt;br /&gt;
&lt;br /&gt;
For the default option, the probability that individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;, that itself has grouping tendency &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt;, will join a group whose average grouping tendency of &amp;lt;math&amp;gt;\bar{g}&amp;lt;/math&amp;gt; is&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;g_i \times \bar{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
The second option for the joining probability is called ''truncated joining'' in the computer program, and it truncates the possible group sizes at &amp;lt;math&amp;gt;n^{*}&amp;lt;/math&amp;gt;, and reduces the probability of joining more for larger groups than for smaller groups. Here the probability of joining a group that consists of n individuals is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;g_i \times \bar{g} \left(1- \frac{n}{n^{*}}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for &amp;lt;math&amp;gt;n &amp;lt; n^{*}&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;n^{*}&amp;lt;/math&amp;gt; is the expected stable group size. The stable group size is the fixed point of the fitness function (see below), assuming that &amp;lt;math&amp;gt;\gamma_i = \bar{\gamma}&amp;lt;/math&amp;gt;. Whenever &amp;lt;math&amp;gt;n\geq n^{*}&amp;lt;/math&amp;gt;, the group acceptance probability is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option matches the model in [http://www.journals.uchicago.edu/doi/abs/10.1086/324792 Avilés et al. (2002)]. Given a distribution of &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt;’s in the population, the distribution of sizes will be somewhat different between the two. Also, if selection would produce the same average group size, the shape of the distribution of group sizes will differ a bit. Running the two options however shows that this does not really make a difference for the group size in the fixed point. Because the computation of &amp;lt;math&amp;gt;n^{*}&amp;lt;/math&amp;gt; requires information that individuals in realistic situations may not have, one can therefore, without changing the model results, resort to the first version that requires less information. The only advantage of the second, truncated version is that it gets to the fixed point faster.&lt;br /&gt;
&lt;br /&gt;
The program allows for three options for the order in which the sites are visited. One option (called ''Random'' in the program) is that every individual visits the sites in random order. Another option (''Forward'') is that everyone starts at site number ''1'', then goes to site number ''2'', then to number ''3'' and so on. The third option (''Backwards'') is that everyone starts trying to be admitted at the non-empty site with the highest number. Say that this is site number ''n''. Then it goes backwards, first to site ''n-1'', then to ''n-2'' and so on, until it is at site number ''1''. If the individual is then still not admitted, it starts a new group at site ''n+1''.&lt;br /&gt;
&lt;br /&gt;
These different orders of visiting will produce different size distributions; with ''Forward'', the variance in sizes will be the largest, with ''Backwards'' it will be the smallest, and with ''Random'' it will be somewhere in between. &lt;br /&gt;
&lt;br /&gt;
How many sites there will be and when the flow from the global population pool to the groups stops, depends on the way in which the size of the global population is balanced; there are three options (limited nesting sites, global density dependence, limited total population) that are discussed below.&lt;br /&gt;
&lt;br /&gt;
== From the groups to the global pool ==&lt;br /&gt;
Within the group, a hump-shaped function will determine the expected number of offspring that an individual contributes to the global pool. In the program, we coded three such functions, called &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt; respectively. The expected number of offspring of individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; with cooperativeness &amp;lt;math&amp;gt;\gamma_i&amp;lt;/math&amp;gt;, in a group with &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; individuals in it and average cooperativeness &amp;lt;math&amp;gt;\overline{\gamma}&amp;lt;/math&amp;gt; is then   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;f_{i}\left(n,\overline{\gamma },\gamma _{i}\right) =e^{r}e^{-cn}n^{\overline{\gamma}}\left(1+\beta\left(\overline{\gamma}-\gamma_{i}\right)\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;g_{i}\left(n,\overline{\gamma },\gamma _{i}\right)=e^{r}e^{-cn}\left( 1+n\overline{\gamma}\right) \left( 1+\beta \left(\overline{\gamma }-\gamma_{i}\right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;h_{i}\left( n,\overline{\gamma },\gamma _{i}\right)=e^{r}e^{-cn}n\overline{\gamma }\left( 1+\beta \left( \overline{\gamma }-\gamma _{i}\right)\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is an intrinsic rate of growth parameter, &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; is a local negative density-dependent parameter inversely proportional to a group carrying capacity, and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; determines the cost of cooperation. The functions &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt; can be seen as special cases of a function &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;e^{r}e^{-cn}\left( \alpha +n\overline{\gamma }\right) \left(1+\beta \left(\overline{\gamma }-\gamma _{i}\right) \right) &amp;lt;/math&amp;gt;, &lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
with &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; determining the relative importance of cooperation. &lt;br /&gt;
&lt;br /&gt;
The default initialization of the population is one where all individuals have grouping tendency ''0'' and cooperative tendency ''0''. For &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt;, not too low choices for &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; can guarantee that the population will not go extinct from that initial population. For &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt;, that will be different; when &amp;lt;math&amp;gt;\gamma = 0&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;g_i(n,\gamma,\gamma_i)&amp;lt;/math&amp;gt; will be &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; too, and the population will go extinct. One can however initialize the population with higher values of grouping and cooperative tendencies, by choosing positive probabilities with which alleles in the initial population will be a &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; instead of a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Global population control: Limited nesting sites, global density dependence and limited total population ==&lt;br /&gt;
&lt;br /&gt;
The ecology can put a limit on the growth of the overall population in different ways. One can assume that there is only a limited number of nesting sites. In Avilés et al. ([http://www.journals.uchicago.edu/doi/abs/10.1086/324792 2002], [http://www.journals.uchicago.edu/doi/abs/10.1086/422263 2004]) this is implemented by choosing a fixed number of sites, and assuming that the flow from the global pool towards the groups stops as soon as the last nesting site has been occupied by one individual. The Limited Nesting Sites version in this program also does exactly that. If the user however unchecks the Limited Season option, then the flow from the population pool does not stop when the last nesting site is occupied, but goes on until the global pool is empty. Because individuals that do not get admitted to any of the groups are discarded, this implies that selective pressure for higher grouping tendencies is increased. The possibility of not being admitted at all therefore heavily distorts the link between grouping tendency and how that brings the expected group size closer to the optimal group size; not getting into a group at all will always be (much) worse than making it into a group that has a suboptimal size. Grouping tendencies and group size will therefore explode.  &lt;br /&gt;
&lt;br /&gt;
One can also assume that the global density negatively affects individual fitnesses. In the Global Density Dependence version of the simulation model, as in Avilés et al. (2002, 2004), the local per capita growth function (in our case: &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt;,&amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt;) is multiplied by a factor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
e^{-w\left( N-n\right) }&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; is a global negative density-dependence parameter, inversely proportional to a global carrying capacity, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the total number of individuals in the global population.&lt;br /&gt;
&lt;br /&gt;
A third option is to assume that every generation, the global pool is reduced to a fixed number of individuals before they leave in order to form groups. This option (Fixed Population Size) is similar to the Limited Nesting Sites; the difference is that with the Limited Nesting Sites, the number of groups is fixed, and the total population size is a random variable, with a very moderate variance, while with a Fixed Population Size, the total population size is fixed, and the number of groups is a random variable, with a very moderate variance. The average group size will be a random variable for both cases, and will be pretty comparable. &lt;br /&gt;
&lt;br /&gt;
The most important distinctive feature of the global density dependence version is that, in combination with particular choices of the parameters, this model can allow for cyclical or chaotic behaviour of the size of the total population. Group sizes will cycle along, and this implies that the optimal grouping and cooperative tendencies become moving targets; if the overall size of the population is large, then low grouping and cooperative tendencies can do relatively well, but the next period the overall population size might already be very small, implying that high grouping and cooperative tendencies do better. &lt;br /&gt;
&lt;br /&gt;
=== Equlibrium values for different models ===&lt;br /&gt;
The figures below compare equilibrium values for a Limited Nesting Sites simulation (''first figure'') and a Global Density Dependence simulation (''second figure''). Equilibrium values are shifted to the right in the Global density dependence as a result of moving optimal targets. For further details see the paper.&lt;br /&gt;
&lt;br /&gt;
[[File:LimitedNestingEquilibriaSociality.png|center|thumb|450px|Limited nesting sites. Function G.]]&lt;br /&gt;
[[File:GlobalDensityEquilibriaSociality.png|center|thumb|450px|Global density dependence.  Function G. R equals 1.]]&lt;/div&gt;</description>
			<pubDate>Fri, 21 Oct 2011 09:19:22 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Sociality</comments>		</item>
		<item>
			<title>Sociality</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Sociality</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Editorial Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:It takes grouping and cooperation to get sociality]]&lt;br /&gt;
The software we provide and describe here reimplements simulations first described in [http://www.pnas.org/content/99/22/14268.abstract Aviles 2002] using Java . Our simulation program also has alternative fitness functions and some additional features. If you have questions or require further information about this work or this tutorial please do email [mailto:garciaATevolbio.mpg.de Julian Garcia], [mailto:c.m.veelenATuva.nl Matthijs van Veelen] or [mailto:lavilesATzoology.ubc.ca Leticia Avilés].&lt;br /&gt;
&lt;br /&gt;
= Editorial Information =&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml van Veelen, Matthijs], [http://staff.feweb.vu.nl/sociality/ García Julián] and [http://www.zoology.ubc.ca/person/laviles Avilés Leticia]. '''It takes grouping and cooperation to get sociality'''.  ''Journal of Theoretical Biology'' 264(4) Pages 1240-1253. &lt;br /&gt;
&lt;br /&gt;
[http://dx.doi.org/10.1016/j.jtbi.2010.02.043 Download the article]&lt;br /&gt;
&lt;br /&gt;
= Abstract =&lt;br /&gt;
Cooperation and grouping are regularly studied as separate traits. The evolution of sociality however requires both that individuals get together in groups and that they cooperate within them. Because the level of cooperation can influence selection for group size, and vice versa, it is worth studying how these traits coevolve. Using a generally applicable two-trait optimization approach, we provide analytical solutions for three specific models. These solutions describe how cooperative associations of nonrelatives evolve, and predict how large and how cooperative they will be. The analytical solutions help understand how changes in parameter values, such as the group carrying capacity and the costs of cooperation, affect group size and the level of cooperation in equilibrium. Although the analytical model makes a few simplifying assumptions - populations are assumed to be monomorphic for grouping as well as for cooperative tendencies, and group size is assumed to be deterministic - simulations show that its predictions are matched quite closely by  results for settings where these assumptions do not hold.&lt;br /&gt;
&lt;br /&gt;
= Run the simulations =&lt;br /&gt;
&lt;br /&gt;
Click on the link corresponding to the model you want to run, and ''choose download and double click, or just open with Java Runtime''. You should set the parameters and press the ''play button'' to start a run. If you want to change the parameters press stop, and then refresh so that new values can be introduced. Feel free to re-arrange the windows or zoom into the graphs. &lt;br /&gt;
&lt;br /&gt;
* [http://staff.feweb.vu.nl/j.garcia/sociality/Limited.jar Start the Limited Nesting Sites model]&lt;br /&gt;
&lt;br /&gt;
* [http://staff.feweb.vu.nl/j.garcia/sociality/Global.jar Start the Global Density Dependence model]&lt;br /&gt;
&lt;br /&gt;
* [http://staff.feweb.vu.nl/j.garcia/sociality/Limited.jar Start the Constant Population Size model]&lt;br /&gt;
&lt;br /&gt;
= The genetic system = &lt;br /&gt;
&lt;br /&gt;
== What individuals are made of ==&lt;br /&gt;
&lt;br /&gt;
Individuals are characterized by a diploid genome coding for two separate traits; grouping and cooperative tendencies. The number of loci for each of these traits can be chosen by the user of the program. The number of loci for grouping will be denoted by n, and the number of loci for cooperation will be denoted by m. We followed [http://www.pnas.org/content/99/22/14268.abstract Avilés et al. (2002)] by choosing 15 as a default value for the number of loci for both traits. The loci of an individual will be numbered from &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;n+m&amp;lt;/math&amp;gt;, where the first n loci code for grouping tendencies and the loci from n+1 to n+m code for cooperative tendencies. The alleles will be indicated as left and right. At each locus, two alleles (1 or 0) can occur. The tendency of individual i to form groups is denoted by gi, and equals the proportion of 1’s in the grouping portion of its genome, or the number of 1’s divided by 2n. The tendency of individual i to cooperate, denoted by Íi, is the proportion of 1’s in the cooperation part of its genome, or the number of 1’s in the second part of its genome, divided by 2m. This implies that gi and Íi vary between 0 and 1, and are multiples of 1 over twice the number of loci.&lt;br /&gt;
&lt;br /&gt;
[[File:GenomeSociality.png|500px|center|thumb|Example genome as represented in the computer]]&lt;br /&gt;
&lt;br /&gt;
The choice for the genome size has an effect on the speed of selection. Reducing the genome size for any one of the tendencies increases the speed of selection for that tendency. This is because the marginal effect of one allele changing from a 0 into a 1 on fitness is larger with a smaller number of loci. The speed of selection of one of the tendencies relative to the other can obviously be tuned by adjusting the one genome size and keeping the other genome size constant.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
| [[File:SlowCooperation.png|400px|center|thumb|Cooperation is slow relative to grouping tendencies]]  ||[[File:FastCooperation.png|390px|center|thumb|Cooperation is fast relative to grouping tendencies]]||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mutations; inversions and translocations first ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the mutation stage (see below for when that is) one Bernouilli trial determines whether or not a mutation occurs in the grouping part of the genome of an individual, and another Bernouilli trial determines whether or not a mutation occurs at the cooperation part. These trials are independently run for every population member again. The probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; with which a mutation occurs is chosen by the user of the program, and &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt; obviously is the probability with which no mutation occurs. If the outcome of the Bernouilli trial is, for instance, that a mutation will occur in the grouping part of the genome, then first a random allele is selected from that part of the genome, with all alleles having equal probability to be chosen. Then the program tries to find an allele that is dissimilar to it (that is: a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; if it is a &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; itself, and a &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; if it is a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; itself) in order to swap places. It starts looking for a dissimilar allele at the same side of the genome. Suppose the randomly determined first allele is the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j \in \{1,...,n\}&amp;lt;/math&amp;gt; The program then starts checking the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j+ 1&amp;lt;/math&amp;gt;. If that is the same as the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;, then it moves on to the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j+2&amp;lt;/math&amp;gt;, and so on, and after locus &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; it continues looking from locus &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; and goes on until locus &amp;lt;math&amp;gt;j-1&amp;lt;/math&amp;gt;. If it has found a first different allele, then the two are interchanged, which is equivalent to inverting the string in between and including them. If it has not found a different allele, then it continues looking for a different allele at the other side; in this case, it starts at the right allele at locus &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;, and then repeats the search for an allele that is different. If the program finds one, the &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; are interchanged, imitating translocation. If the program does not find one here either, then there are either only &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s or only &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s to be found, and then a random allele is chosen to be changed into the other value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This procedure is repeated for all individuals in the pool. Only at the edges, where a substantial share of the individuals will be either all be all &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s or all be all &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s, there will be mutation pressure with a bias against the most common allele, but the priority of inversion and translocation reduces that as much as possible when not almost at the extremes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mating ==&lt;br /&gt;
&lt;br /&gt;
If an individual reproduces, then a random other member of the population is chosen with which it will reproduce. This implies that there is sex, but there are no different sexes. Both individuals then produce a gamete, and these together form the new individual. &lt;br /&gt;
&lt;br /&gt;
== Producing gametes ==&lt;br /&gt;
&lt;br /&gt;
If an individual produces a gamete, then locus 1 of the gamete will with probability one half be a copy of the &amp;lt;math&amp;gt;right&amp;lt;/math&amp;gt; allele at locus one of the individual, and with probability one half it will be a copy of the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus one of the individual. The next locus of the gamete will be a copy from the same side of the genome with probability &amp;lt;math&amp;gt;0.5 + 0.5 P_l&amp;lt;/math&amp;gt;, and with probability &amp;lt;math&amp;gt;0.5 - 0.5 P_l&amp;lt;/math&amp;gt; it will be a copy from the other side of the genome. Here, &amp;lt;math&amp;gt;P_l \in [0,1]&amp;lt;/math&amp;gt; is the linkage level. In the current version of the program, the linkage is set to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Asexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
In the program, the user can also uncheck sexual reproduction. In that case individuals just produce exact copies of themselves. Automatically, the mutation procedure will then also change; it will not consist of inversion and translocation, but only change &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s in &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s and &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s in &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s. If asexual reproduction were to be combined with translocation and inversion first, then once all individuals share the same number of loci for grouping and/or for cooperation, this would remain stable forever, if that number is positive, because translocation and inversion keep the number of &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s and &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s constant.  &lt;br /&gt;
&lt;br /&gt;
== Initial population ==&lt;br /&gt;
&lt;br /&gt;
The default initial population consists of individuals with grouping and cooperative tendency &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;. The user can choose to initialize the population randomly with positive grouping and cooperative tendencies by choosing positive values for parameters &amp;lt;math&amp;gt;ProbabilityActiveLociCooperation&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;ProbabilityActiveLociGroupishness&amp;lt;/math&amp;gt;. Then the initial population is determined by drawing every allele in the genome of every individual randomly, with these probabilities as parameters.&lt;br /&gt;
&lt;br /&gt;
= Lifecycle =&lt;br /&gt;
&lt;br /&gt;
== Global pool and group formation ==&lt;br /&gt;
&lt;br /&gt;
A central and shared feature of all simulation models encompassed in the program is that there are two distinct stages in a life cycle. At one stage, all individuals are gathered together without structure in a global population pool. At the other stage, individuals form groups, in which reproduction takes place. The transition of a population from the global pool to the groups, and the reproduction within the groups before the offspring returns to the global pool is where the simulation program offers different possibilities. Mutation takes place when individuals are in the global pool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:LifecycleSociality.png|600px|thumb|center|Lifecycle]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== From the global pool to the groups ==&lt;br /&gt;
Individuals leave the global pool in random order. When they leave, they go to visit sites, where they either initiate new groups, or join already formed groups. If a site is empty, they ''join'' (initiate a new group) with probability &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;. If a site is not empty, then the program offers two possibilities for the probability with which they join, from which the user can choose. &lt;br /&gt;
&lt;br /&gt;
For the default option, the probability that individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;, that itself has grouping tendency &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt;, will join a group whose average grouping tendency of &amp;lt;math&amp;gt;\bar{g}&amp;lt;/math&amp;gt; is&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;g_i \times \bar{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
The second option for the joining probability is called ''truncated joining'' in the computer program, and it truncates the possible group sizes at &amp;lt;math&amp;gt;n^{*}&amp;lt;/math&amp;gt;, and reduces the probability of joining more for larger groups than for smaller groups. Here the probability of joining a group that consists of n individuals is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;g_i \times \bar{g} \left(1- \frac{n}{n^{*}}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for &amp;lt;math&amp;gt;n &amp;lt; n^{*}&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;n^{*}&amp;lt;/math&amp;gt; is the expected stable group size. The stable group size is the fixed point of the fitness function (see below), assuming that &amp;lt;math&amp;gt;\gamma_i = \bar{\gamma}&amp;lt;/math&amp;gt;. Whenever &amp;lt;math&amp;gt;n\geq n^{*}&amp;lt;/math&amp;gt;, the group acceptance probability is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option matches the model in [http://www.journals.uchicago.edu/doi/abs/10.1086/324792 Avilés et al. (2002)]. Given a distribution of &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt;’s in the population, the distribution of sizes will be somewhat different between the two. Also, if selection would produce the same average group size, the shape of the distribution of group sizes will differ a bit. Running the two options however shows that this does not really make a difference for the group size in the fixed point. Because the computation of &amp;lt;math&amp;gt;n^{*}&amp;lt;/math&amp;gt; requires information that individuals in realistic situations may not have, one can therefore, without changing the model results, resort to the first version that requires less information. The only advantage of the second, truncated version is that it gets to the fixed point faster.&lt;br /&gt;
&lt;br /&gt;
The program allows for three options for the order in which the sites are visited. One option (called ''Random'' in the program) is that every individual visits the sites in random order. Another option (''Forward'') is that everyone starts at site number ''1'', then goes to site number ''2'', then to number ''3'' and so on. The third option (''Backwards'') is that everyone starts trying to be admitted at the non-empty site with the highest number. Say that this is site number ''n''. Then it goes backwards, first to site ''n-1'', then to ''n-2'' and so on, until it is at site number ''1''. If the individual is then still not admitted, it starts a new group at site ''n+1''.&lt;br /&gt;
&lt;br /&gt;
These different orders of visiting will produce different size distributions; with ''Forward'', the variance in sizes will be the largest, with ''Backwards'' it will be the smallest, and with ''Random'' it will be somewhere in between. &lt;br /&gt;
&lt;br /&gt;
How many sites there will be and when the flow from the global population pool to the groups stops, depends on the way in which the size of the global population is balanced; there are three options (limited nesting sites, global density dependence, limited total population) that are discussed below.&lt;br /&gt;
&lt;br /&gt;
== From the groups to the global pool ==&lt;br /&gt;
Within the group, a hump-shaped function will determine the expected number of offspring that an individual contributes to the global pool. In the program, we coded three such functions, called &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt; respectively. The expected number of offspring of individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; with cooperativeness &amp;lt;math&amp;gt;\gamma_i&amp;lt;/math&amp;gt;, in a group with &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; individuals in it and average cooperativeness &amp;lt;math&amp;gt;\overline{\gamma}&amp;lt;/math&amp;gt; is then   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;f_{i}\left(n,\overline{\gamma },\gamma _{i}\right) =e^{r}e^{-cn}n^{\overline{\gamma}}\left(1+\beta\left(\overline{\gamma}-\gamma_{i}\right)\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;g_{i}\left(n,\overline{\gamma },\gamma _{i}\right)=e^{r}e^{-cn}\left( 1+n\overline{\gamma}\right) \left( 1+\beta \left(\overline{\gamma }-\gamma_{i}\right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;h_{i}\left( n,\overline{\gamma },\gamma _{i}\right)=e^{r}e^{-cn}n\overline{\gamma }\left( 1+\beta \left( \overline{\gamma }-\gamma _{i}\right)\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is an intrinsic rate of growth parameter, &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; is a local negative density-dependent parameter inversely proportional to a group carrying capacity, and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; determines the cost of cooperation. The functions &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt; can be seen as special cases of a function &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;e^{r}e^{-cn}\left( \alpha +n\overline{\gamma }\right) \left(1+\beta \left(\overline{\gamma }-\gamma _{i}\right) \right) &amp;lt;/math&amp;gt;, &lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
with &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; determining the relative importance of cooperation. &lt;br /&gt;
&lt;br /&gt;
The default initialization of the population is one where all individuals have grouping tendency ''0'' and cooperative tendency ''0''. For &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt;, not too low choices for &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; can guarantee that the population will not go extinct from that initial population. For &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt;, that will be different; when &amp;lt;math&amp;gt;\gamma = 0&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;g_i(n,\gamma,\gamma_i)&amp;lt;/math&amp;gt; will be &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; too, and the population will go extinct. One can however initialize the population with higher values of grouping and cooperative tendencies, by choosing positive probabilities with which alleles in the initial population will be a &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; instead of a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Global population control: Limited nesting sites, global density dependence and limited total population ==&lt;br /&gt;
&lt;br /&gt;
The ecology can put a limit on the growth of the overall population in different ways. One can assume that there is only a limited number of nesting sites. In Avilés et al. ([http://www.journals.uchicago.edu/doi/abs/10.1086/324792 2002], [http://www.journals.uchicago.edu/doi/abs/10.1086/422263 2004]) this is implemented by choosing a fixed number of sites, and assuming that the flow from the global pool towards the groups stops as soon as the last nesting site has been occupied by one individual. The Limited Nesting Sites version in this program also does exactly that. If the user however unchecks the Limited Season option, then the flow from the population pool does not stop when the last nesting site is occupied, but goes on until the global pool is empty. Because individuals that do not get admitted to any of the groups are discarded, this implies that selective pressure for higher grouping tendencies is increased. The possibility of not being admitted at all therefore heavily distorts the link between grouping tendency and how that brings the expected group size closer to the optimal group size; not getting into a group at all will always be (much) worse than making it into a group that has a suboptimal size. Grouping tendencies and group size will therefore explode.  &lt;br /&gt;
&lt;br /&gt;
One can also assume that the global density negatively affects individual fitnesses. In the Global Density Dependence version of the simulation model, as in Avilés et al. (2002, 2004), the local per capita growth function (in our case: &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt;,&amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt;) is multiplied by a factor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
e^{-w\left( N-n\right) }&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; is a global negative density-dependence parameter, inversely proportional to a global carrying capacity, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the total number of individuals in the global population.&lt;br /&gt;
&lt;br /&gt;
A third option is to assume that every generation, the global pool is reduced to a fixed number of individuals before they leave in order to form groups. This option (Fixed Population Size) is similar to the Limited Nesting Sites; the difference is that with the Limited Nesting Sites, the number of groups is fixed, and the total population size is a random variable, with a very moderate variance, while with a Fixed Population Size, the total population size is fixed, and the number of groups is a random variable, with a very moderate variance. The average group size will be a random variable for both cases, and will be pretty comparable. &lt;br /&gt;
&lt;br /&gt;
The most important distinctive feature of the global density dependence version is that, in combination with particular choices of the parameters, this model can allow for cyclical or chaotic behaviour of the size of the total population. Group sizes will cycle along, and this implies that the optimal grouping and cooperative tendencies become moving targets; if the overall size of the population is large, then low grouping and cooperative tendencies can do relatively well, but the next period the overall population size might already be very small, implying that high grouping and cooperative tendencies do better. &lt;br /&gt;
&lt;br /&gt;
=== Equlibrium values for different models ===&lt;br /&gt;
The figures below compare equilibrium values for a Limited Nesting Sites simulation (''first figure'') and a Global Density Dependence simulation (''second figure''). Equilibrium values are shifted to the right in the Global density dependence as a result of moving optimal targets. For further details see the paper.&lt;br /&gt;
&lt;br /&gt;
[[File:LimitedNestingEquilibriaSociality.png|center|thumb|450px|Limited nesting sites. Function G.]]&lt;br /&gt;
[[File:GlobalDensityEquilibriaSociality.png|center|thumb|450px|Global density dependence.  Function G. R equals 1.]]&lt;/div&gt;</description>
			<pubDate>Fri, 21 Oct 2011 09:19:05 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Sociality</comments>		</item>
		<item>
			<title>Price</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Extra links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Evolution is all about transitions. One generation gives birth to the next, which gives birth to yet another generation, in an endless chain of transitions. These transitions don't just go anywhere; some transitions are more likely than others. First of all we beget offspring that is likely to bear some similarity with ourselves.  And how likely we are to get offspring at all, and how many, tends to depend on certain heritable characteristics. The relative likelihood of some transitions and the relative improbability of others imply that we can make informed guesses as to where this endless chain of transitions came from and where it is going. &lt;br /&gt;
&lt;br /&gt;
The Price equation zooms in on transitions from one generation to the next. This suggests that it could be a fundamental tool for understanding this&lt;br /&gt;
process of evolution. It was formulated by George Richard Price in 1970 [http://www.nature.com/nature/journal/v227/n5257/abs/227520a0.html in an article in Nature], and acclaimed by some, maybe even quite a few, to be a fundamental ingredient for models of evolution ([http://dx.doi.org/10.1016/j.cub.2008.01.005 Gardner], [http://dx.doi.org/10.1006/jtbi.1995.0148 Frank], [http://dx.doi.org/10.1006/jtbi.2002.3015 Grafen]). We think not. The reason why it is hard to identify it as such is that it is all about probability theory and statistics, and those two topics are just not that easy. The following tutorial will help by looking at what proper probability theory or statistics would do and compare that to what the Price equation does to numbers that represent those transitions. There is [http://dx.doi.org/10.1016/j.jtbi.2005.04.026 an article with the same message], but this tutorial makes it simpler, by allowing you to play around with models, data and samples yourself. At some points you may find that the steps the tutorial takes are evident and all too easy, but it is possible that after a few steps, as simple as they are, you may nonetheless feel confused enough to make you want to retrace your steps and be happy, the second time around, that they are that simple. If this is not the case you will just have an easy journey to a deep understanding of why the Price equation is not what some say it is.&lt;br /&gt;
&lt;br /&gt;
==Price 1.0: A very simple model ==&lt;br /&gt;
We will begin with the simplest real model that we can think of. No sex, no shrinking or expanding populations, no frequency dependence, no&lt;br /&gt;
complications whatsoever. Just two individuals that are ready to reproduce. Asexually. This gives us a version of the Price equation that is even&lt;br /&gt;
simpler than the first version by Price himself. And it will give us probability theory and statistics that is relatively nice and easy too, and therefore an excellent start.&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 2.0: A model with sexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
If we add sexual reproduction, everything gets slightly more complicated, the proper statistics as well as the Price equation. This makes&lt;br /&gt;
the statistics much more fun, and it makes the failure of the Price equation to be of any help even more salient. We like to keep it relatively simple though, so for the moment we do not assume actual different sexes, but we do assume that every individual is diploid.&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 3.0: A model with frequency dependence ==&lt;br /&gt;
&lt;br /&gt;
We go back to the asexual model, but now we will take a model with frequency dependence. This will be a bit more complicated, but we can still use a basic, well known model. Individuals are randomly paired to play a game. The game gives them payoffs according to a payoff matrix&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Extra links ==&lt;br /&gt;
* Please check the paper '''Group selection and inclusive fitness are not equivalent; the Price equation vs. models and statistics'''. van Veelen, Garcia, Egas, Sabellis. In press.  It is about the use of the price equation and the theory of inclusive fitness.  [http://www.sciencedirect.com/science/article/pii/S0022519311003754 Link]&lt;br /&gt;
&lt;br /&gt;
* John Maynard Smith [http://www.webofstories.com/play/7297 talks about the Price equation] and how this approach always felt unnatural to him. Since some of us remember a feeling of doubt when first confronted with the Price equation, it may be a relief to hear him say 'I'm not going to tell you what Price's theorem is, because I don't actually understand it'.&lt;/div&gt;</description>
			<pubDate>Thu, 20 Oct 2011 08:30:17 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price</comments>		</item>
		<item>
			<title>Repeated Games</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Repeated_Games</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Measures of cooperativeness and reciprocity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Repeated Games]]&lt;br /&gt;
This project studies the evolution of cooperation in a repeated prisoner's dilemma with discounting.   A version of the paper can be downloaded [http://www.tinbergen.nl/ti-publications/discussion-papers.php?paper=1587 here] The online material that accompanies the paper is [http://staff.feweb.vu.nl/j.garcia/docs/RepeatedGamesOnlineMaterial.pdf here] in PDF format.&lt;br /&gt;
&lt;br /&gt;
= Run the simulations =&lt;br /&gt;
&lt;br /&gt;
You can download the software [http://staff.feweb.vu.nl/j.garcia/software/RepeatedGamesOnline.jar here]. Once the program is running just click on the big ''play'' button to start the fun. Feel free to re-arrange and re-size the windows, zoom-in and out as the program is running. Click [[Repeated Games Simulation | here]] if you need more information about running this program.&lt;br /&gt;
&lt;br /&gt;
= The simulation program =&lt;br /&gt;
&lt;br /&gt;
== What are strategies? ==&lt;br /&gt;
&lt;br /&gt;
Strategies are either programmed explicitly as finite automata, as regular expressions, or as Turing machines. The set of regular expressions is equivalent to the set of finite automata, but because they are represented differently, the likelihoods of mutations also are different; a mutation that is a single step in one representation requires a series of steps in the other and vice versa. &lt;br /&gt;
&lt;br /&gt;
A finite automaton is a list of states, and for every state it prescribes what the automaton plays when in that state, to which state it goes if the opponent plays cooperate, and to which state it goes if the opponent plays defect. &lt;br /&gt;
&lt;br /&gt;
[[File:grimTriggerFSA.png|300px|thumb|center|Example Finite State Automata (Grim Trigger)]]&lt;br /&gt;
&lt;br /&gt;
The computer representation of the automate above is an array with the following values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
'''[C, 0, 1 | D, 1, 1]'''&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each array position represents a state. Every state codes for an action and two indexes, where to go on cooperation, and where to go on defection. The first state (indexed 0) codes the action for the empty game history. &lt;br /&gt;
Go to [[Computer representation of strategies for repeated games]] to see more details  and more ways to represent strategies.&lt;br /&gt;
&lt;br /&gt;
== The simulation ==&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; individuals and every generation they are randomly matched in pairs to play the repeated game. The repeated game has a probability of breakdown smaller than &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;, hence the number of repetitions is a random variable. The payoffs from the interactions are used in the update step. There are two options; the Moran process and the Wright-Fisher process. In the Moran process, in every generation one individual is chosen to be replaced, and one is chosen to replace. All individuals are equally likely to be chosen to be replaced. Probabilities of being chosen to replace are proportional to fitness. In the Wright-Fisher process all individuals in the new generations are drawn one by one, and independently, from a distribution where, again, the probability of being the offspring of individual &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; from the old generation is proportional to the payoff of &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;. The Moran process is extremely inefficient, so we always use the Wright-Fisher process, but the option is there.&lt;br /&gt;
&lt;br /&gt;
After the new generation has been drawn, all individuals have a small and independent probability with which they mutate. There are four types of mutations; mutations that add a state, mutations that delete a state, mutations that change the output when in a state, and mutations that change for a given state to which state this player goes, given an action of the opponent. This completes the cycle for a generation. The cycle is repeated a large number of times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:RepeatedGamesLifecycle.png|650px|center|thumb|Lifecycle]]&lt;br /&gt;
&lt;br /&gt;
= Mutations =&lt;br /&gt;
&lt;br /&gt;
Possible mutations are adding (randomly constructed) states , deleting states (if the array has more than one state), and reassigning destination states at random. On deleting a state the transitions are rewired to the remaining states. The following video shows an example path of mutations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{{#ev:youtube|mPUrB8aFFuI|450}}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Measures of cooperativeness and reciprocity =&lt;br /&gt;
&lt;br /&gt;
(See the formal and longer version of this section[[Measuring Cooperation and Reciprocity | here]])&lt;br /&gt;
&lt;br /&gt;
There are two reasons why we would like to have measures for cooperativeness and reciprocity. The first and most important reason is obvious; we would simply like to know how cooperative, and how reciprocal, strategies are during a run. The second reason is that these measures may serve as an indication of indirect invasions. Typically an indirect invasion is characterized by a change in reciprocity followed by a change in cooperativeness.&lt;br /&gt;
&lt;br /&gt;
Any measure of cooperativeness will have to weigh the different histories, and as we will see, every choice how to weigh them has appealing properties and drawbacks. In contrast to the definitions earlier, here it is more natural to look at histories that only reflect what actions the ''other'' player has played. This captures all relevant histories for the measurement of cooperativeness, because what a strategy &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; itself has played is uniquely determined by the history of actions by the other player. We propose measures of reciprocity and cooperation that are more formally described [[Measuring Cooperation and Reciprocity | here]].&lt;br /&gt;
&lt;br /&gt;
An intuition for what this measure does can be gained from the following figures. The top bar represents the empty history. The second bar represents histories of length &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;, and is split in two; the history where the other has cooperated, and the one where the other has defected. The third bar represents histories of lenth &amp;lt;math&amp;gt;2&amp;lt;/math&amp;gt;, and is split in four; the histories &amp;lt;math&amp;gt;CC&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;CD&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;DC&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;DD&amp;lt;/math&amp;gt;. This continues indefinitely, but for the pictures we restrict ourselves to histories of length &amp;lt;math&amp;gt;5&amp;lt;/math&amp;gt; or less. If a part is blue, then that means that the strategy reacts to this history with cooperation, if it is red, then the strategy reacts with defection. Cooperativeness weighs the blueness of those pictures.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:AlwaysCooperate.png | Always Cooperate&lt;br /&gt;
File:AlwaysCooperateFSA.png&lt;br /&gt;
File:AlwaysDefect.png | Always Defect&lt;br /&gt;
File:AlwaysDefectFSA.png&lt;br /&gt;
File:FirstMove.png | Condition on first move&lt;br /&gt;
File:ConditionOnFirstMoveFSA.png&lt;br /&gt;
File:GrimTrigger.png | Grim Trigger&lt;br /&gt;
File:GrimTriggerFSA.png&lt;br /&gt;
File:NegativeHandshake.png | Negative Handshake (DTFT)&lt;br /&gt;
File:NegativeHandshakeFSA.png&lt;br /&gt;
File:TitForTat.png |Tit for Tat&lt;br /&gt;
File:TitForTatFSA.png&lt;br /&gt;
File:TatForTit.png | Tat for Tit&lt;br /&gt;
File:TatForTitFSA.png&lt;br /&gt;
File:TitForTwoTats.png | Tit for two Tats&lt;br /&gt;
File:TitForTwoTatsFSA.png&lt;br /&gt;
File:Wsls.png | Win stay lose shift&lt;br /&gt;
File:WslsFSA.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A measure for reciprocity can be constructed by comparing how much the cooperativeness of strategy &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is changed if its opponent plays &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; rather than &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;. In the figure above, this is visualized as the difference in blueness below two neighbouring bits that share their history up to the one before last period. &lt;br /&gt;
&lt;br /&gt;
[[Measuring Cooperation and Reciprocity | See in more detail how the measures are defined]].&lt;br /&gt;
&lt;br /&gt;
= Analyzing the simulation output =&lt;br /&gt;
&lt;br /&gt;
Population states are classified by ranking the composing strategies from frequent to infrequent. Then we look at the minimum number of strategies that is needed to capture at least a fixed percentage of the population. As a default, we choose ''90%'' for the threshold. A population state is then characterized by its dimensionality (pure, 2 strategies, 3 strategies, more&lt;br /&gt;
than 3 strategies) and the actual most popular strategy, resp. the 2 most popular and the 3 most popular strategies, as they are ranked. If 3 strategies are not enough to capture this fixed percentage of the population, then we think of the population as being lost in the interior, or in the dark zone. With mutation rates that are not too high, the population hardly ever gets into the dark zone.&lt;br /&gt;
&lt;br /&gt;
The software first reduces a simulation run by registring transitions from area to area, as pictured blow (pictures), and thereby it reduces the simulation run to a sequence of areas in which the population finds itself. At every transition, the software then determines if this is a transition that is advantageous, disadvantageous or neutral. Going from area &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; (where strategy &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; accounts for more than ''90%'' of the population) to &amp;lt;math&amp;gt;AB&amp;lt;/math&amp;gt; (where strategy &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; accounts for less, and &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; together count for more than ''90%'' of the population, and &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is most and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is second most popular) is for instance a neutral transition if &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are neutral mutants, advantageous if &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; dominates &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and disadvantageous if &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; dominates &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If a matrix game with strategies than &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; would result in a coordination game, then this transition is also classified as disadvantageous, as the replicator dynamics would point towards pure &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and not away from it. If this matrix game would only have a mixed equilibrium, then the transition is classified as advantageous, as the replicator dynamics would point away from pure &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;. This more or less ignores that the fraction of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; in the actual equilibrium mixture might be more than ''90%''. &lt;br /&gt;
&lt;br /&gt;
As explained in the paper, this is unavoidable, but if we want data invasions of which we can actually analyse, it is also an argument to choose high thresholds. (High thresholds come with large dark zones, so if we want to avoid the simulation run to (temporarily) get lost in the dark zone, they will have to go together with low mutation probabilities). The harm done is expected to be limited though. The results indicate that if we restrict the game to &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, then all mixed equilibria are prone to fixation out of a mixture anyway, even if the equilibrium mixture is 50-50. Equilibria that are close to the boundary are enormously more prone to a fixation event, because not only are they close to the brorder already, but the dynamics are also weaker, the closer to the equilibrium. Therefore we do not expect that it happens a lot that we classify a population as &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, while it really is spending a considerable amount of time in an equilibrium mixture of more than ''90%'' &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; an less than ''10%'' &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; - and ever less so the higher the threshold.&lt;br /&gt;
&lt;br /&gt;
Within this sequence of areas, we can classify states as...&lt;br /&gt;
&lt;br /&gt;
= The best responder =&lt;br /&gt;
&lt;br /&gt;
In order to be able to determine if a finite automaton - and hence a pure strategy - is a Nash equilibrium, we have constructed a small routine in the program called the best responder. This routine finds the payoff of the best response against strategy &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, as well as a best response. If the payoff of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; against itself equals this payoff, then &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a Nash equilibrium. This is a useful device, since the infinity of the strategy space does not allow us to simply compare the payoff of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; against itself to the payoff of all other strategies against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; one after the other. &lt;br /&gt;
&lt;br /&gt;
Suppose strategy &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is an automaton with &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; states. Any state &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; is characterized by an action played by &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; when it finds itself in this state, and a list of transitions as a function of the action played by the opponent of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;. With a slightly abusive notation - &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a function of histories elsewhere, while here it is easier to make it a function of states - we will write the first as &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S:{ 1,...,K} \rightarrow A&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
and the latter as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;t_{k}:A\rightarrow { 1,...,K}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;k=1,...,K&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The value of being in state &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; is denoted by &amp;lt;math&amp;gt;V(k)&amp;lt;/math&amp;gt;. We aim to find a solution to the following system: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
V(k) = \max_{a \in A}{\pi_{1} (a, S(k))+\delta V(t_{k}(a))} \qquad k=1,...,K&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;V^{\ast}(k) ,k=1,...,K&amp;lt;/math&amp;gt; be the solution to this system. The discounted value in the initial state, &amp;lt;math&amp;gt;(1-\delta) V^{\ast }(1)&amp;lt;/math&amp;gt;, is the maximal discounted payoff to be earned against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;a_{k}^{\ast}=\arg \max_{a\in A}{\pi_{1}(a,S(k)) +\delta V^{\ast }(t_{k}(a))}&amp;lt;/math&amp;gt; gives the optimal action when &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is in state &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The best responder does the following iteration.&lt;br /&gt;
&lt;br /&gt;
Initialisation step:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
V_{1}(k) =0, \qquad k=1,...,K&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Iteration step:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
V_{n+1}(k) =\max_{a \in A}{\pi_{1}(a,S(k)) +\delta V_{n}(t_{k}(a))} \qquad k=1,...,K&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is quite straightforward that this iteration converges, as is shown in the following simple lemma. We will assume that the initialisation makes sure that we begin with values for all states that are below the solution of the system (whenever this procedure is invoked, we make sure that is in fact the case) but that is not actually necessary for convergence. &lt;br /&gt;
&lt;br /&gt;
 '''Lemma'''&lt;br /&gt;
 If &amp;lt;math&amp;gt;V_{1}(k)\leq V^{\ast}(k)&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; and if &amp;lt;math&amp;gt;\delta \in [0,1)&amp;lt;/math&amp;gt; then the above iteration converges to &amp;lt;math&amp;gt;V^{\ast}(k), \qquad k=1,...,K&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''Proof'''&lt;br /&gt;
 First, if &amp;lt;math&amp;gt;V_{n}(k)\leq V^{\ast}(k)&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;, then also &lt;br /&gt;
 &amp;lt;math&amp;gt;V_{n+1}(k) = \max_{a\in A}{\pi_{1}(a,S(k)) +\delta V_{n}(t_{k}(a))}\leq \max_{a \in A}{\pi_{1}(a,S(k))+\delta V^{\ast }(t_{k}(a))} = V^{\ast}(k)&amp;lt;/math&amp;gt; &lt;br /&gt;
 for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;.&lt;br /&gt;
 Hence &amp;lt;math&amp;gt;V^{\ast }(k) -V_{n}(k) \geq 0&amp;lt;/math&amp;gt; for all states  &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; and all iterations &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. By definition we also have&lt;br /&gt;
 &amp;lt;math&amp;gt;V_{n+1}(k) \geq \pi_{1}(a_{k}^{\ast},S(k)) + \delta V_{n}(t_{k}(a_{k}^{\ast }))&amp;lt;/math&amp;gt; &lt;br /&gt;
 for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;&lt;br /&gt;
 Therefore  &lt;br /&gt;
 &amp;lt;math&amp;gt;0\leq V^{\ast}(k)-V_{n+1}(k) \leq \delta (V^{\ast }(t_{k}(a_{k}^{\ast})) -V_{n}(t_{k}(a_{k}^{\ast })))&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;&lt;br /&gt;
 This implies that &lt;br /&gt;
 &amp;lt;math&amp;gt;0\leq \max_{k}(V^{\ast }(k) -V_{n+1}(k)) \leq \delta \max (V^{\ast }(k) -V_{n}(k))&amp;lt;/math&amp;gt;&lt;br /&gt;
 and since &amp;lt;math&amp;gt;\delta&amp;lt;0&amp;lt;/math&amp;gt; we find that &amp;lt;math&amp;gt;\lim_{n\rightarrow \infty }(V^{\ast }(k) -V_{n}(k)) =0&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. QED.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The best responder gives us both the maximum payoff &amp;lt;math&amp;gt;(1-\delta) V^{\ast}(1)&amp;lt;/math&amp;gt; when playing against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, and an optimal strategy  when playing against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, as &amp;lt;math&amp;gt;a_{k}^{\ast }&amp;lt;/math&amp;gt; prescribes what to play when &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is in state &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. For numerical reasons, we actually use the latter. It is important for us to determine whether or not the payoff of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; against itself is exactly equal to the maximum payoff when playing against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;. The iteration with which the best responder finds the latter can have a numerical inaccuracy in it, and the evaluating the payoff of two given strategies against each other (here: &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;) can too. These are however different inaccuracies, so in order to have the ''same'' inaccuracies in both, we use the strategy that the best responder gives, first let it play that against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, then let &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; play against itself, and compare the two payoffs. If they are equal, then &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a best response&lt;br /&gt;
to itself.&lt;br /&gt;
&lt;br /&gt;
Note that the computer program works with phenotypes, not with genotypes, so two different ways to encode for instance the strategy &amp;lt;math&amp;gt;AllD&amp;lt;/math&amp;gt; will be treated as one and the same strategy.&lt;/div&gt;</description>
			<pubDate>Thu, 21 Apr 2011 10:37:39 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Repeated_Games</comments>		</item>
		<item>
			<title>Repeated Games</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Repeated_Games</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* What are strategies? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Repeated Games]]&lt;br /&gt;
This project studies the evolution of cooperation in a repeated prisoner's dilemma with discounting.   A version of the paper can be downloaded [http://www.tinbergen.nl/ti-publications/discussion-papers.php?paper=1587 here] The online material that accompanies the paper is [http://staff.feweb.vu.nl/j.garcia/docs/RepeatedGamesOnlineMaterial.pdf here] in PDF format.&lt;br /&gt;
&lt;br /&gt;
= Run the simulations =&lt;br /&gt;
&lt;br /&gt;
You can download the software [http://staff.feweb.vu.nl/j.garcia/software/RepeatedGamesOnline.jar here]. Once the program is running just click on the big ''play'' button to start the fun. Feel free to re-arrange and re-size the windows, zoom-in and out as the program is running. Click [[Repeated Games Simulation | here]] if you need more information about running this program.&lt;br /&gt;
&lt;br /&gt;
= The simulation program =&lt;br /&gt;
&lt;br /&gt;
== What are strategies? ==&lt;br /&gt;
&lt;br /&gt;
Strategies are either programmed explicitly as finite automata, as regular expressions, or as Turing machines. The set of regular expressions is equivalent to the set of finite automata, but because they are represented differently, the likelihoods of mutations also are different; a mutation that is a single step in one representation requires a series of steps in the other and vice versa. &lt;br /&gt;
&lt;br /&gt;
A finite automaton is a list of states, and for every state it prescribes what the automaton plays when in that state, to which state it goes if the opponent plays cooperate, and to which state it goes if the opponent plays defect. &lt;br /&gt;
&lt;br /&gt;
[[File:grimTriggerFSA.png|300px|thumb|center|Example Finite State Automata (Grim Trigger)]]&lt;br /&gt;
&lt;br /&gt;
The computer representation of the automate above is an array with the following values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
'''[C, 0, 1 | D, 1, 1]'''&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each array position represents a state. Every state codes for an action and two indexes, where to go on cooperation, and where to go on defection. The first state (indexed 0) codes the action for the empty game history. &lt;br /&gt;
Go to [[Computer representation of strategies for repeated games]] to see more details  and more ways to represent strategies.&lt;br /&gt;
&lt;br /&gt;
== The simulation ==&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; individuals and every generation they are randomly matched in pairs to play the repeated game. The repeated game has a probability of breakdown smaller than &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;, hence the number of repetitions is a random variable. The payoffs from the interactions are used in the update step. There are two options; the Moran process and the Wright-Fisher process. In the Moran process, in every generation one individual is chosen to be replaced, and one is chosen to replace. All individuals are equally likely to be chosen to be replaced. Probabilities of being chosen to replace are proportional to fitness. In the Wright-Fisher process all individuals in the new generations are drawn one by one, and independently, from a distribution where, again, the probability of being the offspring of individual &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; from the old generation is proportional to the payoff of &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;. The Moran process is extremely inefficient, so we always use the Wright-Fisher process, but the option is there.&lt;br /&gt;
&lt;br /&gt;
After the new generation has been drawn, all individuals have a small and independent probability with which they mutate. There are four types of mutations; mutations that add a state, mutations that delete a state, mutations that change the output when in a state, and mutations that change for a given state to which state this player goes, given an action of the opponent. This completes the cycle for a generation. The cycle is repeated a large number of times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:RepeatedGamesLifecycle.png|650px|center|thumb|Lifecycle]]&lt;br /&gt;
&lt;br /&gt;
= Measures of cooperativeness and reciprocity =&lt;br /&gt;
&lt;br /&gt;
(See the formal and longer version of this section[[Measuring Cooperation and Reciprocity | here]])&lt;br /&gt;
&lt;br /&gt;
There are two reasons why we would like to have measures for cooperativeness and reciprocity. The first and most important reason is obvious; we would simply like to know how cooperative, and how reciprocal, strategies are during a run. The second reason is that these measures may serve as an indication of indirect invasions. Typically an indirect invasion is characterized by a change in reciprocity followed by a change in cooperativeness.&lt;br /&gt;
&lt;br /&gt;
Any measure of cooperativeness will have to weigh the different histories, and as we will see, every choice how to weigh them has appealing properties and drawbacks. In contrast to the definitions earlier, here it is more natural to look at histories that only reflect what actions the ''other'' player has played. This captures all relevant histories for the measurement of cooperativeness, because what a strategy &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; itself has played is uniquely determined by the history of actions by the other player. We propose measures of reciprocity and cooperation that are more formally described [[Measuring Cooperation and Reciprocity | here]].&lt;br /&gt;
&lt;br /&gt;
An intuition for what this measure does can be gained from the following figures. The top bar represents the empty history. The second bar represents histories of length &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;, and is split in two; the history where the other has cooperated, and the one where the other has defected. The third bar represents histories of lenth &amp;lt;math&amp;gt;2&amp;lt;/math&amp;gt;, and is split in four; the histories &amp;lt;math&amp;gt;CC&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;CD&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;DC&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;DD&amp;lt;/math&amp;gt;. This continues indefinitely, but for the pictures we restrict ourselves to histories of length &amp;lt;math&amp;gt;5&amp;lt;/math&amp;gt; or less. If a part is blue, then that means that the strategy reacts to this history with cooperation, if it is red, then the strategy reacts with defection. Cooperativeness weighs the blueness of those pictures.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:AlwaysCooperate.png | Always Cooperate&lt;br /&gt;
File:AlwaysCooperateFSA.png&lt;br /&gt;
File:AlwaysDefect.png | Always Defect&lt;br /&gt;
File:AlwaysDefectFSA.png&lt;br /&gt;
File:FirstMove.png | Condition on first move&lt;br /&gt;
File:ConditionOnFirstMoveFSA.png&lt;br /&gt;
File:GrimTrigger.png | Grim Trigger&lt;br /&gt;
File:GrimTriggerFSA.png&lt;br /&gt;
File:NegativeHandshake.png | Negative Handshake (DTFT)&lt;br /&gt;
File:NegativeHandshakeFSA.png&lt;br /&gt;
File:TitForTat.png |Tit for Tat&lt;br /&gt;
File:TitForTatFSA.png&lt;br /&gt;
File:TatForTit.png | Tat for Tit&lt;br /&gt;
File:TatForTitFSA.png&lt;br /&gt;
File:TitForTwoTats.png | Tit for two Tats&lt;br /&gt;
File:TitForTwoTatsFSA.png&lt;br /&gt;
File:Wsls.png | Win stay lose shift&lt;br /&gt;
File:WslsFSA.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A measure for reciprocity can be constructed by comparing how much the cooperativeness of strategy &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is changed if its opponent plays &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; rather than &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;. In the figure above, this is visualized as the difference in blueness below two neighbouring bits that share their history up to the one before last period. &lt;br /&gt;
&lt;br /&gt;
[[Measuring Cooperation and Reciprocity | See in more detail how the measures are defined]].&lt;br /&gt;
&lt;br /&gt;
= Analyzing the simulation output =&lt;br /&gt;
&lt;br /&gt;
Population states are classified by ranking the composing strategies from frequent to infrequent. Then we look at the minimum number of strategies that is needed to capture at least a fixed percentage of the population. As a default, we choose ''90%'' for the threshold. A population state is then characterized by its dimensionality (pure, 2 strategies, 3 strategies, more&lt;br /&gt;
than 3 strategies) and the actual most popular strategy, resp. the 2 most popular and the 3 most popular strategies, as they are ranked. If 3 strategies are not enough to capture this fixed percentage of the population, then we think of the population as being lost in the interior, or in the dark zone. With mutation rates that are not too high, the population hardly ever gets into the dark zone.&lt;br /&gt;
&lt;br /&gt;
The software first reduces a simulation run by registring transitions from area to area, as pictured blow (pictures), and thereby it reduces the simulation run to a sequence of areas in which the population finds itself. At every transition, the software then determines if this is a transition that is advantageous, disadvantageous or neutral. Going from area &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; (where strategy &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; accounts for more than ''90%'' of the population) to &amp;lt;math&amp;gt;AB&amp;lt;/math&amp;gt; (where strategy &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; accounts for less, and &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; together count for more than ''90%'' of the population, and &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is most and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is second most popular) is for instance a neutral transition if &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are neutral mutants, advantageous if &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; dominates &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and disadvantageous if &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; dominates &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If a matrix game with strategies than &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; would result in a coordination game, then this transition is also classified as disadvantageous, as the replicator dynamics would point towards pure &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and not away from it. If this matrix game would only have a mixed equilibrium, then the transition is classified as advantageous, as the replicator dynamics would point away from pure &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;. This more or less ignores that the fraction of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; in the actual equilibrium mixture might be more than ''90%''. &lt;br /&gt;
&lt;br /&gt;
As explained in the paper, this is unavoidable, but if we want data invasions of which we can actually analyse, it is also an argument to choose high thresholds. (High thresholds come with large dark zones, so if we want to avoid the simulation run to (temporarily) get lost in the dark zone, they will have to go together with low mutation probabilities). The harm done is expected to be limited though. The results indicate that if we restrict the game to &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, then all mixed equilibria are prone to fixation out of a mixture anyway, even if the equilibrium mixture is 50-50. Equilibria that are close to the boundary are enormously more prone to a fixation event, because not only are they close to the brorder already, but the dynamics are also weaker, the closer to the equilibrium. Therefore we do not expect that it happens a lot that we classify a population as &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, while it really is spending a considerable amount of time in an equilibrium mixture of more than ''90%'' &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; an less than ''10%'' &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; - and ever less so the higher the threshold.&lt;br /&gt;
&lt;br /&gt;
Within this sequence of areas, we can classify states as...&lt;br /&gt;
&lt;br /&gt;
= The best responder =&lt;br /&gt;
&lt;br /&gt;
In order to be able to determine if a finite automaton - and hence a pure strategy - is a Nash equilibrium, we have constructed a small routine in the program called the best responder. This routine finds the payoff of the best response against strategy &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, as well as a best response. If the payoff of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; against itself equals this payoff, then &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a Nash equilibrium. This is a useful device, since the infinity of the strategy space does not allow us to simply compare the payoff of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; against itself to the payoff of all other strategies against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; one after the other. &lt;br /&gt;
&lt;br /&gt;
Suppose strategy &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is an automaton with &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; states. Any state &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; is characterized by an action played by &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; when it finds itself in this state, and a list of transitions as a function of the action played by the opponent of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;. With a slightly abusive notation - &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a function of histories elsewhere, while here it is easier to make it a function of states - we will write the first as &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S:{ 1,...,K} \rightarrow A&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
and the latter as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;t_{k}:A\rightarrow { 1,...,K}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;k=1,...,K&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The value of being in state &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; is denoted by &amp;lt;math&amp;gt;V(k)&amp;lt;/math&amp;gt;. We aim to find a solution to the following system: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
V(k) = \max_{a \in A}{\pi_{1} (a, S(k))+\delta V(t_{k}(a))} \qquad k=1,...,K&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;V^{\ast}(k) ,k=1,...,K&amp;lt;/math&amp;gt; be the solution to this system. The discounted value in the initial state, &amp;lt;math&amp;gt;(1-\delta) V^{\ast }(1)&amp;lt;/math&amp;gt;, is the maximal discounted payoff to be earned against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;a_{k}^{\ast}=\arg \max_{a\in A}{\pi_{1}(a,S(k)) +\delta V^{\ast }(t_{k}(a))}&amp;lt;/math&amp;gt; gives the optimal action when &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is in state &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The best responder does the following iteration.&lt;br /&gt;
&lt;br /&gt;
Initialisation step:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
V_{1}(k) =0, \qquad k=1,...,K&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Iteration step:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
V_{n+1}(k) =\max_{a \in A}{\pi_{1}(a,S(k)) +\delta V_{n}(t_{k}(a))} \qquad k=1,...,K&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is quite straightforward that this iteration converges, as is shown in the following simple lemma. We will assume that the initialisation makes sure that we begin with values for all states that are below the solution of the system (whenever this procedure is invoked, we make sure that is in fact the case) but that is not actually necessary for convergence. &lt;br /&gt;
&lt;br /&gt;
 '''Lemma'''&lt;br /&gt;
 If &amp;lt;math&amp;gt;V_{1}(k)\leq V^{\ast}(k)&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; and if &amp;lt;math&amp;gt;\delta \in [0,1)&amp;lt;/math&amp;gt; then the above iteration converges to &amp;lt;math&amp;gt;V^{\ast}(k), \qquad k=1,...,K&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''Proof'''&lt;br /&gt;
 First, if &amp;lt;math&amp;gt;V_{n}(k)\leq V^{\ast}(k)&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;, then also &lt;br /&gt;
 &amp;lt;math&amp;gt;V_{n+1}(k) = \max_{a\in A}{\pi_{1}(a,S(k)) +\delta V_{n}(t_{k}(a))}\leq \max_{a \in A}{\pi_{1}(a,S(k))+\delta V^{\ast }(t_{k}(a))} = V^{\ast}(k)&amp;lt;/math&amp;gt; &lt;br /&gt;
 for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;.&lt;br /&gt;
 Hence &amp;lt;math&amp;gt;V^{\ast }(k) -V_{n}(k) \geq 0&amp;lt;/math&amp;gt; for all states  &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; and all iterations &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. By definition we also have&lt;br /&gt;
 &amp;lt;math&amp;gt;V_{n+1}(k) \geq \pi_{1}(a_{k}^{\ast},S(k)) + \delta V_{n}(t_{k}(a_{k}^{\ast }))&amp;lt;/math&amp;gt; &lt;br /&gt;
 for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;&lt;br /&gt;
 Therefore  &lt;br /&gt;
 &amp;lt;math&amp;gt;0\leq V^{\ast}(k)-V_{n+1}(k) \leq \delta (V^{\ast }(t_{k}(a_{k}^{\ast})) -V_{n}(t_{k}(a_{k}^{\ast })))&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;&lt;br /&gt;
 This implies that &lt;br /&gt;
 &amp;lt;math&amp;gt;0\leq \max_{k}(V^{\ast }(k) -V_{n+1}(k)) \leq \delta \max (V^{\ast }(k) -V_{n}(k))&amp;lt;/math&amp;gt;&lt;br /&gt;
 and since &amp;lt;math&amp;gt;\delta&amp;lt;0&amp;lt;/math&amp;gt; we find that &amp;lt;math&amp;gt;\lim_{n\rightarrow \infty }(V^{\ast }(k) -V_{n}(k)) =0&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. QED.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The best responder gives us both the maximum payoff &amp;lt;math&amp;gt;(1-\delta) V^{\ast}(1)&amp;lt;/math&amp;gt; when playing against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, and an optimal strategy  when playing against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, as &amp;lt;math&amp;gt;a_{k}^{\ast }&amp;lt;/math&amp;gt; prescribes what to play when &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is in state &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. For numerical reasons, we actually use the latter. It is important for us to determine whether or not the payoff of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; against itself is exactly equal to the maximum payoff when playing against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;. The iteration with which the best responder finds the latter can have a numerical inaccuracy in it, and the evaluating the payoff of two given strategies against each other (here: &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;) can too. These are however different inaccuracies, so in order to have the ''same'' inaccuracies in both, we use the strategy that the best responder gives, first let it play that against &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, then let &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; play against itself, and compare the two payoffs. If they are equal, then &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a best response&lt;br /&gt;
to itself.&lt;br /&gt;
&lt;br /&gt;
Note that the computer program works with phenotypes, not with genotypes, so two different ways to encode for instance the strategy &amp;lt;math&amp;gt;AllD&amp;lt;/math&amp;gt; will be treated as one and the same strategy.&lt;/div&gt;</description>
			<pubDate>Thu, 21 Apr 2011 10:36:39 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Repeated_Games</comments>		</item>
		<item>
			<title>Main Page</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Main_Page</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Evolution and Games'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;color:#000&amp;quot; | [[Image:wikiBar.jpg|center|665px]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
We study the evolution of behavior using mathematical and computational models. You will find here a series of tutorials and software related to papers in this area. Use the '''Navigation''' panel on the left side to make your way on the website. &lt;br /&gt;
&lt;br /&gt;
This wiki is mantained by [http://www.evolbio.mpg.de/~garcia Julian Garcia]  and [http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Available tutorials'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Price|How to quit the Price equation]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Sociality|It takes grouping and cooperation to get sociality]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Parochialism|Evolution of parochial altruism by multilevel selection]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games|In and out of equilibrium: Evolution in repeated games with discounting]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Under construction... '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Construction | Adaptive Dynamics and Population Structure]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games_and_Population_Structure|Repeated games and population structure]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''What do I need in my computer '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Most of the software is written in Java 5.0. See [[How to use the software]] for more details. Some parts of this website also require a working applet plugin in your browser.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Contact and Info'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[http://www.evolbio.mpg.de/~garcia/ Julián García] : garcia at evolbio dot mpg dot de&lt;br /&gt;
&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen] c dot m dot veelen at uva dot nl&lt;br /&gt;
&lt;br /&gt;
This website has been kindly funded by [http://www1.fee.uva.nl/creed/ CREED - University of Amsterdam]&lt;br /&gt;
&lt;br /&gt;
This website was inspired by [http://www.univie.ac.at/virtuallabs/ Virtual Labs] by Christoph Hauert and Karl Sigmund.  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</description>
			<pubDate>Wed, 06 Apr 2011 13:50:39 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Main_Page</comments>		</item>
		<item>
			<title>Repeated Games and Population Structure</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Repeated_Games_and_Population_Structure</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;Replaced content with 'Coming soon.'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Coming soon.&lt;/div&gt;</description>
			<pubDate>Sun, 20 Feb 2011 15:35:46 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Repeated_Games_and_Population_Structure</comments>		</item>
		<item>
			<title>Price</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Evolution is all about transitions. One generation gives birth to the next, which gives birth to yet another generation, in an endless chain of transitions. These transitions don't just go anywhere; some transitions are more likely than others. First of all we beget offspring that is likely to bear some similarity with ourselves.  And how likely we are to get offspring at all, and how many, tends to depend on certain heritable characteristics. The relative likelihood of some transitions and the relative improbability of others imply that we can make informed guesses as to where this endless chain of transitions came from and where it is going. &lt;br /&gt;
&lt;br /&gt;
The Price equation zooms in on transitions from one generation to the next. This suggests that it could be a fundamental tool for understanding this&lt;br /&gt;
process of evolution. It was formulated by George Richard Price in 1970 [http://www.nature.com/nature/journal/v227/n5257/abs/227520a0.html in an article in Nature], and acclaimed by some, maybe even quite a few, to be a fundamental ingredient for models of evolution ([http://dx.doi.org/10.1016/j.cub.2008.01.005 Gardner], [http://dx.doi.org/10.1006/jtbi.1995.0148 Frank], [http://dx.doi.org/10.1006/jtbi.2002.3015 Grafen]). We think not. The reason why it is hard to identify it as such is that it is all about probability theory and statistics, and those two topics are just not that easy. The following tutorial will help by looking at what proper probability theory or statistics would do and compare that to what the Price equation does to numbers that represent those transitions. There is [http://dx.doi.org/10.1016/j.jtbi.2005.04.026 an article with the same message], but this tutorial makes it simpler, by allowing you to play around with models, data and samples yourself. At some points you may find that the steps the tutorial takes are evident and all too easy, but it is possible that after a few steps, as simple as they are, you may nonetheless feel confused enough to make you want to retrace your steps and be happy, the second time around, that they are that simple. If this is not the case you will just have an easy journey to a deep understanding of why the Price equation is not what some say it is.&lt;br /&gt;
&lt;br /&gt;
==Price 1.0: A very simple model ==&lt;br /&gt;
We will begin with the simplest real model that we can think of. No sex, no shrinking or expanding populations, no frequency dependence, no&lt;br /&gt;
complications whatsoever. Just two individuals that are ready to reproduce. Asexually. This gives us a version of the Price equation that is even&lt;br /&gt;
simpler than the first version by Price himself. And it will give us probability theory and statistics that is relatively nice and easy too, and therefore an excellent start.&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 2.0: A model with sexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
If we add sexual reproduction, everything gets slightly more complicated, the proper statistics as well as the Price equation. This makes&lt;br /&gt;
the statistics much more fun, and it makes the failure of the Price equation to be of any help even more salient. We like to keep it relatively simple though, so for the moment we do not assume actual different sexes, but we do assume that every individual is diploid.&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 3.0: A model with frequency dependence ==&lt;br /&gt;
&lt;br /&gt;
We go back to the asexual model, but now we will take a model with frequency dependence. This will be a bit more complicated, but we can still use a basic, well known model. Individuals are randomly paired to play a game. The game gives them payoffs according to a payoff matrix&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Extra links ==&lt;br /&gt;
&lt;br /&gt;
* John Maynard Smith [http://www.webofstories.com/play/7297 talks about the Price equation] and how this approach always felt unnatural to him. Since some of us remember a feeling of doubt when first confronted with the Price equation, it may be a relief to hear him say 'I'm not going to tell you what Price's theorem is, because I don't actually understand it'.&lt;/div&gt;</description>
			<pubDate>Sat, 09 Oct 2010 11:07:48 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price</comments>		</item>
		<item>
			<title>Main Page</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Main_Page</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Evolution and Games'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;color:#000&amp;quot; | [[Image:wikiBar.jpg|center|665px]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
We study the evolution of behavior using mathematical and computational models. You will find here a series of tutorials and software related to papers in this area. Use the '''Navigation''' panel on the left side to make your way on the website. &lt;br /&gt;
&lt;br /&gt;
This wiki is mantained by [http://www.evolbio.mpg.de/~garcia Julian Garcia]  and [http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Available tutorials'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Price|How to quit the Price equation]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Sociality|It takes grouping and cooperation to get sociality]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Parochialism|Evolution of parochial altruism by multilevel selection]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games_and_Population_Structure|Repeated games and population structure]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games|In and out of equilibrium: Evolution in repeated games with discounting]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Under construction... '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Construction | Adaptive Dynamics and Population Structure]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''What do I need in my computer '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Most of the software is written in Java 5.0. See [[How to use the software]] for more details. Some parts of this website also require a working applet plugin in your browser.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Contact and Info'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[http://www.evolbio.mpg.de/~garcia/ Julián García] : garcia at evolbio dot mpg dot de&lt;br /&gt;
&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen] c dot m dot veelen at uva dot nl&lt;br /&gt;
&lt;br /&gt;
This website has been kindly funded by [http://www1.fee.uva.nl/creed/ CREED - University of Amsterdam]&lt;br /&gt;
&lt;br /&gt;
This website was inspired by [http://www.univie.ac.at/virtuallabs/ Virtual Labs] by Christoph Hauert and Karl Sigmund.  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</description>
			<pubDate>Sat, 09 Oct 2010 11:05:28 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Main_Page</comments>		</item>
		<item>
			<title>Price</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Extra links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Evolution is all about transitions. One generation gives birth to the next, which gives birth to yet another generation, in an endless chain of transitions. These transitions don't just go anywhere; some transitions are more likely than others. First of all we beget offspring that is likely to bear some similarity with ourselves.  And how likely we are to get offspring at all, and how many, tends to depend on certain heritable characteristics. The relative likelihood of some transitions and the relative improbability of others imply that we can make informed guesses as to where this endless chain of transitions came from and where it is going. &lt;br /&gt;
&lt;br /&gt;
The Price equation zooms in on transitions from one generation to the next. This suggests that it could be a fundamental tool for understanding this&lt;br /&gt;
process of evolution. It was formulated by George Richard Price in 1970 [http://www.nature.com/nature/journal/v227/n5257/abs/227520a0.html in an article in Nature], and acclaimed by some, maybe even quite a few, to be a fundamental ingredient for models of evolution ([http://dx.doi.org/10.1016/j.cub.2008.01.005 Gardner], [http://dx.doi.org/10.1006/jtbi.1995.0148 Frank], [http://dx.doi.org/10.1006/jtbi.2002.3015 Grafen]). We think not. The reason why it is hard to identify it as such is that it is all about probability theory and statistics, and those two topics are just not that easy. The following tutorial will help by looking at what proper probability theory or statistics would do and compare that to what the Price equation does to numbers that represent those transitions. There is [http://dx.doi.org/10.1016/j.jtbi.2005.04.026 an article with the same message], but this tutorial makes it simpler, by allowing you to play around with models, data and samples yourself. At some points you may find that the steps the tutorial takes are evident and all too easy, but it is possible that after a few steps, as simple as they are, you may nonetheless feel confused enough to make you want to retrace your steps and be happy, the second time around, that they are that simple. Or not, in which case you will just have an easy journey to a deep understanding why the Price equation is not what some say it is.&lt;br /&gt;
&lt;br /&gt;
==Price 1.0: A very simple model ==&lt;br /&gt;
We will begin with the simplest real model that we can think of. No sex, no shrinking or expanding populations, no frequency dependence, no&lt;br /&gt;
complications whatsoever. Just two individuals that are ready to reproduce. Asexually. This gives us a version of the Price equation that is even&lt;br /&gt;
simpler than the first version by Price himself. And it will give us probability theory and statistics that is relatively nice and easy too, and therefore an excellent start that helps us get acquainted to the joys of rigour and precision.&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 2.0: A model with sexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
If we add sexual reproduction, everything gets slightly more complicated, the proper statistics as well as the Price equation. This makes&lt;br /&gt;
the statistics much more fun, and it makes the failure of the Price equation to be of any help even more salient. We like to keep it relatively simple though, so for the moment we do not assume actual different sexes, but we do assume that every individual is diploid.&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 3.0: A model with frequency dependence ==&lt;br /&gt;
&lt;br /&gt;
We go back to the asexual model, but now we will take a model with frequency dependence. This will be a bit more complicated, but we can still use a basic, well known model. They are paired randomly, and play a game in those pairs. The game gives them payoffs according to a payoff matrix&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Extra links ==&lt;br /&gt;
&lt;br /&gt;
* John Maynard Smith [http://www.webofstories.com/play/7297 talks about the Price equation] and how this approach always felt unnatural to him. Since some of us remember a feeling of doubt when first confronted with the Price equation, it may be a relief to hear him say 'I'm not going to tell you what Price's theorem is, because I don't actually understand it'.&lt;/div&gt;</description>
			<pubDate>Mon, 04 Oct 2010 19:44:55 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price</comments>		</item>
		<item>
			<title>Sociality</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Sociality</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:It takes grouping and cooperation to get sociality]]&lt;br /&gt;
The software we provide and describe here reimplements simulations first described in [http://www.pnas.org/content/99/22/14268.abstract Aviles 2002] using Java . Our simulation program also has alternative fitness functions and some additional features. If you have questions or require further information about this work or this tutorial please do email [mailto:garciaATevolbio.mpg.de Julian Garcia], [mailto:c.m.veelenATuva.nl Matthijs van Veelen] or [mailto:lavilesATzoology.ubc.ca Leticia Avilés].&lt;br /&gt;
&lt;br /&gt;
= Editorial Information =&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml van Veelen, Matthijs], [http://staff.feweb.vu.nl/sociality/ García Julián] and [http://www.zoology.ubc.ca/person/laviles Avilés Leticia] (in Press). '''It takes grouping and cooperation to get sociality'''.  ''Journal of Theoretical Biology''. &lt;br /&gt;
&lt;br /&gt;
[http://dx.doi.org/10.1016/j.jtbi.2010.02.043 Download the article]&lt;br /&gt;
&lt;br /&gt;
= Abstract =&lt;br /&gt;
Cooperation and grouping are regularly studied as separate traits. The evolution of sociality however requires both that individuals get together in groups and that they cooperate within them. Because the level of cooperation can influence selection for group size, and vice versa, it is worth studying how these traits coevolve. Using a generally applicable two-trait optimization approach, we provide analytical solutions for three specific models. These solutions describe how cooperative associations of nonrelatives evolve, and predict how large and how cooperative they will be. The analytical solutions help understand how changes in parameter values, such as the group carrying capacity and the costs of cooperation, affect group size and the level of cooperation in equilibrium. Although the analytical model makes a few simplifying assumptions - populations are assumed to be monomorphic for grouping as well as for cooperative tendencies, and group size is assumed to be deterministic - simulations show that its predictions are matched quite closely by  results for settings where these assumptions do not hold.&lt;br /&gt;
&lt;br /&gt;
= Run the simulations =&lt;br /&gt;
&lt;br /&gt;
Click on the link corresponding to the model you want to run, and ''choose download and double click, or just open with Java Runtime''. You should set the parameters and press the ''play button'' to start a run. If you want to change the parameters press stop, and then refresh so that new values can be introduced. Feel free to re-arrange the windows or zoom into the graphs. &lt;br /&gt;
&lt;br /&gt;
* [http://staff.feweb.vu.nl/j.garcia/sociality/Limited.jar Start the Limited Nesting Sites model]&lt;br /&gt;
&lt;br /&gt;
* [http://staff.feweb.vu.nl/j.garcia/sociality/Global.jar Start the Global Density Dependence model]&lt;br /&gt;
&lt;br /&gt;
* [http://staff.feweb.vu.nl/j.garcia/sociality/Limited.jar Start the Constant Population Size model]&lt;br /&gt;
&lt;br /&gt;
= The genetic system = &lt;br /&gt;
&lt;br /&gt;
== What individuals are made of ==&lt;br /&gt;
&lt;br /&gt;
Individuals are characterized by a diploid genome coding for two separate traits; grouping and cooperative tendencies. The number of loci for each of these traits can be chosen by the user of the program. The number of loci for grouping will be denoted by n, and the number of loci for cooperation will be denoted by m. We followed [http://www.pnas.org/content/99/22/14268.abstract Avilés et al. (2002)] by choosing 15 as a default value for the number of loci for both traits. The loci of an individual will be numbered from &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;n+m&amp;lt;/math&amp;gt;, where the first n loci code for grouping tendencies and the loci from n+1 to n+m code for cooperative tendencies. The alleles will be indicated as left and right. At each locus, two alleles (1 or 0) can occur. The tendency of individual i to form groups is denoted by gi, and equals the proportion of 1’s in the grouping portion of its genome, or the number of 1’s divided by 2n. The tendency of individual i to cooperate, denoted by Íi, is the proportion of 1’s in the cooperation part of its genome, or the number of 1’s in the second part of its genome, divided by 2m. This implies that gi and Íi vary between 0 and 1, and are multiples of 1 over twice the number of loci.&lt;br /&gt;
&lt;br /&gt;
[[File:GenomeSociality.png|500px|center|thumb|Example genome as represented in the computer]]&lt;br /&gt;
&lt;br /&gt;
The choice for the genome size has an effect on the speed of selection. Reducing the genome size for any one of the tendencies increases the speed of selection for that tendency. This is because the marginal effect of one allele changing from a 0 into a 1 on fitness is larger with a smaller number of loci. The speed of selection of one of the tendencies relative to the other can obviously be tuned by adjusting the one genome size and keeping the other genome size constant.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
| [[File:SlowCooperation.png|400px|center|thumb|Cooperation is slow relative to grouping tendencies]]  ||[[File:FastCooperation.png|390px|center|thumb|Cooperation is fast relative to grouping tendencies]]||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mutations; inversions and translocations first ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the mutation stage (see below for when that is) one Bernouilli trial determines whether or not a mutation occurs in the grouping part of the genome of an individual, and another Bernouilli trial determines whether or not a mutation occurs at the cooperation part. These trials are independently run for every population member again. The probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; with which a mutation occurs is chosen by the user of the program, and &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt; obviously is the probability with which no mutation occurs. If the outcome of the Bernouilli trial is, for instance, that a mutation will occur in the grouping part of the genome, then first a random allele is selected from that part of the genome, with all alleles having equal probability to be chosen. Then the program tries to find an allele that is dissimilar to it (that is: a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; if it is a &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; itself, and a &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; if it is a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; itself) in order to swap places. It starts looking for a dissimilar allele at the same side of the genome. Suppose the randomly determined first allele is the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j \in \{1,...,n\}&amp;lt;/math&amp;gt; The program then starts checking the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j+ 1&amp;lt;/math&amp;gt;. If that is the same as the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;, then it moves on to the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus &amp;lt;math&amp;gt;j+2&amp;lt;/math&amp;gt;, and so on, and after locus &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; it continues looking from locus &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; and goes on until locus &amp;lt;math&amp;gt;j-1&amp;lt;/math&amp;gt;. If it has found a first different allele, then the two are interchanged, which is equivalent to inverting the string in between and including them. If it has not found a different allele, then it continues looking for a different allele at the other side; in this case, it starts at the right allele at locus &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;, and then repeats the search for an allele that is different. If the program finds one, the &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; are interchanged, imitating translocation. If the program does not find one here either, then there are either only &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s or only &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s to be found, and then a random allele is chosen to be changed into the other value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This procedure is repeated for all individuals in the pool. Only at the edges, where a substantial share of the individuals will be either all be all &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s or all be all &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s, there will be mutation pressure with a bias against the most common allele, but the priority of inversion and translocation reduces that as much as possible when not almost at the extremes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mating ==&lt;br /&gt;
&lt;br /&gt;
If an individual reproduces, then a random other member of the population is chosen with which it will reproduce. This implies that there is sex, but there are no different sexes. Both individuals then produce a gamete, and these together form the new individual. &lt;br /&gt;
&lt;br /&gt;
== Producing gametes ==&lt;br /&gt;
&lt;br /&gt;
If an individual produces a gamete, then locus 1 of the gamete will with probability one half be a copy of the &amp;lt;math&amp;gt;right&amp;lt;/math&amp;gt; allele at locus one of the individual, and with probability one half it will be a copy of the &amp;lt;math&amp;gt;left&amp;lt;/math&amp;gt; allele at locus one of the individual. The next locus of the gamete will be a copy from the same side of the genome with probability &amp;lt;math&amp;gt;0.5 + 0.5 P_l&amp;lt;/math&amp;gt;, and with probability &amp;lt;math&amp;gt;0.5 - 0.5 P_l&amp;lt;/math&amp;gt; it will be a copy from the other side of the genome. Here, &amp;lt;math&amp;gt;P_l \in [0,1]&amp;lt;/math&amp;gt; is the linkage level. In the current version of the program, the linkage is set to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Asexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
In the program, the user can also uncheck sexual reproduction. In that case individuals just produce exact copies of themselves. Automatically, the mutation procedure will then also change; it will not consist of inversion and translocation, but only change &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s in &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s and &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s in &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s. If asexual reproduction were to be combined with translocation and inversion first, then once all individuals share the same number of loci for grouping and/or for cooperation, this would remain stable forever, if that number is positive, because translocation and inversion keep the number of &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;’s and &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;’s constant.  &lt;br /&gt;
&lt;br /&gt;
== Initial population ==&lt;br /&gt;
&lt;br /&gt;
The default initial population consists of individuals with grouping and cooperative tendency &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;. The user can choose to initialize the population randomly with positive grouping and cooperative tendencies by choosing positive values for parameters &amp;lt;math&amp;gt;ProbabilityActiveLociCooperation&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;ProbabilityActiveLociGroupishness&amp;lt;/math&amp;gt;. Then the initial population is determined by drawing every allele in the genome of every individual randomly, with these probabilities as parameters.&lt;br /&gt;
&lt;br /&gt;
= Lifecycle =&lt;br /&gt;
&lt;br /&gt;
== Global pool and group formation ==&lt;br /&gt;
&lt;br /&gt;
A central and shared feature of all simulation models encompassed in the program is that there are two distinct stages in a life cycle. At one stage, all individuals are gathered together without structure in a global population pool. At the other stage, individuals form groups, in which reproduction takes place. The transition of a population from the global pool to the groups, and the reproduction within the groups before the offspring returns to the global pool is where the simulation program offers different possibilities. Mutation takes place when individuals are in the global pool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:LifecycleSociality.png|600px|thumb|center|Lifecycle]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== From the global pool to the groups ==&lt;br /&gt;
Individuals leave the global pool in random order. When they leave, they go to visit sites, where they either initiate new groups, or join already formed groups. If a site is empty, they ''join'' (initiate a new group) with probability &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;. If a site is not empty, then the program offers two possibilities for the probability with which they join, from which the user can choose. &lt;br /&gt;
&lt;br /&gt;
For the default option, the probability that individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;, that itself has grouping tendency &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt;, will join a group whose average grouping tendency of &amp;lt;math&amp;gt;\bar{g}&amp;lt;/math&amp;gt; is&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;g_i \times \bar{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
The second option for the joining probability is called ''truncated joining'' in the computer program, and it truncates the possible group sizes at &amp;lt;math&amp;gt;n^{*}&amp;lt;/math&amp;gt;, and reduces the probability of joining more for larger groups than for smaller groups. Here the probability of joining a group that consists of n individuals is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;g_i \times \bar{g} \left(1- \frac{n}{n^{*}}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for &amp;lt;math&amp;gt;n &amp;lt; n^{*}&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;n^{*}&amp;lt;/math&amp;gt; is the expected stable group size. The stable group size is the fixed point of the fitness function (see below), assuming that &amp;lt;math&amp;gt;\gamma_i = \bar{\gamma}&amp;lt;/math&amp;gt;. Whenever &amp;lt;math&amp;gt;n\geq n^{*}&amp;lt;/math&amp;gt;, the group acceptance probability is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option matches the model in [http://www.journals.uchicago.edu/doi/abs/10.1086/324792 Avilés et al. (2002)]. Given a distribution of &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt;’s in the population, the distribution of sizes will be somewhat different between the two. Also, if selection would produce the same average group size, the shape of the distribution of group sizes will differ a bit. Running the two options however shows that this does not really make a difference for the group size in the fixed point. Because the computation of &amp;lt;math&amp;gt;n^{*}&amp;lt;/math&amp;gt; requires information that individuals in realistic situations may not have, one can therefore, without changing the model results, resort to the first version that requires less information. The only advantage of the second, truncated version is that it gets to the fixed point faster.&lt;br /&gt;
&lt;br /&gt;
The program allows for three options for the order in which the sites are visited. One option (called ''Random'' in the program) is that every individual visits the sites in random order. Another option (''Forward'') is that everyone starts at site number ''1'', then goes to site number ''2'', then to number ''3'' and so on. The third option (''Backwards'') is that everyone starts trying to be admitted at the non-empty site with the highest number. Say that this is site number ''n''. Then it goes backwards, first to site ''n-1'', then to ''n-2'' and so on, until it is at site number ''1''. If the individual is then still not admitted, it starts a new group at site ''n+1''.&lt;br /&gt;
&lt;br /&gt;
These different orders of visiting will produce different size distributions; with ''Forward'', the variance in sizes will be the largest, with ''Backwards'' it will be the smallest, and with ''Random'' it will be somewhere in between. &lt;br /&gt;
&lt;br /&gt;
How many sites there will be and when the flow from the global population pool to the groups stops, depends on the way in which the size of the global population is balanced; there are three options (limited nesting sites, global density dependence, limited total population) that are discussed below.&lt;br /&gt;
&lt;br /&gt;
== From the groups to the global pool ==&lt;br /&gt;
Within the group, a hump-shaped function will determine the expected number of offspring that an individual contributes to the global pool. In the program, we coded three such functions, called &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt; respectively. The expected number of offspring of individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; with cooperativeness &amp;lt;math&amp;gt;\gamma_i&amp;lt;/math&amp;gt;, in a group with &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; individuals in it and average cooperativeness &amp;lt;math&amp;gt;\overline{\gamma}&amp;lt;/math&amp;gt; is then   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;f_{i}\left(n,\overline{\gamma },\gamma _{i}\right) =e^{r}e^{-cn}n^{\overline{\gamma}}\left(1+\beta\left(\overline{\gamma}-\gamma_{i}\right)\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;g_{i}\left(n,\overline{\gamma },\gamma _{i}\right)=e^{r}e^{-cn}\left( 1+n\overline{\gamma}\right) \left( 1+\beta \left(\overline{\gamma }-\gamma_{i}\right) \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;h_{i}\left( n,\overline{\gamma },\gamma _{i}\right)=e^{r}e^{-cn}n\overline{\gamma }\left( 1+\beta \left( \overline{\gamma }-\gamma _{i}\right)\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is an intrinsic rate of growth parameter, &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; is a local negative density-dependent parameter inversely proportional to a group carrying capacity, and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; determines the cost of cooperation. The functions &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt; can be seen as special cases of a function &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;e^{r}e^{-cn}\left( \alpha +n\overline{\gamma }\right) \left(1+\beta \left(\overline{\gamma }-\gamma _{i}\right) \right) &amp;lt;/math&amp;gt;, &lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
with &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; determining the relative importance of cooperation. &lt;br /&gt;
&lt;br /&gt;
The default initialization of the population is one where all individuals have grouping tendency ''0'' and cooperative tendency ''0''. For &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt;, not too low choices for &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; can guarantee that the population will not go extinct from that initial population. For &amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt;, that will be different; when &amp;lt;math&amp;gt;\gamma = 0&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;g_i(n,\gamma,\gamma_i)&amp;lt;/math&amp;gt; will be &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; too, and the population will go extinct. One can however initialize the population with higher values of grouping and cooperative tendencies, by choosing positive probabilities with which alleles in the initial population will be a &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; instead of a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Global population control: Limited nesting sites, global density dependence and limited total population ==&lt;br /&gt;
&lt;br /&gt;
The ecology can put a limit on the growth of the overall population in different ways. One can assume that there is only a limited number of nesting sites. In Avilés et al. ([http://www.journals.uchicago.edu/doi/abs/10.1086/324792 2002], [http://www.journals.uchicago.edu/doi/abs/10.1086/422263 2004]) this is implemented by choosing a fixed number of sites, and assuming that the flow from the global pool towards the groups stops as soon as the last nesting site has been occupied by one individual. The Limited Nesting Sites version in this program also does exactly that. If the user however unchecks the Limited Season option, then the flow from the population pool does not stop when the last nesting site is occupied, but goes on until the global pool is empty. Because individuals that do not get admitted to any of the groups are discarded, this implies that selective pressure for higher grouping tendencies is increased. The possibility of not being admitted at all therefore heavily distorts the link between grouping tendency and how that brings the expected group size closer to the optimal group size; not getting into a group at all will always be (much) worse than making it into a group that has a suboptimal size. Grouping tendencies and group size will therefore explode.  &lt;br /&gt;
&lt;br /&gt;
One can also assume that the global density negatively affects individual fitnesses. In the Global Density Dependence version of the simulation model, as in Avilés et al. (2002, 2004), the local per capita growth function (in our case: &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt;,&amp;lt;math&amp;gt;g_i&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;h_i&amp;lt;/math&amp;gt;) is multiplied by a factor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
e^{-w\left( N-n\right) }&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; is a global negative density-dependence parameter, inversely proportional to a global carrying capacity, and &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the total number of individuals in the global population.&lt;br /&gt;
&lt;br /&gt;
A third option is to assume that every generation, the global pool is reduced to a fixed number of individuals before they leave in order to form groups. This option (Fixed Population Size) is similar to the Limited Nesting Sites; the difference is that with the Limited Nesting Sites, the number of groups is fixed, and the total population size is a random variable, with a very moderate variance, while with a Fixed Population Size, the total population size is fixed, and the number of groups is a random variable, with a very moderate variance. The average group size will be a random variable for both cases, and will be pretty comparable. &lt;br /&gt;
&lt;br /&gt;
The most important distinctive feature of the global density dependence version is that, in combination with particular choices of the parameters, this model can allow for cyclical or chaotic behaviour of the size of the total population. Group sizes will cycle along, and this implies that the optimal grouping and cooperative tendencies become moving targets; if the overall size of the population is large, then low grouping and cooperative tendencies can do relatively well, but the next period the overall population size might already be very small, implying that high grouping and cooperative tendencies do better. &lt;br /&gt;
&lt;br /&gt;
=== Equlibrium values for different models ===&lt;br /&gt;
The figures below compare equilibrium values for a Limited Nesting Sites simulation (''first figure'') and a Global Density Dependence simulation (''second figure''). Equilibrium values are shifted to the right in the Global density dependence as a result of moving optimal targets. For further details see the paper.&lt;br /&gt;
&lt;br /&gt;
[[File:LimitedNestingEquilibriaSociality.png|center|thumb|450px|Limited nesting sites. Function G.]]&lt;br /&gt;
[[File:GlobalDensityEquilibriaSociality.png|center|thumb|450px|Global density dependence.  Function G. R equals 1.]]&lt;/div&gt;</description>
			<pubDate>Mon, 04 Oct 2010 17:16:33 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Sociality</comments>		</item>
		<item>
			<title>Main Page</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Main_Page</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Evolution and Games'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;color:#000&amp;quot; | [[Image:wikiBar.jpg|center|665px]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
We study the evolution of behavior using mathematical and computational models. You will find here a series of tutorials and software related to papers in this area. Use the '''Navigation''' panel on the left side to make your way on the website. &lt;br /&gt;
&lt;br /&gt;
This wiki is mantained by [http://www.evolbio.mpg.de/~garcia Julian Garcia]  and [http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Available tutorials'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Price|How to quit the Price equation]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Sociality|It takes grouping and cooperation to get sociality]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Parochialism|Evolution of parochial altruism by multilevel selection]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games_and_Population_Structure|Repeated games and population structure]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games|In and out of equilibrium: Evolution in repeated games with discounting ]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Under construction... '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Construction | Adaptive Dynamics and Population Structure]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''What do I need in my computer '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Most of the software is written in Java 5.0. See [[How to use the software]] for more details. Some parts of this website also require a working applet plugin in your browser.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Contact and Info'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[http://www.evolbio.mpg.de/~garcia/ Julián García] : garcia at evolbio dot mpg dot de&lt;br /&gt;
&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen] c dot m dot veelen at uva dot nl&lt;br /&gt;
&lt;br /&gt;
This website has been kindly funded by [http://www1.fee.uva.nl/creed/ CREED - University of Amsterdam]&lt;br /&gt;
&lt;br /&gt;
This website was inspired by [http://www.univie.ac.at/virtuallabs/ Virtual Labs] by Christoph Hauert and Karl Sigmund.  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</description>
			<pubDate>Mon, 04 Oct 2010 17:15:36 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Main_Page</comments>		</item>
		<item>
			<title>Main Page</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Main_Page</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Evolution and Games'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;color:#000&amp;quot; | [[Image:wikiBar.jpg|center|665px]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
We study the evolution of behavior using mathematical and computational models. You will find here a series of tutorials and software related to papers in this area. Use the '''Navigation''' panel on the left side to make your way on the website. &lt;br /&gt;
&lt;br /&gt;
This wiki is mantained by [http://www.evolbio.mpg.de/~garcial Julian Garcia]  and [http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Available tutorials'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Price|How to quit the Price equation]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Sociality|It takes grouping and cooperation to get sociality]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Parochialism|Evolution of parochial altruism by multilevel selection]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games_and_Population_Structure|Repeated games and population structure]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games|In and out of equilibrium: Evolution in repeated games with discounting ]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Under construction... '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Construction | Adaptive Dynamics and Population Structure]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''What do I need in my computer '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Most of the software is written in Java 5.0. See [[How to use the software]] for more details. Some parts of this website also require a working applet plugin in your browser.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Contact and Info'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[http://www.evolbio.mpg.de/~garcia/ Julián García] : garcia at evolbio dot mpg dot de&lt;br /&gt;
&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen] c dot m dot veelen at uva dot nl&lt;br /&gt;
&lt;br /&gt;
This website has been kindly funded by [http://www1.fee.uva.nl/creed/ CREED - University of Amsterdam]&lt;br /&gt;
&lt;br /&gt;
This website was inspired by [http://www.univie.ac.at/virtuallabs/ Virtual Labs] by Christoph Hauert and Karl Sigmund.  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</description>
			<pubDate>Mon, 04 Oct 2010 17:15:10 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Main_Page</comments>		</item>
		<item>
			<title>Main Page</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Main_Page</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Evolution and Games'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;color:#000&amp;quot; | [[Image:wikiBar.jpg|center|665px]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
We study the evolution of behavior using mathematical and computational models. You will find here a series of tutorials and software related to papers in this area. Use the '''Navigation''' panel on the left side to make your way on the website. &lt;br /&gt;
&lt;br /&gt;
This wiki is mantained by [http://staff.feweb.vu.nl/j.garcia/index.html Julian Garcia]  and [http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Available tutorials'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Price|How to quit the Price equation]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Sociality|It takes grouping and cooperation to get sociality]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Parochialism|Evolution of parochial altruism by multilevel selection]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games_and_Population_Structure|Repeated games and population structure]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games|In and out of equilibrium: Evolution in repeated games with discounting ]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Under construction... '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Construction | Adaptive Dynamics and Population Structure]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''What do I need in my computer '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Most of the software is written in Java 5.0. See [[How to use the software]] for more details. Some parts of this website also require a working applet plugin in your browser.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Contact and Info'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[http://www.evolbio.mpg.de/~garcia/ Julián García] : garcia at evolbio dot mpg dot de&lt;br /&gt;
&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen] c dot m dot veelen at uva dot nl&lt;br /&gt;
&lt;br /&gt;
This website has been kindly funded by [http://www1.fee.uva.nl/creed/ CREED - University of Amsterdam]&lt;br /&gt;
&lt;br /&gt;
This website was inspired by [http://www.univie.ac.at/virtuallabs/ Virtual Labs] by Christoph Hauert and Karl Sigmund.  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</description>
			<pubDate>Mon, 04 Oct 2010 17:14:51 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Main_Page</comments>		</item>
		<item>
			<title>Main Page</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Main_Page</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Evolution and Games'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;color:#000&amp;quot; | [[Image:wikiBar.jpg|center|665px]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
We study the evolution of behavior using mathematical and computational models. You will find here a series of tutorials and software related to papers in this area. Use the '''Navigation''' panel on the left side to make your way on the website. &lt;br /&gt;
&lt;br /&gt;
This wiki is mantained by [http://staff.feweb.vu.nl/j.garcia/index.html Julian Garcia]  and [http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Available tutorials'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Price|How to quit the Price equation]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Sociality|It takes grouping and cooperation to get sociality]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Parochialism|Evolution of parochial altruism by multilevel selection]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games_and_Population_Structure|Repeated games and population structure]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games|In and out of equilibrium: Evolution in repeated games with discounting ]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Under construction... '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Construction | Adaptive Dynamics and Population Structure]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''What do I need in my computer '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Most of the software is written in Java 5.0. See [[How to use the software]] for more details. Some parts of this website also require a working applet plugin in your browser.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Contact and Info'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[http://staff.feweb.vu.nl/j.garcia/index.html Julián García] : garcia at evolbio dot mpg dot de&lt;br /&gt;
&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen] c dot m dot veelen at uva dot nl&lt;br /&gt;
&lt;br /&gt;
This website has been kindly funded by [http://www1.fee.uva.nl/creed/ CREED - University of Amsterdam]&lt;br /&gt;
&lt;br /&gt;
This website was inspired by [http://www.univie.ac.at/virtuallabs/ Virtual Labs] by Christoph Hauert and Karl Sigmund.  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</description>
			<pubDate>Mon, 04 Oct 2010 17:14:13 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Main_Page</comments>		</item>
		<item>
			<title>Price</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Evolution is all about transitions. One generation gives birth to the next, which gives birth to yet another generation, in an endless chain of transitions. These transitions don't just go anywhere; some transitions are more likely than others. First of all we beget offspring that is likely to bear some similarity with ourselves.  And how likely we are to get offspring at all, and how many, tends to depend on certain heritable characteristics. The relative likelihood of some transitions and the relative improbability of others imply that we can make informed guesses as to where this endless chain of transitions came from and where it is going. &lt;br /&gt;
&lt;br /&gt;
The Price equation zooms in on transitions from one generation to the next. This suggests that it could be a fundamental tool for understanding this&lt;br /&gt;
process of evolution. It was formulated by George Richard Price in 1970 [http://www.nature.com/nature/journal/v227/n5257/abs/227520a0.html in an article in Nature], and acclaimed by some, maybe even quite a few, to be a fundamental ingredient for models of evolution ([http://dx.doi.org/10.1016/j.cub.2008.01.005 Gardner], [http://dx.doi.org/10.1006/jtbi.1995.0148 Frank], [http://dx.doi.org/10.1006/jtbi.2002.3015 Grafen]). We think not. The reason why it is hard to identify it as such is that it is all about probability theory and statistics, and those two topics are just not that easy. The following tutorial will help by looking at what proper probability theory or statistics would do and compare that to what the Price equation does to numbers that represent those transitions. There is [http://dx.doi.org/10.1016/j.jtbi.2005.04.026 an article with the same message], but this tutorial makes it simpler, by allowing you to play around with models, data and samples yourself. At some points you may find that the steps the tutorial takes are evident and all too easy, but it is possible that after a few steps, as simple as they are, you may nonetheless feel confused enough to make you want to retrace your steps and be happy, the second time around, that they are that simple. Or not, in which case you will just have an easy journey to a deep understanding why the Price equation is not what some say it is.&lt;br /&gt;
&lt;br /&gt;
==Price 1.0: A very simple model ==&lt;br /&gt;
We will begin with the simplest real model that we can think of. No sex, no shrinking or expanding populations, no frequency dependence, no&lt;br /&gt;
complications whatsoever. Just two individuals that are ready to reproduce. Asexually. This gives us a version of the Price equation that is even&lt;br /&gt;
simpler than the first version by Price himself. And it will give us probability theory and statistics that is relatively nice and easy too, and therefore an excellent start that helps us get acquainted to the joys of rigour and precision.&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 2.0: A model with sexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
If we add sexual reproduction, everything gets slightly more complicated, the proper statistics as well as the Price equation. This makes&lt;br /&gt;
the statistics much more fun, and it makes the failure of the Price equation to be of any help even more salient. We like to keep it relatively simple though, so for the moment we do not assume actual different sexes, but we do assume that every individual is diploid.&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 3.0: A model with frequency dependence ==&lt;br /&gt;
&lt;br /&gt;
We go back to the asexual model, but now we will take a model with frequency dependence. This will be a bit more complicated, but we can still use a basic, well known model. They are paired randomly, and play a game in those pairs. The game gives them payoffs according to a payoff matrix&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Extra links ==&lt;br /&gt;
&lt;br /&gt;
* John Maynard Smith [http://www.webofstories.com/play/7297 talks about the Price equation] and how this approach always felt unnatural to him. Since most of us remember a feeling of doubt when first confronted with the Price equation, it may be a relief to hear him say 'I'm not going to tell you what Price's theorem is, because I don't actually understand it'.&lt;/div&gt;</description>
			<pubDate>Mon, 04 Oct 2010 17:13:03 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price</comments>		</item>
		<item>
			<title>Price</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Evolution is all about transitions. One generation gives birth to the next, which gives birth to yet another generation, in an endless chain of transitions. These transitions don't just go anywhere; some transitions are more likely than others. First of all we beget offspring that is likely to bear some similarity with ourselves.  And how likely we are to get offspring at all, and how many, tends to depend on certain heritable characteristics. The relative likelihood of some transitions and the relative improbability of others imply that we can make informed guesses as to where this endless chain of transitions came from and where it is going. &lt;br /&gt;
&lt;br /&gt;
The Price equation zooms in on transitions from one generation to the next. This suggests that it could be a fundamental tool for understanding this&lt;br /&gt;
process of evolution. It was formulated by George Richard Price in 1970 [http://www.nature.com/nature/journal/v227/n5257/abs/227520a0.html in an article in Nature], and acclaimed by some, maybe even quite a few, to be a fundamental ingredient for models of evolution ([http://dx.doi.org/10.1016/j.cub.2008.01.005 Gardner], [http://dx.doi.org/10.1006/jtbi.1995.0148 Frank], [http://dx.doi.org/10.1006/jtbi.2002.3015 Grafen]). We think not. The reason why it is hard to identify it as such is that it is all about probability theory and statistics, and those two topics are just not that easy. The following tutorial will help by looking at what proper probability theory or statistics would do and compare that to what the Price equation does to numbers that represent those transitions. There is [http://dx.doi.org/10.1016/j.jtbi.2005.04.026 an article with the same message], but this tutorial makes it simpler, by allowing you to play around with models, data and samples yourself. At some points you may find that the steps the tutorial takes are evident and all too easy, but it is possible that after a few steps, as simple as they are, you may nonetheless feel confused enough to make you want to retrace your steps and be happy, the second time around, that they are that simple. Or not, in which case you will just have an easy journey to a deep understanding why the Price equation is not what some say it is.&lt;br /&gt;
&lt;br /&gt;
==Price 1.0: A very simple model ==&lt;br /&gt;
We will begin with the simplest real model that we can think of. No sex, no shrinking or expanding populations, no frequency dependence, no&lt;br /&gt;
complications whatsoever. Just two individuals that are ready to reproduce. Asexually. This gives us a version of the Price equation that is even&lt;br /&gt;
simpler than the first version by Price himself. And it will give us probability theory and statistics that is relatively nice and easy too, and therefore an excellent start that helps us get acquainted to the joys of rigour and precision.&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 2.0: A model with sexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
If we add sexual reproduction, everything gets slightly more complicated, the proper statistics as well as the Price equation. This makes&lt;br /&gt;
the statistics much more fun, and it makes the failure of the Price equation to be of any help even more salient. We like to keep it relatively simple though, so for the moment we do not assume actual different sexes, but we do assume that every individual is diploid.&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 3.0: A model with frequency dependence ==&lt;br /&gt;
&lt;br /&gt;
We go back to the asexual model, but now we will take a model with frequency dependence. This will be a bit more complicated, but we can still use a basic, well known model. They are paired randomly, and play a game in those pairs. The game gives them payoffs according to a payoff matrix&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Extra links ==&lt;br /&gt;
&lt;br /&gt;
* John Maynard Smith [http://www.webofstories.com/play/7297 talks about the Price equation] and how this approach always felt unnatural to him.&lt;/div&gt;</description>
			<pubDate>Mon, 04 Oct 2010 13:25:21 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price</comments>		</item>
		<item>
			<title>Price</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Evolution is all about transitions. One generation gives birth to the next, which gives birth to yet another generation, in an endless chain of transitions. These transitions don't just go anywhere; some transitions are more likely than others. First of all we beget offspring that is likely to bear some similarity with ourselves.  And how likely we are to get offspring at all, and how many, tends to depend on certain heritable characteristics. The relative likelihood of some transitions and the relative improbability of others imply that we can make informed guesses as to where this endless chain of transitions came from and where it is going. &lt;br /&gt;
&lt;br /&gt;
The Price equation zooms in on transitions from one generation to the next. This suggests that it could be a fundamental tool for understanding this&lt;br /&gt;
process of evolution. It was formulated by George Richard Price in 1970 [http://www.nature.com/nature/journal/v227/n5257/abs/227520a0.html in an article in Nature], and acclaimed by some, maybe even quite a few, to be a fundamental ingredient for models of evolution ([http://dx.doi.org/10.1016/j.cub.2008.01.005 Gardner], [http://dx.doi.org/10.1006/jtbi.1995.0148 Frank], [http://dx.doi.org/10.1006/jtbi.2002.3015 Grafen]). We think not. The reason why it is hard to identify it as such is that it is all about probability theory and statistics, and those two topics are just not that easy. The following tutorial will help by looking at what proper probability theory or statistics would do and compare that to what the Price equation does to numbers that represent those transitions. There is [http://dx.doi.org/10.1016/j.jtbi.2005.04.026 an article with the same message], but this tutorial makes it simpler, by allowing you to play around with models, data and samples yourself. At some points you may find that the steps the tutorial takes are evident and all too easy, but it is possible that after a few steps, as simple as they are, you may nonetheless feel confused enough to make you want to retrace your steps and be happy, the second time around, that they are that simple. Or not, in which case you will just have an easy journey to a deep understanding why the Price equation is not what some say it is.&lt;br /&gt;
&lt;br /&gt;
==Price 1.0: A very simple model ==&lt;br /&gt;
We will begin with the simplest real model that we can think of. No sex, no shrinking or expanding populations, no frequency dependence, no&lt;br /&gt;
complications whatsoever. Just two individuals that are ready to reproduce. Asexually. This gives us a version of the Price equation that is even&lt;br /&gt;
simpler than the first version by Price himself. And it will give us probability theory and statistics that is relatively nice and easy too, and therefore an excellent start that helps us get acquainted to the joys of rigour and precision.&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 2.0: A model with sexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
If we add sexual reproduction, everything gets slightly more complicated, the proper statistics as well as the Price equation. This makes&lt;br /&gt;
the statistics much more fun, and it makes the failure of the Price equation to be of any help even more salient. We like to keep it relatively simple though, so for the moment we do not assume actual different sexes, but we do assume that every individual is diploid.&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 3.0: A model with frequency dependence ==&lt;br /&gt;
&lt;br /&gt;
We go back to the asexual model, but now we will take a model with frequency dependence. This will be a bit more complicated, but we can still use a basic, well known model. They are paired randomly, and play a game in those pairs. The game gives them payoffs according to a payoff matrix&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 Applet | Go straight to the software]]&lt;/div&gt;</description>
			<pubDate>Mon, 04 Oct 2010 13:22:43 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price</comments>		</item>
		<item>
			<title>Main Page</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Main_Page</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Evolution and Games'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;color:#000&amp;quot; | [[Image:wikiBar.jpg|center|665px]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
We study the evolution of behavior using mathematical and computational models. You will find here a series of tutorials and software related to papers in this area. Use the '''Navigation''' panel on the left side to make your way on the website. &lt;br /&gt;
&lt;br /&gt;
This wiki is mantained by [http://staff.feweb.vu.nl/j.garcia/index.html Julian Garcia]  and [http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Available tutorials'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Price|How to quit the Price equation]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Sociality|It takes grouping and cooperation to get sociality]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Parochialism|Evolution of parochial altruism by multilevel selection]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games_and_Population_Structure|Repeated games and population structure]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games|In and out of equilibrium: Evolution in repeated games with discounting ]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Under construction... '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Construction | Adaptive Dynamics and Population Structure]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''What do I need in my computer '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Most of the software is written in Java 5.0. See [[How to use the software]] for more details. Some parts of this website also require a working applet plugin in your browser.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Contact and Info'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[http://staff.feweb.vu.nl/j.garcia/index.html Julián García] : j dot garcia at feweb dot vu dot nl&lt;br /&gt;
&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen] c dot m dot veelen at uva dot nl&lt;br /&gt;
&lt;br /&gt;
This website has been kindly funded by [http://www1.fee.uva.nl/creed/ CREED - University of Amsterdam]&lt;br /&gt;
&lt;br /&gt;
This website was inspired by [http://www.univie.ac.at/virtuallabs/ Virtual Labs] by Christoph Hauert and Karl Sigmund.  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</description>
			<pubDate>Sat, 25 Sep 2010 15:47:20 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Main_Page</comments>		</item>
		<item>
			<title>Main Page</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Main_Page</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Evolution and Games'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;color:#000&amp;quot; | [[Image:wikiBar.jpg|center|665px]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
We study the evolution of behavior using mathematical and computational models. You will find here a series of tutorials and software related to papers in this area. Use the '''Navigation''' panel on the left side to make your way on the website. &lt;br /&gt;
&lt;br /&gt;
This wiki is mantained by [http://staff.feweb.vu.nl/j.garcia/index.html Julian Garcia]  and [http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Available tutorials'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Price|How to quit the Price equation]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Sociality|It takes grouping and cooperation to get sociality]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Parochialism|Evolution of parochial altruism by multilevel selection]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games_and_Population_Structure|Repeated games and population structure]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Repeated_Games|In and out of equilibrium: Evolution in repeated games with discounting ]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Under construction... '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Construction| In and Out of Equilibrium: Evolution in Repeated Games with Discounting]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Construction|Repeated Games and Population Structure]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Construction | Adaptive Dynamics and Population Structure]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''What do I need in my computer '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Most of the software is written in Java 5.0. See [[How to use the software]] for more details. Some parts of this website also require a working applet plugin in your browser.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Contact and Info'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[http://staff.feweb.vu.nl/j.garcia/index.html Julián García] : j dot garcia at feweb dot vu dot nl&lt;br /&gt;
&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen] c dot m dot veelen at uva dot nl&lt;br /&gt;
&lt;br /&gt;
This website has been kindly funded by [http://www1.fee.uva.nl/creed/ CREED - University of Amsterdam]&lt;br /&gt;
&lt;br /&gt;
This website was inspired by [http://www.univie.ac.at/virtuallabs/ Virtual Labs] by Christoph Hauert and Karl Sigmund.  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</description>
			<pubDate>Sat, 25 Sep 2010 15:46:53 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Main_Page</comments>		</item>
		<item>
			<title>Price 1.0</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price_1.0</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
[[Price | Go to the front-page of Price equation tutorials ]]&lt;br /&gt;
&lt;br /&gt;
== A very simple model ==&lt;br /&gt;
&lt;br /&gt;
Suppose that we have a population of 2 individuals. We depart from a  population in which individual no 1 has &amp;quot;the&amp;quot; gene, while the other, individual no 2, does not. In Price equation terms, that means that the variable &amp;lt;math&amp;gt;q_{i}&amp;lt;/math&amp;gt;, which denotes the frequency of the gene in individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; becomes: &amp;lt;math&amp;gt;q_{1}=1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q_{2}=0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The next generation of 2 individuals is drawn in a very simple way. First we draw the first, and then we draw the second. That makes it a Wright-Fisher process. At both draws the new individual could be the offspring of individual no 1 or of individual no 2. Reproduction is asexual, hence the offspring is a perfect copy of its parent. Now here comes the important thing. We assume that at both draws, the probability of no 1 from the parent population -- the one with the gene -- to be drawn for reproduction is &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;, while the probability of no 2 from the parent population -- the one without the gene -- to be drawn for reproduction is &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt;. That gives us four possible transitions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:Price1Setting.jpg|400px|center|thumb|Four possible transitions]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What the new generation will be is a random variable. What the current generation is, '''is not'''; the current generation is simply given. We can however think of a ''hypothetical'' chance experiment such that, in combination with the actual random transition, we get two random variables, between which we can define a covariance. So here is the recipe. &lt;br /&gt;
&lt;br /&gt;
1) Draw one of the individuals from the parent population (this is the hypothetical random variable).&lt;br /&gt;
&lt;br /&gt;
2) Draw the next generation (this is the actual random thing that happens in the the transition).&lt;br /&gt;
&lt;br /&gt;
The random variable &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; is now defined as the genotype of the parent. That is a simple, albeit hypothetical random variable: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left(&lt;br /&gt;
X=1\right) =\mathbb{P}\left( X=0\right) =\frac{1}{2}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Then we define the random variable &amp;lt;math&amp;gt;Y&amp;lt;/math&amp;gt;, which is the number of offspring that the parent that has been drawn begets. This is a slightly more complicated random variable, because the chances depend on which one of the two possible parents have been chosen. So we get a (not too long) list of conditional probabilities. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=0 | X=0\right) =p^{2} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=1 | X=0\right) = 2p \left( 1-p\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathbb{P}\left( Y=2 | X=0\right) = \left( 1-p\right) ^{2} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The other conditional probabilities are the reverse,because the parent of a new individual is the one if it is not the other, and vice versa...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathbb{P}\left( Y=0|X=1\right) = \left( 1-p\right) ^{2} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=1|X=1\right) =2p\left( 1-p\right)  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=2|X=1\right) =p^{2} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The  &amp;lt;math&amp;gt;X &amp;lt;/math&amp;gt; and  &amp;lt;math&amp;gt;Y &amp;lt;/math&amp;gt; are pretty well defined, so we can also compute the covariance of these two actual random variables...&lt;br /&gt;
&lt;br /&gt;
Let us first look at expectations...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{E}\left[ X\right]=\frac{1}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ X\right] =\sum_{x=0,1}x\mathbb{P}\left( X=x\right) =\mathbb{P}\left( X=1\right) =\frac{1}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For obvious symmetry reasons; the total number of offspring is 2, and either one could be the parent, so ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ Y\right] =1&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ Y\right] =\sum_{x=0,1}\sum_{y=0,1,2}y\mathbb{P}\left( X=x,Y=y\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{y=1,2}\sum_{x=0,1}y\mathbb{P}\left( X=x\right) \mathbb{P}\left(Y=y|X=x\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; =1\cdot \left( \frac{1}{2}\cdot 2p\left( 1-p\right) +\frac{1}{2}\cdot 2p\left( 1-p\right) \right) +2\cdot \left( \frac{1}{2}\cdot p^{2}+\frac{1}{2}\cdot \left( 1-p\right) ^{2}\right) = 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ XY\right] = p &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ XY\right] =\sum_{x=0,1}\sum_{y=0,1,2}xy\mathbb{P}\left( X=x,Y=y\right)  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(because &amp;lt;math&amp;gt;xy=0&amp;lt;/math&amp;gt; if either &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;y=0&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; =\sum_{x=1}\sum_{y=1,2}xy\mathbb{P}\left( X=x,Y=y\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; =1\cdot \mathbb{P}\left( X=1,Y=1\right) +2\cdot \mathbb{P}\left(X=1,Y=2\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; =1\cdot \mathbb{P}\left( X=1\right) \cdot \mathbb{P}\left(Y=1|X=1\right) +2\cdot \mathbb{P}\left( X=1\right) \mathbb{P}\left(Y=2|X=1\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; =1\cdot \frac{1}{2}\cdot 2p\left( 1-p\right) +2\cdot \frac{1}{2}\cdot p^{2}= &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=p\left( 1-p\right) +p^{2}= p&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The covariance is then...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Cov\left( X,Y\right) =\mathbb{E}\left[ XY\right] -\mathbb{E}\left[ X\right] &lt;br /&gt;
\mathbb{E}\left[ Y\right] =p-\frac{1}{2}\cdot 1=p-\frac{1}{2} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Price equation for this very simple model ==&lt;br /&gt;
&lt;br /&gt;
An interesting question would be: is it good to have the gene? &lt;br /&gt;
&lt;br /&gt;
Or, if we do statistics: suppose we know that the process has this form, but we  don't know the value of ''p''. Then the question becomes: is ''p&amp;gt;1/2'', or, equivalently, is ''Cov( X,Y) &amp;gt;0''. Below we will try to answer that question. But first we will look at what the Price equation does to all of this.&lt;br /&gt;
&lt;br /&gt;
For a given transition, the Price equation constitutes an identity. The frequency of the gene in the parent population is, in general, defined as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Q_{1}=\frac{1}{N}\sum_{i}q_{i}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of individuals, and &amp;lt;math&amp;gt;q_{i}&amp;lt;/math&amp;gt; is the frequency of the gene in individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; (For this particular model this quantity is 0.5).&lt;br /&gt;
&lt;br /&gt;
The frequency of the gene in the offspring population is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Q_{2}=\frac{\sum_{i=1}^{N}z_{i}q_{i}}{\sum_{i=1}^{N}z_{i}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;z_{i}&amp;lt;/math&amp;gt; is the number of times individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; in the parent population was drawn for reproduction. The Price equation 1.0 then is the following identity:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\triangle Q=Q_{2}-Q_{1}=\frac{N}{\sum_{i}z_{i}}\left[ \frac{\sum_{i}z_{i}q_{i}}{N}-\left( \frac{\sum_{i}z_{i}}{N}\right) \left( \frac{\sum_{i}q_{i}}{N}\right) \right] &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Q_{2}-Q_{1} =\frac{\sum_{i}z_{i}q_{i}}{\sum_{i}z_{i}}-\frac{1}{N}\sum_{i}q_{i} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{\sum_{i}z_{i}q_{i}+\frac{1}{N}\sum_{i}z_{i}\sum_{i}q_{i}-\frac{1}{N}\sum_{i}z_{i}\sum_{i}q_{i}}{\sum_{i}z_{i}}-\frac{1}{N}\sum_{i}q_{i} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=N\left[ \frac{\frac{1}{N}\sum_{i}z_{i}q_{i}-\left( \frac{1}{N}\sum_{i}z_{i}\right) \left( \frac{1}{N}\sum_{i}q_{i}\right) }{\sum_{i}z_{i}}\right] &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{N}{\sum_{i}z_{i}}\left[ \frac{\sum_{i}z_{i}q_{i}}{N}-\left( \frac{\sum_{i}z_{i}}{N}\right) \left( \frac{\sum_{i}q_{i}}{N}\right) \right]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this simple case for N = 2 this amounts to &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\triangle Q=\left[ \frac{\sum_{i}z_{i}q_{i}}{2}-\frac{\sum_{i}q_{i}}{2}\right] &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Confusion ==&lt;br /&gt;
&lt;br /&gt;
The point where confusion starts, is that George Price named the right hand side of this equation ''Cov(z,q)''. The claim of the Price equation - which we contend - is that the equation unveils that a change in frequency - &amp;lt;math&amp;gt;\triangle Q&amp;lt;/math&amp;gt; - is explained by the covariance between having the gene and the number of offspring - ''Cov(z,q)''. The central issue here is that this ''Cov(z,q)'' is discussed as if it were a real covariance. Is that correct? &lt;br /&gt;
&lt;br /&gt;
Try yourself!&lt;br /&gt;
&amp;lt;java_applet code=&amp;quot;tutorial1.Tutorial1.class&amp;quot;  height=&amp;quot;400&amp;quot; width=&amp;quot;600&amp;quot; archive=&amp;quot;Price.jar&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you tried a few times, you may have found out that &amp;lt;math&amp;gt;\triangle Q&amp;lt;/math&amp;gt; can attain different values; the next generation is a random draw, which implies that the frequency ''Q'' can go up by 1/2, remain what it is, or go down by 1/2. The value of this so-called ''Covariance'' just follows that change in frequency (and because it is not a real covariance, we will use quotation marks from now on). This creates an illusion of understanding, because whatever happens, the covariance changes along with the outcome of the chance experiment. In other words: '''the data explain the data'''. &lt;br /&gt;
&lt;br /&gt;
This is, of course, not OK; the true and well-defined covariance is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Cov\left( X,Y\right) = p-\frac{1}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This does not depend on the realisation. Cov(X,Y) defines the properties of the chance experiment, and the realisation of this chance experiment defines &amp;quot;Cov(z,q)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==What would a proper probability theorist do?==&lt;br /&gt;
&lt;br /&gt;
Try to figure out the transition probabilities for the suggested model. It seems that you are a proper probability theorist, because that is what you just did.  Congrats!&lt;br /&gt;
&lt;br /&gt;
== What would a proper statistician do? ==&lt;br /&gt;
&lt;br /&gt;
If you are interested in statistics, which is only natural if you care for evolution, and you do not know the true model that generates the transitions, then you would want to try to answer the question what $p$ is. Is ''p&amp;gt;1/2''? Then having the gene is good for reproduction. Is ''p&amp;lt;1/2''? Then not. &lt;br /&gt;
&lt;br /&gt;
Is ''p=1/2''? Then it is good nor bad. So how do we find out? Well, the thing with statistics is that you will never find out for sure. All we can do is try to find ways to estimate this ''p'', or design tests on if and how ''p'' differs from ''1/2'', that will help us make statements about the true model with some confidence. Here are a few such statements.&lt;br /&gt;
&lt;br /&gt;
===Estimation of p===&lt;br /&gt;
&lt;br /&gt;
One of the reasons that so many are convinced of the value of the Price equation is that it ''almost'' hits the nail on the head (even though it misses the head completely). So here we go with what sometimes feels as an indication that the Price equation is not so wrong after all. If you sense this in yourself, just return to the interactive part above.&lt;br /&gt;
&lt;br /&gt;
If you draw a new generation, then that new generation comes with a &amp;quot;Cov(z,q)&amp;quot; . With probability &amp;lt;math&amp;gt;p^{2}&amp;lt;/math&amp;gt; you draw  two 1's, which implies  &amp;quot;Cov(z,q)&amp;quot;=+1/2. With probability &amp;lt;math&amp;gt;(1-p) ^{2}&amp;lt;/math&amp;gt; you draw  two 0's, which implies &amp;quot;Cov(z,q)&amp;quot;=-1/2. So&amp;quot;Cov(z,q)&amp;quot; is actually a random variable itself, the characteristics of which we can look at. Two natural characteristics are its expected value and its variance. Now the expectation of this so-called variance is, luckily,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ ^{\prime \prime }Cov\left( z,q\right) ^{\prime \prime }\right] =p-\frac{1}{2}. &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ ^{\prime \prime }Cov\left( z,q\right) ^{\prime \prime }\right] =\mathbb{E}\left[ \frac{\sum_{i}z_{i}q_{i}}{2}-\frac{\sum_{i}q_{i} }{2}\right] = &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
=\sum_{z_{1}=0,1,2}\left[ \frac{z_{1}q_{1}}{2}-\frac{q_{1}}{2}\right] &lt;br /&gt;
\mathbb{P}\left( Z_{1}=z_{1}\right) = &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
=-\frac{1}{2}\cdot \left( 1-p\right) ^{2}+0\cdot 2p\left( 1-p\right) +\frac{1}{2}\cdot p^{2}=p-\frac{1}{2}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the realisation varies quite a bit, as we have seen in interactive part above. This is reflected in the variance of &amp;quot;Cov(z,q)&amp;quot;;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Var\left[ ^{\prime \prime }Cov\left( z,q\right) ^{\prime \prime }\right] = \frac{1}{2}p\left( 1-p\right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Var\left[ ^{\prime \prime }Cov\left( z,q\right) ^{\prime \prime }\right] =\mathbb{E}\left[ \left( ^{\prime \prime }Cov\left( z,q\right) ^{\prime&lt;br /&gt;
\prime }\right) ^{2}\right] -\mathbb{E}^{2}\left[ \left( ^{\prime \prime}Cov\left( z,q\right) ^{\prime \prime }\right) \right] =\frac{1}{2}p\left( 1-p\right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This variance can be reduced though if we take a large sample. Suppose that we have individuals ''i=1,...,n'' with the gene, and individuals ''i=n+1,...,2n''&lt;br /&gt;
without it. Now we draw the next generation in the same way as before, which looks a bit more general; ''2n'' individuals are drawn, and at every draw&lt;br /&gt;
individual ''i'' has a probability with which it is drawn to reproduce. For ''i=1,...,n'' this probability is &amp;lt;math&amp;gt;\frac{p_{1}}{np_{1}+np_{0}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
For ''i=n+1,...,2n'' this probability is &amp;lt;math&amp;gt;\frac{p_{0}}{np_{1}+np_{0}}&amp;lt;/math&amp;gt;. For this transition, one can show that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ \frac{\sum_{i=1}^{2n}z_{i}q_{i}}{2n}-\frac{\sum_{i=1}^{2n}q_{i}}{2n}\right] =p-\frac{1}{2} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\lim_{n\rightarrow \infty }Var\left[ \frac{\sum_{i=1}^{2n}z_{i}q_{i}}{2n}-\frac{\sum_{i=1}^{2n}q_{i}}{2n}\right] =0 &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we indeed define &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;^{\prime \prime }Cov\left( z,q\right)^{\prime \prime }&amp;lt;/math&amp;gt;  as &amp;lt;math&amp;gt;\frac{1}{2n}\left(\sum_{i=1}^{2n}z_{i}q_{i}- \sum_{i=1}^{2n}q_{i}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;^{\prime\prime }Cov\left( z,q\right) ^{\prime \prime }+\frac{1}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is an unbiased estimator of ''p'' - because &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ ^{\prime \prime }Cov\left( z,q\right) ^{\prime \prime }\right] =p-\frac{1}{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
The quantity &amp;lt;math&amp;gt;^{\prime\prime }Cov\left( z,q\right) ^{\prime \prime }&amp;lt;/math&amp;gt; is also regularly referred to as the ''sample'' covariance, which is not the true covariance (true covariance = fixed property of two random variables, sample covariance = itself a random variable).&lt;br /&gt;
&lt;br /&gt;
===Testing properties of p ===&lt;br /&gt;
&lt;br /&gt;
The ''sample'' covariance is typically also used as input for in tests of the type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
H_{0} : p=\frac{1}{2} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
H_{1} : p\neq \frac{1}{2}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== So how does the Price equation help here?== &lt;br /&gt;
&lt;br /&gt;
Not. For determining the properties of the model, the Price equation did not help, and in fact cannot even be of use. We found the transition&lt;br /&gt;
probabilities just by doing probability calculations. For doing statistics the Price equation did not help either. And yes, the Price equation applied to one actual draw does have the sample covariance of that draw in it, and the sample covariance is a useful thing, but we do not need the Price&lt;br /&gt;
equation for knowing that the sample covariance is useful. The sample covariance has been around forever; it was there well before George Price&lt;br /&gt;
was born, and it is used in parameter estmation and hypothesis testing in all other fields of science, where no one has ever heard of G.R. Price. And, most importantly, using the sample covariance is obviously not the same as using the Price equation. It is using the sample covariance.&lt;/div&gt;</description>
			<pubDate>Sun, 19 Sep 2010 13:57:02 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price_1.0</comments>		</item>
		<item>
			<title>Price 2.0</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price_2.0</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* A model with sexual reproduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
[[Price | Go to the front-page of Price equation tutorials ]]&lt;br /&gt;
&lt;br /&gt;
== A model with sexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
If we add sexual reproduction, everything gets slightly more complicated, the proper statistics as well as the Price equation. This makes&lt;br /&gt;
the statistics much more fun, and it makes the failure of the Price equation to be of any help even more salient. We like to keep it relatively simple&lt;br /&gt;
though, so for the moment we do not assume actual different sexes, but we do assume that every individual is diploid. That means that individuals can be ''AA'', ''Aa'' or ''aa''. The frequency of the gene is then, resp., ''1'', ''1/2'' or ''0''. Individuals are hermaphrodites for the sake of simplicity.&lt;br /&gt;
&lt;br /&gt;
Suppose that we have a population of 4 individuals, &amp;lt;math&amp;gt;q_{1}=1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q_{2}=q_{3}=1/2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q_{4}=0&amp;lt;/math&amp;gt;. The next generation of 4 individuals is drawn as follows. First we draw a father for the first individual. From the father we draw one of the two loci, which gives us an ''A'' or an ''a''. Then we draw a mother, and one of her loci. These two loci go into the gametes for reproduction, that together give us the first individual of the offspring generation. Three repetitions of this procedure give us a whole new generation.&lt;br /&gt;
&lt;br /&gt;
We will make two crucial assumptions here.&lt;br /&gt;
&lt;br /&gt;
1) ''A'' is not dominant nor recessive in fitness terms&lt;br /&gt;
&lt;br /&gt;
2) Fair meosis&lt;br /&gt;
&lt;br /&gt;
Both assumptions concern probabilities in this update step. The first concerns the probabilities with which an individual is chosen for parenthood. We assume that the probability with which individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is chosen is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{P}\left( i\text{ is chosen}\right) =\frac{\alpha q_{i}+\beta }{\sum_{j=1}^{n}\left( \alpha q_{j}+\beta \right) } &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With our starting point, &amp;lt;math&amp;gt;q_{1}=1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q_{2}=q_{3}=1/2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q_{4}=0&amp;lt;/math&amp;gt;. which  gives us the following probabilities...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;p_{1} =\mathbb{P}\left( 1\text{ is chosen}\right) =\frac{\alpha +\beta }{2\alpha +4\beta } &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;p_{\frac{1}{2}} =\mathbb{P}\left( 2\text{ is chosen}\right) =\frac{\frac{1}{2}\alpha +\beta }{2\alpha +4\beta } &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;p_{\frac{1}{2}} =\mathbb{P}\left( 3\text{ is chosen}\right) =\frac{\frac{1}{2}\alpha +\beta }{2\alpha +4\beta } &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;p_{0} =\mathbb{P}\left( 4\text{ is chosen}\right) =\frac{\beta }{2\alpha+4\beta }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These formulas tells us that Assumption 1) is equivalent to saying that &amp;lt;math&amp;gt;p_{\frac{1}{2}}&amp;lt;/math&amp;gt; is the average of &amp;lt;math&amp;gt;p_{1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;p_{0}&amp;lt;/math&amp;gt;. The second assumption just means that the probability of either locus of the parent to be chosen for passing on is 1/2.&lt;br /&gt;
&lt;br /&gt;
Again, we first draw one of the individuals from the parent population (this is a hypothetical random variable that has nothing to do with the actual&lt;br /&gt;
transition) and then draw the next generation (this is the actual random thing that happens in the the transition). The random variable &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; is again defined as the genotype of the parent. For our given starting point, that is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( X=1\right) =\mathbb{P}\left( X=0\right) =\frac{1}{4}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbb{P}\left( X=\frac{1}{2}\right) =\frac{1}{2}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Then we define the random variable &amp;lt;math&amp;gt;Y&amp;lt;/math&amp;gt; as the number of successful  gametes that this parent produces. This is a slightly more  omplicated random variable, because we need to draw 8 parents for 4 offspring and because the chances depend on which of the four the (candidate) parent is that was drawn in step 1. So we get a pretty long list of conditional probabilities.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=k|X=0\right) =\binom{8}{k}\left( p_{0}\right)^{k}\left( 1-p_{0}\right) ^{8-k},\ k=1,..,8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=k|X=\frac{1}{2}\right) =\binom{8}{k}\left( p_{\frac{1}{2}}\right) ^{k}\left( 1-p_{\frac{1}{2}}\right) ^{8-k},\ \ k=1,..,8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=k|X=1\right) =\binom{8}{k}\left( p_{1}\right)^{k}\left( 1-p_{1}\right) ^{8-k},\ \ k=1,..,8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is well defined again, so we can also compute the covariance of these two actual random variables. Let us start with expectations...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ X\right] =\frac{1}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ X\right] =\sum_{x=0,\frac{1}{2},1}x\mathbb{P}\left(X=x\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{2}\mathbb{P}\left( X=\frac{1}{2}\right) +\mathbb{P}\left(X=1\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{2}\cdot \frac{1}{2}+\frac{1}{4}=\frac{1}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For symmetry reasons (the total number of succesful gametes is 8, and either of the 4 could be the parent)...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ Y\right] =2 &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ Y\right] = \sum_{x=0,\frac{1}{2},1}\sum_{y=0}^{8}y\mathbb{P}\left( X=x,Y=y\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{x=0,\frac{1}{2},1}\sum_{k=0}^{8}k\mathbb{P}\left( X=x\right)  \mathbb{P}\left( Y=k|X=x\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{k=0}^{8}k\cdot \frac{1}{4}\cdot \binom{8}{k}\left( p_{0}\right) ^{k}\left( 1-p_{0}\right) ^{8-k}+\sum_{k=0}^{8}k\cdot \frac{1}{2}\cdot \binom{8}{k}\left( p_{\frac{1}{2}}\right) ^{k}\left( 1-p_{\frac{1}{2}}\right) ^{8-k}+\sum_{k=0}^{8}k\cdot \frac{1}{4}\cdot \binom{8}{k}\left(p_{1}\right) ^{k}\left( 1-p_{1}\right) ^{8-k} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{4}\sum_{k=0}^{8}k\binom{8}{k}\left( p_{0}\right) ^{k}\left(1-p_{0}\right) ^{8-k}+\frac{1}{2}\sum_{k=0}^{8}k\binom{8}{k}\left( p_{\frac{1}{2}}\right) ^{k}\left( 1-p_{\frac{1}{2}}\right) ^{8-k}+\frac{1}{4}\sum_{k=0}^{8}k\binom{8}{k}\left( p_{1}\right) ^{k}\left( 1-p_{1}\right)^{8-k} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{4}\cdot 8p_{0}+\frac{1}{2}\cdot 8p_{\frac{1}{2}}+\frac{1}{4}\cdot 8p_{1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=2p_{0}+4p_{\frac{1}{2}}+2p_{1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{4\alpha +8\beta }{2\alpha +4\beta }=2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ XY\right] =\frac{3\alpha +4\beta }{2\alpha +4\beta }&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ XY\right] =\sum_{x=0,\frac{1}{2},1}\sum_{y=0}^{8}xy\mathbb{P}\left( X=x,Y=y\right) \text{ (because }xy=0\text{ if either }x=0\text{ or }y=0\text{)} &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{x=\frac{1}{2},1}\sum_{k=0}^{8}xk\mathbb{P}\left( X=x\right) \mathbb{P}\left( Y=k|X=x\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{k=0}^{8}\frac{1}{2}\cdot k\cdot \frac{1}{2}\cdot \binom{8}{k}\left( p_{\frac{1}{2}}\right) ^{k}\left( 1-p_{\frac{1}{2}}\right)^{8-k}+\sum_{k=0}^{8}1\cdot k\cdot \frac{1}{4}\cdot \binom{8}{k}\left(p_{1}\right) ^{k}\left( 1-p_{1}\right) ^{8-k} &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{4}\sum_{k=0}^{8}k\binom{8}{k}\left( p_{\frac{1}{2}}\right)^{k}\left( 1-p_{\frac{1}{2}}\right) ^{8-k}+\frac{1}{4}\sum_{k=0}^{8}k\binom{8}{k}\left( p_{1}\right) ^{k}\left( 1-p_{1}\right) ^{8-k} &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{4}\cdot 8p_{\frac{1}{2}}+\frac{1}{4}\cdot 8p_{1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=2\left( p_{\frac{1}{2}}+p_{1}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{3\alpha +4\beta }{2\alpha +4\beta }&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The covariance of these two random variables is therefore...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Cov\left( X,Y\right) =\mathbb{E}\left[ XY\right] -\mathbb{E}\left[ X\right] \mathbb{E}\left[ Y\right] =2\left( p_{\frac{1}{2}}+p_{1}\right) -1=\frac{3\alpha +4\beta }{2\alpha +4\beta }-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Price equation for this slightly less simple model ==&lt;br /&gt;
&lt;br /&gt;
Interesting questions would be: is it good to have this gene? In this case, a first check in search of an answer would be: &lt;br /&gt;
&lt;br /&gt;
is &amp;lt;math&amp;gt;\frac{3\alpha +4\beta }{2\alpha +4\beta }&amp;gt;1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in other words, is &amp;lt;math&amp;gt;\alpha &amp;gt;0 &amp;lt;/math&amp;gt;, which, as long as we remain within the setting of this model, is equivalent to  &amp;lt;math&amp;gt;Cov\left( X,Y\right) &amp;gt;0 &amp;lt;/math&amp;gt;. This however is only a first check, and below we will see that the answer can come in a riot of colours and flavours, especially if we are not really sure after all if the model describes reality accurately. But first we will look at what the Price equation makes of all this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With this model, the Price equation looks pretty much like the one Price formulated in his original paper. It is an identity. The frequency of the gene in the parent population is, in general, defined as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Q_{1}=\frac{1}{N} \sum_{i}q_{i}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of individuals, and &amp;lt;math&amp;gt;q_{i}&amp;lt;/math&amp;gt; is the frequency of the gene in individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;. So here that is &amp;lt;math&amp;gt;Q_{1}=1/2&amp;lt;/math&amp;gt;. The frequency of the gene in the offspring population is...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Q_{2}=\frac{\sum_{i=1}^{N}z_{i}q_{i}^{\prime }}{\sum_{i=1}^{N}z_{i}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This differs from the Price Equation 1.0, because of the locus-drawing step. Therefore we have $q_{i}^{\prime }$, which is the frequency of the gene in the set of successful gametes produced by individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;. In the [Price_1.0 | Price Equation 1.0] this was by definition equal to the frequency &amp;lt;math&amp;gt;q_{i}&amp;lt;/math&amp;gt; of the gene in the parent, but because there is a random step involved here, this is no longer the case. Of course  &amp;lt;math&amp;gt;z_{i}&amp;lt;/math&amp;gt; is still the number of times individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; in the parent population was drawn for reproduction. The Price equation for this model is then is the following identity:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\triangle Q=Q_{2}-Q_{1}=\frac{N}{\sum_{i}z_{i}}\left[ \frac{\sum_{i}z_{i}q_{i}}{N}-\left( \frac{\sum_{i}z_{i}}{N}\right) \left( \frac{\sum_{i}q_{i}}{N}\right) \right] +\frac{\sum_{i}z_{i}\left( q_{i}^{\prime}-q_{i}\right) }{\sum_{i}z_{i}} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;Q_{2}-Q_{1} =\frac{\sum_{i}z_{i}q_{i}^{\prime }}{\sum_{i}z_{i}}-\frac{1}{N}\sum_{i}q_{i} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{\sum_{i}z_{i}q_{i}}{\sum_{i}z_{i}}+\frac{\sum_{i}z_{i}\left(q_{i}^{\prime }-q_{i}\right) }{\sum_{i}z_{i}}-\frac{1}{N}\sum_{i}q_{i} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{\sum_{i}z_{i}q_{i}+\frac{1}{N}\sum_{i}z_{i}\sum_{i}q_{i}-\frac{1}{N}\sum_{i}z_{i}\sum_{i}q_{i}}{\sum_{i}z_{i}}+\frac{\sum_{i}z_{i}\left(q_{i}^{\prime }-q_{i}\right) }{\sum_{i}z_{i}}-\frac{1}{N}\sum_{i}q_{i} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=N\left[ \frac{\frac{1}{N}\sum_{i}z_{i}q_{i}-\left( \frac{1}{N}\sum_{i}z_{i}\right) \left( \frac{1}{N}\sum_{i}q_{i}\right) }{\sum_{i}z_{i}}\right] +\frac{\sum_{i}z_{i}\left( q_{i}^{\prime }-q_{i}\right) }{\sum_{i}z_{i}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{N}{\sum_{i}z_{i}}\left[ \frac{\sum_{i}z_{i}q_{i}}{N}-\left( \frac{\sum_{i}z_{i}}{N}\right) \left( \frac{\sum_{i}q_{i}}{N}\right) \right] +\frac{\sum_{i}z_{i}\left( q_{i}^{\prime }-q_{i}\right) }{\sum_{i}z_{i}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which in this particular model is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\triangle Q=\frac{1}{2}\left[ \frac{\sum_{i}z_{i}q_{i}}{4}-\frac{\sum_{i}q_{i}}{2}\right] +\frac{\sum_{i}z_{i}\left( q_{i}^{\prime}-q_{i}\right) }{8} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Confusion ==&lt;br /&gt;
&lt;br /&gt;
As before, it is unfortunate that George Price named the term between square brackets in this equation ''Cov(z,q)''. The claim of the Price equation - which we contend even more now - is that the equation unveils that a change in frequency - &amp;lt;math&amp;gt;\triangle Q&amp;lt;/math&amp;gt; - is explained by the covariance between having the gene and the number of offspring - ''Cov(z,q)''. &lt;br /&gt;
&lt;br /&gt;
Two issues remain. One is that now there is another term on the right hand side. In the Price equation literature, this term tends to be crossed off, &amp;quot;because it will be 0 anyway&amp;quot;. This is not correct; it is typically non-zero, even if it is 0 ''in expectation''. The other issue is that &amp;quot;''Cov( z,q)''&amp;quot; is still not a covariance; it is not a constant property of a random variable, but it is a random variable itself, as it differs from draw to draw.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;java_applet code=&amp;quot;tutorial2.Tutorial2.class&amp;quot;  height=&amp;quot;480&amp;quot; width=&amp;quot;600&amp;quot; archive=&amp;quot;Price.jar&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you tried a few times, you may have found out that &amp;lt;math&amp;gt;\triangle Q&amp;lt;/math&amp;gt; can attain different values; the next generation is a random draw, which implies that the frequency &amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt; can go up or down by a variety of amounts. The right hand side just tags along with &amp;lt;math&amp;gt;\triangle Q&amp;lt;/math&amp;gt;. This can create an illusion of understanding, but whatever happens, the terms on the right hand side of the identity just change along with the outcome of the chance experiment. In other words: the data explain the data. Moreover, crossing of a term that typically is not 0 turns the identity into a false statement.&lt;br /&gt;
&lt;br /&gt;
== What would a proper probability theorist do? ==&lt;br /&gt;
&lt;br /&gt;
Try to figure out the dynamic properties of the suggested model. With the transition probabilities (see above) we can compute the expected change in frequency, and the fixation probability of ''A'' and ''a'' given the current state. Or given any starting state. &lt;br /&gt;
&lt;br /&gt;
Prove that the assumption of fair meiosis implies that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ \frac{\sum_{i}z_{i}\left( q_{i}^{\prime }-q_{i}\right) }{\sum_{i}z_{i}}\right] =0 &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All of this can be done without the Price equation. In fact, it is better done without, because the Price equation just does not fit the purpose.&lt;br /&gt;
&lt;br /&gt;
== What would a proper statistician do? ==&lt;br /&gt;
&lt;br /&gt;
A statistician would try to find out what the true model is, given data. That implies that she would:&lt;br /&gt;
&lt;br /&gt;
* Estimate &amp;lt;math&amp;gt;\alpha &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Test the assumption of fair meiosis&lt;br /&gt;
&lt;br /&gt;
For this test we need the meiosis term that is often discarded. Any test would involve this part of the formula, because if it remains far away from 0 even for large populations, that  wewould refute fair meiosis. So here is yet another reason why it would be just wrong to throw this quantity away, or just assume that it is 0.&lt;br /&gt;
&lt;br /&gt;
== So how does the Price equation help here? ==&lt;br /&gt;
&lt;br /&gt;
It doesn't. And it should worry Price Equationists that even with a relatively simple bit of modelling content, the Price equation is not of any use. Maybe things get better when the models are a bit more complicated? Well, no, of course not. As a matter of fact, things get even worse.&lt;/div&gt;</description>
			<pubDate>Sun, 19 Sep 2010 10:22:57 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price_2.0</comments>		</item>
		<item>
			<title>Main Page</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Main_Page</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Evolution and Games'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;color:#000&amp;quot; | [[Image:wikiBar.jpg|center|665px]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
We study the evolution of behavior using mathematical and computational models. You will find here a series of tutorials and software related to papers in this area. Use the '''Navigation''' panel on the left side to make your way on the website. &lt;br /&gt;
&lt;br /&gt;
This wiki is mantained by [http://staff.feweb.vu.nl/j.garcia/index.html Julian Garcia]  and [http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Available tutorials'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Price|Using the Price Equation]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Sociality|It takes grouping and cooperation to get sociality]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Parochialism|Evolution of parochial altruism by multilevel selection]]'''.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Under construction... '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* '''[[Construction| In and Out of Equilibrium: Evolution in Repeated Games with Discounting]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Construction|Repeated Games and Population Structure]]'''.&lt;br /&gt;
&lt;br /&gt;
* '''[[Construction | Adaptive Dynamics and Population Structure]]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''What do I need in my computer '''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Most of the software is written in Java 5.0. See [[How to use the software]] for more details. Some parts of this website also require a working applet plugin in your browser.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;width:100%; border:1px solid #A3B1BF; vertical-align:top; background-color:#F5FAFF; color:#000; margin:15px 0 0 0&amp;quot;&lt;br /&gt;
! &amp;lt;h2 style=&amp;quot;margin:0; background-color:#E6E6E6; font-size:14pt; border:1px solid #A3B1BF; text-align:center; color:#000; padding:0.2em 0.4em;&amp;quot;&amp;gt;'''Contact and Info'''&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[http://staff.feweb.vu.nl/j.garcia/index.html Julián García] : j dot garcia at feweb dot vu dot nl&lt;br /&gt;
&lt;br /&gt;
[http://www1.fee.uva.nl/creed/people/veelen/index.shtml Matthijs van Veelen] c dot m dot veelen at uva dot nl&lt;br /&gt;
&lt;br /&gt;
This website has been kindly funded by [http://www1.fee.uva.nl/creed/ CREED - University of Amsterdam]&lt;br /&gt;
&lt;br /&gt;
This website was inspired by [http://www.univie.ac.at/virtuallabs/ Virtual Labs] by Christoph Hauert and Karl Sigmund.  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</description>
			<pubDate>Sun, 19 Sep 2010 09:49:03 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Main_Page</comments>		</item>
		<item>
			<title>Category:Parochialism</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Category:Parochialism</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;Created page with ' Pages related to the paper '''Evolution of parochial altruism by multilevel selection'''...'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Pages related to the paper '''Evolution of parochial altruism by multilevel selection'''...&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:42:58 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Category_talk:Parochialism</comments>		</item>
		<item>
			<title>Price 3.0 Applet</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price_3.0_Applet</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
[[Price | Go to the front-page of Price equation tutorials ]]&lt;br /&gt;
&lt;br /&gt;
[[Price_3.0 | Go to the description of this model ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;java_applet code=&amp;quot;tutorial3.Tutorial3.class&amp;quot;  height=&amp;quot;480&amp;quot; width=&amp;quot;600&amp;quot; archive=&amp;quot;Price.jar&amp;quot; /&amp;gt;&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:42:00 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price_3.0_Applet</comments>		</item>
		<item>
			<title>Price 2.0 Applet</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price_2.0_Applet</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
[[Price | Go to the front-page of Price equation tutorials ]]&lt;br /&gt;
&lt;br /&gt;
[[Price_2.0 | Go to the description of this model ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;java_applet code=&amp;quot;tutorial2.Tutorial2.class&amp;quot;  height=&amp;quot;480&amp;quot; width=&amp;quot;600&amp;quot; archive=&amp;quot;Price.jar&amp;quot; /&amp;gt;&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:41:40 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price_2.0_Applet</comments>		</item>
		<item>
			<title>Price 1.0 Applet</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price_1.0_Applet</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
[[Price | Go to the front-page of Price equation tutorials ]]&lt;br /&gt;
&lt;br /&gt;
[[Price_1.0 | Go to the description of this model ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;java_applet code=&amp;quot;tutorial1.Tutorial1.class&amp;quot;  height=&amp;quot;400&amp;quot; width=&amp;quot;600&amp;quot; archive=&amp;quot;Price.jar&amp;quot; /&amp;gt;&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:41:07 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price_1.0_Applet</comments>		</item>
		<item>
			<title>Price 1.0 Applet</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price_1.0_Applet</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
[[Price | Go to the front-page of Price equation tutorials ]]&lt;br /&gt;
[[Price_1.0 | Go to the description of this model ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;java_applet code=&amp;quot;tutorial1.Tutorial1.class&amp;quot;  height=&amp;quot;400&amp;quot; width=&amp;quot;600&amp;quot; archive=&amp;quot;Price.jar&amp;quot; /&amp;gt;&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:40:59 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price_1.0_Applet</comments>		</item>
		<item>
			<title>Price 3.0</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price_3.0</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
[[Price | Go to the front-page of Price equation tutorials ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A model with frequency dependence ==&lt;br /&gt;
&lt;br /&gt;
We go back to the asexual model, but now we will take a model with frequency dependence. This will be a bit more complicated, but we can still use a basic, well known model. Suppose there are $N$ individuals. They are paired randomly, and play a game in those pairs. The game gives them payoffs according to the following payoff matrix&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ccc}&lt;br /&gt;
&amp;amp; A &amp;amp; B \\ &lt;br /&gt;
A &amp;amp; 1 &amp;amp; 0 \\ &lt;br /&gt;
B &amp;amp; 0 &amp;amp; 1&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;q_{i}=1&amp;lt;/math&amp;gt;, then that means that individual $i$ plays strategy &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;q_{i}=0&amp;lt;/math&amp;gt; means that individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; plays strategy &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;. Depending on the match, each individual gets a payoff &amp;lt;math&amp;gt;\pi _{i}&amp;lt;/math&amp;gt;. The next generation&lt;br /&gt;
is drawn, as before, one individual at a time. But now the probability that &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is drawn as a parent depends on the payoff, and not just on the own genotype.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{P}\left( i\text{ is chosen}\right) =\frac{\alpha \pi _{i}+\beta }{\sum_{j=1}^{N}\left( \alpha \pi _{j}+\beta \right) } &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We do the same procedure as before, but with a few different starting points.&lt;br /&gt;
&lt;br /&gt;
== An ''A'' mutant in a population of ''B'''s  ==&lt;br /&gt;
&lt;br /&gt;
Suppose &amp;lt;math&amp;gt;q_{1}=1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q_{i}=0&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;i=2,...,N&amp;lt;/math&amp;gt;. The probability of any individual &amp;lt;math&amp;gt;i=2,...,N&amp;lt;/math&amp;gt; to be matched with individual &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;1/(N-1)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The probability with which an individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;q_{i}=1&amp;lt;/math&amp;gt;, who is matched to an individual &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;q_{j}=0&amp;lt;/math&amp;gt;,  is chosen is:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
p_{1,0,1}=\frac{\beta }{\left( N-2\right) \alpha +N\beta } &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The probability with which an individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;q_{i}=0&amp;lt;/math&amp;gt;, who is matched to an individual &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;q_{j}=0&amp;lt;/math&amp;gt;,  is chosen is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
p_{0,0,1}=\frac{\alpha +\beta }{\left( N-2\right) \alpha +N\beta } &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The probability with which an individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;q_{i}=0&amp;lt;/math&amp;gt;, who is matched to an individual &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;q_{j}=1&amp;lt;/math&amp;gt;,  is chosen is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
p_{0,1,1}=\frac{\beta }{\left( N-2\right) \alpha +N\beta } &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also compute the covariance of these two actual random variables. Let us start by computing expectations...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ X\right] =\frac{1}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ X\right] =\sum_{x=0,1}x\mathbb{P}\left( X=x\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\mathbb{P}\left( X=1\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For symmetry reasons...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ Y\right] =1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ XY\right] =\frac{\beta }{\left( N-2\right) \alpha +N\beta }&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ XY\right] =\sum_{x=0,1}\sum_{y=0}^{N}xy\mathbb{P}\left(X=x,Y=y\right) \text{ (because }xy=0\text{ if either }x=0\text{ or }y=0\text{)} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{y=0}^{N}y\mathbb{P}\left( X=1,Y=y\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{k=0}^{N}y\mathbb{P}\left( X=1\right) \mathbb{P}\left(Y=k|X=1\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{N}\sum_{k=0}^{N}k\binom{N}{k}\left( p_{1,0,1}\right) ^{k}\left(1-p_{1,0,1}\right) ^{N-k} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=p_{1,0,1}= &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{\beta }{\left( N-2\right) \alpha +N\beta }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Covariance is thus...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Cov\left( X,Y\right) =\mathbb{E}\left[ XY\right] -\mathbb{E}\left[ X\right]  \mathbb{E}\left[ Y\right] =\frac{\beta }{\left( N-2\right) \alpha +N\beta }-\frac{1}{N} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A ''B'' mutant in a population of ''A'''s  ==&lt;br /&gt;
&lt;br /&gt;
Suppose &amp;lt;math&amp;gt;q_{1}=0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q_{i}=1&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;i=2,...,N&amp;lt;/math&amp;gt;. The probability of any individual &amp;lt;math&amp;gt;i=2,...,N&amp;lt;/math&amp;gt; to be matched with individual &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;1/(N-1)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The probability with which an individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;q_{i}=0&amp;lt;/math&amp;gt;, who is matched to an individual &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;q_{j}=1&amp;lt;/math&amp;gt;...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;p_{0,1,N-1}=\frac{\beta }{\left( N-2\right) \alpha +N\beta } &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The probability with which an individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;q_{i}=1&amp;lt;/math&amp;gt;, who is matched to an individual &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;q_{j}=1&amp;lt;/math&amp;gt;...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
p_{1,1,N-1}=\frac{\alpha +\beta }{\left( N-2\right) \alpha +N\beta } &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The probability with which an individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;q_{i}=1&amp;lt;/math&amp;gt;, who is matched to an individual &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;q_{j}=0&amp;lt;/math&amp;gt;...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
p_{1,0,N-1}=\frac{\beta }{\left( N-2\right) \alpha +N\beta } &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=k|X=0\right) =\binom{N}{k}\left( p_{0,1,N-1}\right)^{k}\left( 1-p_{0,1,N-1}\right) ^{N-k}=&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=k|X=1\right) =\frac{1}{N-1}\binom{N}{k}\left(p_{1,0,N-1}\right) ^{k}\left( 1-p_{1,0,N-1}\right) ^{N-k}+\frac{N-2}{N-1}\binom{N}{k}\left( p_{1,1,N-1}\right) ^{k}\left( 1-p_{1,1,N-1}\right) ^{N-k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is pretty well defined, so we can also compute the covariance of these two actual random variables. Let us start with the expectations...&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ X\right] =\frac{N-1}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ X\right] =\sum_{x=0,1}x\mathbb{P}\left( X=x\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\mathbb{P}\left( X=1\right) = \frac{N-1}{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For symmetry reasons...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ Y\right] =1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ XY\right] = \frac{\left( N-2\right) \alpha +\left( N-1\right) \beta }{\left(N-2\right) \alpha +N\beta }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ XY\right] =\sum_{x=0,1}\sum_{y=0}^{N}xy\mathbb{P}\left(X=x,Y=y\right) \text{ (because }xy=0\text{ if either }x=0\text{ or }y=0\text{)} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{y=0}^{N}y\mathbb{P}\left( X=1,Y=y\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{k=0}^{N}y\mathbb{P}\left( X=1\right) \mathbb{P}\left(Y=k|X=1\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{N-1}{N}\sum_{k=0}^{N}\left[ \frac{1}{N-1}k\binom{N}{k}\left(p_{1,0,N-1}\right) ^{k}\left( 1-p_{1,0,N-1}\right) ^{N-k}+\frac{N-2}{N-1}k\binom{N}{k}\left( p_{1,1,N-1}\right) ^{k}\left( 1-p_{1,1,N-1}\right) ^{N-k}\right] &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=p_{1,0,N-1}+\left( N-2\right) p_{1,1,N-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{\beta }{\left( N-2\right) \alpha +N\beta }+\left( N-2\right) \frac{\alpha +\beta }{\left( N-2\right) \alpha +N\beta }= &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{\left( N-2\right) \alpha +\left( N-1\right) \beta }{\left(N-2\right) \alpha +N\beta }&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Cov\left( X,Y\right) =\mathbb{E}\left[ XY\right] -\mathbb{E}\left[ X\right] \mathbb{E}\left[ Y\right] =\frac{\left( N-2\right) \alpha +\left( N-1\right)\beta }{\left( N-2\right) \alpha +N\beta }-\frac{N-1}{N} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Comparing the two covariances == &lt;br /&gt;
&lt;br /&gt;
If we compare these two covariances, for instance for &amp;lt;math&amp;gt;\beta =0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\alpha =1&amp;lt;/math&amp;gt;, then in the first case &amp;lt;math&amp;gt;Cov(X,Y) =-1/N&amp;lt;/math&amp;gt;, while in the second case &amp;lt;math&amp;gt;Cov( X,Y) =+1/N&amp;lt;/math&amp;gt;. This should not feel strange; it is a coordination game, and if everyone plays &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, then playing &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is a bad idea, but if everyone else plays &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; too, then playing &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is  a good idea. The model covariance is therefore not constant, and changes with the frequency of strategy &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== The Price equation for this very simple model ==&lt;br /&gt;
&lt;br /&gt;
Here we have a nested sampling procedure; you can choose a starting point (by clicking on each individual in the parent population), keep it fixed, and draw a few transitions. Then change your starting point, and draw a few transitions from there. You will notice that the Price equation varies with every transition, along with the ''likelyhood'' of the different transitions that depend on the initial population.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;java_applet code=&amp;quot;tutorial3.Tutorial3.class&amp;quot;  height=&amp;quot;480&amp;quot; width=&amp;quot;600&amp;quot; archive=&amp;quot;Price.jar&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What would a proper probability theorist do? == &lt;br /&gt;
&lt;br /&gt;
Try to figure out the transition probabilities for the suggested model as a function of the current state. It seems that Nowak, Liebermann, Ohtsuki and Tarnita are a proper probability theorists, because that is what they did already.&lt;br /&gt;
&lt;br /&gt;
== What would a proper statistician do? ==&lt;br /&gt;
&lt;br /&gt;
Sample often for different starting points. Fit data to the model, estimate &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta &amp;lt;/math&amp;gt;. Test if the payoff matrix is as assumed.&lt;br /&gt;
&lt;br /&gt;
==  So how does the Price equation help here? ==&lt;br /&gt;
&lt;br /&gt;
Not. Can't think of anything remotely useful about the Price equation. The extra problem here is the frequency dependence. Sometimes this is referred&lt;br /&gt;
to as the problem that the Price Equation is not dynamically sufficient. That is a step in the right direction, but still inaccurate, because it only describes one of the symptoms, and not the cause. It is the ''model'' we have here that gives us, after a bit of computing, the transition probabilities for all  frequencies of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, and thereby all properties of the dynamical system. The ''models'' in versions 1.0 and 2.0 just concerned transitions leaving from one given starting point. A ''model'' can therefore be described as dynamically sufficient or insufficient. Because the Price equation can only deal with one step at at time, it tends to inspire people to think of implicit assumptions that pertain to dynamically insufficient models. That, however, does not mean that the Price Equation cannot be used in combination with a dynamically sufficient model. It can; as shown in the applet above. But the question is: used for what? And the answer is: for nothing.&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:39:52 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price_3.0</comments>		</item>
		<item>
			<title>Price 2.0</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price_2.0</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
[[Price | Go to the front-page of Price equation tutorials ]]&lt;br /&gt;
&lt;br /&gt;
== A model with sexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
If we add sexual reproduction, everything gets slightly more complicated, the proper statistics as well as the Price equation. This makes&lt;br /&gt;
the statistics much more fun, and it makes the failure of the Price equation to be of any help even more salient. We like to keep it relatively simple&lt;br /&gt;
though, so for the moment we do not assume actual different sexes, but we do assume that every individual is diploid. That means that individuals can be ''AA'', ''Aa'' or ''aa''. The frequency of the gene is then, resp., ''1'', ''1/2'' or ''0''. Individuals are hermaphrodites for the sake of simplicity.&lt;br /&gt;
&lt;br /&gt;
Suppose that we have a population of 4 individuals, &amp;lt;math&amp;gt;q_{1}=1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q_{2}=q_{3}=1/2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q_{4}=0&amp;lt;/math&amp;gt;. The next generation of 4 individuals is drawn as follows. First we draw a father for the first individual. From the father we draw one of the two loci, which gives us an ''A'' or an ''a''. Then we draw a mother, and one of her loci. These two loci go into the gametes for reproduction, that together give us the first individual of the offspring generation. Three repetitions of this procedure give us a whole new generation.&lt;br /&gt;
&lt;br /&gt;
We will make two crucial assumptions here.&lt;br /&gt;
&lt;br /&gt;
1) ''A'' is not dominant nor recessive in fitness terms&lt;br /&gt;
&lt;br /&gt;
2) Fair meosis&lt;br /&gt;
&lt;br /&gt;
Both assumptions concern probabilities in this update step. The first concerns the probabilities with which an individual is chosen for parenthood. We assume that the probability with which individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is chosen is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{P}\left( i\text{ is chosen}\right) =\frac{\alpha q_{i}+\beta }{\sum_{j=1}^{n}\left( \alpha q_{j}+\beta \right) } &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With our starting point, &amp;lt;math&amp;gt;q_{1}=1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q_{2}=q_{3}=1/2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;q_{4}=0&amp;lt;/math&amp;gt;. which  gives us the following probabilities...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;p_{1} =\mathbb{P}\left( 1\text{ is chosen}\right) =\frac{\alpha +\beta }{2\alpha +4\beta } &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;p_{\frac{1}{2}} =\mathbb{P}\left( 2\text{ is chosen}\right) =\frac{\frac{1}{2}\alpha +\beta }{2\alpha +4\beta } &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;p_{\frac{1}{2}} =\mathbb{P}\left( 3\text{ is chosen}\right) =\frac{\frac{1}{2}\alpha +\beta }{2\alpha +4\beta } &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;p_{0} =\mathbb{P}\left( 4\text{ is chosen}\right) =\frac{\beta }{2\alpha+4\beta }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These formulas tells us that Assumption 1) is equivalent to saying that &amp;lt;math&amp;gt;p_{\frac{1}{2}}&amp;lt;/math&amp;gt; is the average of &amp;lt;math&amp;gt;p_{1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;p_{0}&amp;lt;/math&amp;gt;. The second assumption just means that the probability of either locus of the parent to be chosen for passing on is 1/2.&lt;br /&gt;
&lt;br /&gt;
Again, we first draw one of the individuals from the parent population (this is a hypothetical random variable that has nothing to do with the actual&lt;br /&gt;
transition) and then draw the next generation (this is the actual random thing that happens in the the transition). The random variable &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; is again defined as the genotype of the parent. For our given starting point, that is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( X=1\right) =\mathbb{P}\left( X=0\right) =\frac{1}{4}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathbb{P}\left( X=\frac{1}{2}\right) =\frac{1}{2}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Then we define the random variable &amp;lt;math&amp;gt;Y&amp;lt;/math&amp;gt; as the number of successful  gametes that this parent produces. This is a slightly more  omplicated random variable, because we need to draw 8 parents for 4 offspring and because the chances depend on which of the four the (candidate) parent is that was drawn in step 1. So we get a pretty long list of conditional probabilities.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=k|X=0\right) =\binom{8}{k}\left( p_{0}\right)^{k}\left( 1-p_{0}\right) ^{8-k},\ k=1,..,8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=k|X=\frac{1}{2}\right) =\binom{8}{k}\left( p_{\frac{1}{2}}\right) ^{k}\left( 1-p_{\frac{1}{2}}\right) ^{8-k},\ \ k=1,..,8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=k|X=1\right) =\binom{8}{k}\left( p_{1}\right)^{k}\left( 1-p_{1}\right) ^{8-k},\ \ k=1,..,8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is well defined again, so we can also compute the covariance of these two actual random variables. Let us start with expectations...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ X\right] =\frac{1}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ X\right] =\sum_{x=0,\frac{1}{2},1}x\mathbb{P}\left(X=x\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{2}\mathbb{P}\left( X=\frac{1}{2}\right) +\mathbb{P}\left(X=1\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{2}\cdot \frac{1}{2}+\frac{1}{4}=\frac{1}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For symmetry reasons (the total number of succesful gametes is 8, and either of the 4 could be the parent)...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ Y\right] =2 &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ Y\right] = \sum_{x=0,\frac{1}{2},1}\sum_{y=0}^{8}y\mathbb{P}\left( X=x,Y=y\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{x=0,\frac{1}{2},1}\sum_{k=0}^{8}k\mathbb{P}\left( X=x\right)  \mathbb{P}\left( Y=k|X=x\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{k=0}^{8}k\cdot \frac{1}{4}\cdot \binom{8}{k}\left( p_{0}\right) ^{k}\left( 1-p_{0}\right) ^{8-k}+\sum_{k=0}^{8}k\cdot \frac{1}{2}\cdot \binom{8}{k}\left( p_{\frac{1}{2}}\right) ^{k}\left( 1-p_{\frac{1}{2}}\right) ^{8-k}+\sum_{k=0}^{8}k\cdot \frac{1}{4}\cdot \binom{8}{k}\left(p_{1}\right) ^{k}\left( 1-p_{1}\right) ^{8-k} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{4}\sum_{k=0}^{8}k\binom{8}{k}\left( p_{0}\right) ^{k}\left(1-p_{0}\right) ^{8-k}+\frac{1}{2}\sum_{k=0}^{8}k\binom{8}{k}\left( p_{\frac{1}{2}}\right) ^{k}\left( 1-p_{\frac{1}{2}}\right) ^{8-k}+\frac{1}{4}\sum_{k=0}^{8}k\binom{8}{k}\left( p_{1}\right) ^{k}\left( 1-p_{1}\right)^{8-k} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{4}\cdot 8p_{0}+\frac{1}{2}\cdot 8p_{\frac{1}{2}}+\frac{1}{4}\cdot 8p_{1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=2p_{0}+4p_{\frac{1}{2}}+2p_{1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{4\alpha +8\beta }{2\alpha +4\beta }=2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ XY\right] ==\frac{3\alpha +4\beta }{2\alpha +4\beta }&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ XY\right] =\sum_{x=0,\frac{1}{2},1}\sum_{y=0}^{8}xy\mathbb{P}\left( X=x,Y=y\right) \text{ (because }xy=0\text{ if either }x=0\text{ or }y=0\text{)} &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{x=\frac{1}{2},1}\sum_{k=0}^{8}xk\mathbb{P}\left( X=x\right) \mathbb{P}\left( Y=k|X=x\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{k=0}^{8}\frac{1}{2}\cdot k\cdot \frac{1}{2}\cdot \binom{8}{k}\left( p_{\frac{1}{2}}\right) ^{k}\left( 1-p_{\frac{1}{2}}\right)^{8-k}+\sum_{k=0}^{8}1\cdot k\cdot \frac{1}{4}\cdot \binom{8}{k}\left(p_{1}\right) ^{k}\left( 1-p_{1}\right) ^{8-k} &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{4}\sum_{k=0}^{8}k\binom{8}{k}\left( p_{\frac{1}{2}}\right)^{k}\left( 1-p_{\frac{1}{2}}\right) ^{8-k}+\frac{1}{4}\sum_{k=0}^{8}k\binom{8}{k}\left( p_{1}\right) ^{k}\left( 1-p_{1}\right) ^{8-k} &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{1}{4}\cdot 8p_{\frac{1}{2}}+\frac{1}{4}\cdot 8p_{1} &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=2\left( p_{\frac{1}{2}}+p_{1}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{3\alpha +4\beta }{2\alpha +4\beta }&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The covariance of these two random variables is therefore...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Cov\left( X,Y\right) =\mathbb{E}\left[ XY\right] -\mathbb{E}\left[ X\right] \mathbb{E}\left[ Y\right] =2\left( p_{\frac{1}{2}}+p_{1}\right) -1=\frac{3\alpha +4\beta }{2\alpha +4\beta }-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Price equation for this slightly less simple model ==&lt;br /&gt;
&lt;br /&gt;
Interesting questions would be: is it good to have this gene? In this case, a first check in search of an answer would be: &lt;br /&gt;
&lt;br /&gt;
is &amp;lt;math&amp;gt;\frac{3\alpha +4\beta }{2\alpha +4\beta }&amp;gt;1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in other words, is &amp;lt;math&amp;gt;\alpha &amp;gt;0 &amp;lt;/math&amp;gt;, which, as long as we remain within the setting of this model, is equivalent to  &amp;lt;math&amp;gt;Cov\left( X,Y\right) &amp;gt;0 &amp;lt;/math&amp;gt;. This however is only a first check, and below we will see that the answer can come in a riot of colours and flavours, especially if we are not really sure after all if the model describes reality accurately. But first we will look at what the Price equation makes of all this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With this model, the Price equation looks pretty much like the one Price formulated in his original paper. It is an identity. The frequency of the gene in the parent population is, in general, defined as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Q_{1}=\frac{1}{N} \sum_{i}q_{i}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of individuals, and &amp;lt;math&amp;gt;q_{i}&amp;lt;/math&amp;gt; is the frequency of the gene in individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;. So here that is &amp;lt;math&amp;gt;Q_{1}=1/2&amp;lt;/math&amp;gt;. The frequency of the gene in the offspring population is...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Q_{2}=\frac{\sum_{i=1}^{N}z_{i}q_{i}^{\prime }}{\sum_{i=1}^{N}z_{i}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This differs from the Price Equation 1.0, because of the locus-drawing step. Therefore we have $q_{i}^{\prime }$, which is the frequency of the gene in the set of successful gametes produced by individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;. In the [Price_1.0 | Price Equation 1.0] this was by definition equal to the frequency &amp;lt;math&amp;gt;q_{i}&amp;lt;/math&amp;gt; of the gene in the parent, but because there is a random step involved here, this is no longer the case. Of course  &amp;lt;math&amp;gt;z_{i}&amp;lt;/math&amp;gt; is still the number of times individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; in the parent population was drawn for reproduction. The Price equation for this model is then is the following identity:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\triangle Q=Q_{2}-Q_{1}=\frac{N}{\sum_{i}z_{i}}\left[ \frac{\sum_{i}z_{i}q_{i}}{N}-\left( \frac{\sum_{i}z_{i}}{N}\right) \left( \frac{\sum_{i}q_{i}}{N}\right) \right] +\frac{\sum_{i}z_{i}\left( q_{i}^{\prime}-q_{i}\right) }{\sum_{i}z_{i}} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;Q_{2}-Q_{1} =\frac{\sum_{i}z_{i}q_{i}^{\prime }}{\sum_{i}z_{i}}-\frac{1}{N}\sum_{i}q_{i} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{\sum_{i}z_{i}q_{i}}{\sum_{i}z_{i}}+\frac{\sum_{i}z_{i}\left(q_{i}^{\prime }-q_{i}\right) }{\sum_{i}z_{i}}-\frac{1}{N}\sum_{i}q_{i} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{\sum_{i}z_{i}q_{i}+\frac{1}{N}\sum_{i}z_{i}\sum_{i}q_{i}-\frac{1}{N}\sum_{i}z_{i}\sum_{i}q_{i}}{\sum_{i}z_{i}}+\frac{\sum_{i}z_{i}\left(q_{i}^{\prime }-q_{i}\right) }{\sum_{i}z_{i}}-\frac{1}{N}\sum_{i}q_{i} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=N\left[ \frac{\frac{1}{N}\sum_{i}z_{i}q_{i}-\left( \frac{1}{N}\sum_{i}z_{i}\right) \left( \frac{1}{N}\sum_{i}q_{i}\right) }{\sum_{i}z_{i}}\right] +\frac{\sum_{i}z_{i}\left( q_{i}^{\prime }-q_{i}\right) }{\sum_{i}z_{i}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{N}{\sum_{i}z_{i}}\left[ \frac{\sum_{i}z_{i}q_{i}}{N}-\left( \frac{\sum_{i}z_{i}}{N}\right) \left( \frac{\sum_{i}q_{i}}{N}\right) \right] +\frac{\sum_{i}z_{i}\left( q_{i}^{\prime }-q_{i}\right) }{\sum_{i}z_{i}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which in this particular model is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\triangle Q=\frac{1}{2}\left[ \frac{\sum_{i}z_{i}q_{i}}{4}-\frac{\sum_{i}q_{i}}{2}\right] +\frac{\sum_{i}z_{i}\left( q_{i}^{\prime}-q_{i}\right) }{8} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Confusion ==&lt;br /&gt;
&lt;br /&gt;
As before, it is unfortunate that George Price named the term between square brackets in this equation ''Cov(z,q)''. The claim of the Price equation - which we contend even more now - is that the equation unveils that a change in frequency - &amp;lt;math&amp;gt;\triangle Q&amp;lt;/math&amp;gt; - is explained by the covariance between having the gene and the number of offspring - ''Cov(z,q)''. &lt;br /&gt;
&lt;br /&gt;
Two issues remain. One is that now there is another term on the right hand side. In the Price equation literature, this term tends to be crossed off, &amp;quot;because it will be 0 anyway&amp;quot;. This is not correct; it is typically non-zero, even if it is 0 ''in expectation''. The other issue is that &amp;quot;''Cov( z,q)''&amp;quot; is still not a covariance; it is not a constant property of a random variable, but it is a random variable itself, as it differs from draw to draw.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;java_applet code=&amp;quot;tutorial2.Tutorial2.class&amp;quot;  height=&amp;quot;480&amp;quot; width=&amp;quot;600&amp;quot; archive=&amp;quot;Price.jar&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you tried a few times, you may have found out that &amp;lt;math&amp;gt;\triangle Q&amp;lt;/math&amp;gt; can attain different values; the next generation is a random draw, which implies that the frequency &amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt; can go up or down by a variety of amounts. The right hand side just tags along with &amp;lt;math&amp;gt;\triangle Q&amp;lt;/math&amp;gt;. This can create an illusion of understanding, but whatever happens, the terms on the right hand side of the identity just change along with the outcome of the chance experiment. In other words: the data explain the data. Moreover, crossing of a term that typically is not 0 turns the identity into a false statement.&lt;br /&gt;
&lt;br /&gt;
== What would a proper probability theorist do? ==&lt;br /&gt;
&lt;br /&gt;
Try to figure out the dynamic properties of the suggested model. With the transition probabilities (see above) we can compute the expected change in frequency, and the fixation probability of ''A'' and ''a'' given the current state. Or given any starting state. &lt;br /&gt;
&lt;br /&gt;
Prove that the assumption of fair meiosis implies that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ \frac{\sum_{i}z_{i}\left( q_{i}^{\prime }-q_{i}\right) }{\sum_{i}z_{i}}\right] =0 &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All of this can be done without the Price equation. In fact, it is better done without, because the Price equation just does not fit the purpose.&lt;br /&gt;
&lt;br /&gt;
== What would a proper statistician do? ==&lt;br /&gt;
&lt;br /&gt;
A statistician would try to find out what the true model is, given data. That implies that she would:&lt;br /&gt;
&lt;br /&gt;
* Estimate &amp;lt;math&amp;gt;\alpha &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Test the assumption of fair meiosis&lt;br /&gt;
&lt;br /&gt;
For this test we need the meiosis term that is often discarded. Any test would involve this part of the formula, because if it remains far away from 0 even for large populations, that  wewould refute fair meiosis. So here is yet another reason why it would be just wrong to throw this quantity away, or just assume that it is 0.&lt;br /&gt;
&lt;br /&gt;
== So how does the Price equation help here? ==&lt;br /&gt;
&lt;br /&gt;
It doesn't. And it should worry Price Equationists that even with a relatively simple bit of modelling content, the Price equation is not of any use. Maybe things get better when the models are a bit more complicated? Well, no, of course not. As a matter of fact, things get even worse.&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:39:35 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price_2.0</comments>		</item>
		<item>
			<title>Price 1.0</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price_1.0</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
[[Price | Go to the front-page of Price equation tutorials ]]&lt;br /&gt;
&lt;br /&gt;
== A very simple model ==&lt;br /&gt;
&lt;br /&gt;
Suppose that we have a population of 2 individuals. We depart from a  population in which individual no 1 has &amp;quot;the&amp;quot; gene, while the other, individual no 2, does not. In Price equation terms, that means that the variable &amp;lt;math&amp;gt;q_{i}&amp;lt;/math&amp;gt;, which denotes the frequency of the gene in individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; becomes: &amp;lt;math&amp;gt;q_{1}=1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;q_{2}=0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The next generation of 2 individuals is drawn in a very simple way. First we draw the first, and then we draw the second. That makes it - for those who&lt;br /&gt;
care - a Wright-Fisher process. At both draws the new individual could be the offspring of individual no 1 or of individual no 2. Reproduction is asexual, hence the offspring is a perfect copy of its parent. Now here comes the important thing. We assume that at both draws, the probability of no 1 from the parent population -- the one with the gene -- to be drawn for reproduction is &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;, while the probability of no 2 from the parent population -- the one without the gene -- to be drawn for reproduction is &amp;lt;math&amp;gt;1-p&amp;lt;/math&amp;gt;. That gives us four possible transitions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:Price1Setting.jpg|400px|center|thumb|Four possible transitions]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What the new generation will be is a random variable. What the current generation is, is not; the current generation is simply given. We can however think of a hypothetical chance experiment such that, in combination with the actual random transition, we get two random variables, between which we can define a covariance. So here is the recipe. &lt;br /&gt;
&lt;br /&gt;
1) Draw one of the individuals from the parent population (this is the hypothetical random variable).&lt;br /&gt;
&lt;br /&gt;
2) Draw the next generation (this is the actual random thing that happens in the the transition).&lt;br /&gt;
&lt;br /&gt;
The random variable &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; is now defined as the genotype of the parent. That is a simple, albeit hypothetical random variable: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left(&lt;br /&gt;
X=1\right) =\mathbb{P}\left( X=0\right) =\frac{1}{2}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then we define the random variable &amp;lt;math&amp;gt;Y&amp;lt;/math&amp;gt;, which is the number of offspring that the parent that has been drawn begets. This is a slightly more complicated random variable, because the chances depend on which of the two the (candidate) parent is. So we get a (not too long) list of conditional probabilities. Worth working through!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=0 | X=0\right) =p^{2} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=1 | X=0\right) = 2p \left( 1-p\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathbb{P}\left( Y=2 | X=0\right) = \left( 1-p\right) ^{2} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The other conditional probabilities are the reverse,because the parent of a new individual is the one if it is not the other, and vice versa...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathbb{P}\left( Y=0|X=1\right) = \left( 1-p\right) ^{2} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=1|X=1\right) =2p\left( 1-p\right)  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{P}\left( Y=2|X=1\right) =p^{2} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The  &amp;lt;math&amp;gt;X &amp;lt;/math&amp;gt; and  &amp;lt;math&amp;gt;Y &amp;lt;/math&amp;gt; are pretty well defined, so we can also compute the covariance of these two actual random variables...&lt;br /&gt;
&lt;br /&gt;
Let us first look at expectations...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{E}\left[ X\right]=\frac{1}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ X\right] =\sum_{x=0,1}x\mathbb{P}\left( X=x\right) =\mathbb{P}\left( X=1\right) =\frac{1}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For obvious symmetry reasons; the total number of offspring is 2, and either one could be the parent, so ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ Y\right] =1&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ Y\right] =\sum_{x=0,1}\sum_{y=0,1,2}y\mathbb{P}\left( X=x,Y=y\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\sum_{y=1,2}\sum_{x=0,1}y\mathbb{P}\left( X=x\right) \mathbb{P}\left(Y=y|X=x\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; =1\cdot \left( \frac{1}{2}\cdot 2p\left( 1-p\right) +\frac{1}{2}\cdot 2p\left( 1-p\right) \right) +2\cdot \left( \frac{1}{2}\cdot p^{2}+\frac{1}{2}\cdot \left( 1-p\right) ^{2}\right) = 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ XY\right] = p &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ XY\right] =\sum_{x=0,1}\sum_{y=0,1,2}xy\mathbb{P}\left( X=x,Y=y\right)  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(because &amp;lt;math&amp;gt;xy=0&amp;lt;/math&amp;gt; if either &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;y=0&amp;lt;/math&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; =\sum_{x=1}\sum_{y=1,2}xy\mathbb{P}\left( X=x,Y=y\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; =1\cdot \mathbb{P}\left( X=1,Y=1\right) +2\cdot \mathbb{P}\left(X=1,Y=2\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; =1\cdot \mathbb{P}\left( X=1\right) \cdot \mathbb{P}\left(Y=1|X=1\right) +2\cdot \mathbb{P}\left( X=1\right) \mathbb{P}\left(Y=2|X=1\right) = &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; =1\cdot \frac{1}{2}\cdot 2p\left( 1-p\right) +2\cdot \frac{1}{2}\cdot p^{2}= &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=p\left( 1-p\right) +p^{2}= p&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The covariance is then...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Cov\left( X,Y\right) =\mathbb{E}\left[ XY\right] -\mathbb{E}\left[ X\right] &lt;br /&gt;
\mathbb{E}\left[ Y\right] =p-\frac{1}{2}\cdot 1=p-\frac{1}{2} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Price equation for this very simple model ==&lt;br /&gt;
&lt;br /&gt;
An interesting question would be: is it good to have the gene? &lt;br /&gt;
&lt;br /&gt;
Or, if we do statistics: suppose we know that the process has this form, but we  don't know the value of ''p''. Then the question becomes: is ''p&amp;gt;1/2'', or, equivalently, is ''Cov( X,Y) &amp;gt;0''. Below we will try to answer that question. But first we will look at what the Price equation does to all of this.&lt;br /&gt;
&lt;br /&gt;
For a given transition, the Price equation constitutes an identity. The frequency of the gene in the parent population is, in general, defined as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Q_{1}=\frac{1}{N}\sum_{i}q_{i}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the number of individuals, and &amp;lt;math&amp;gt;q_{i}&amp;lt;/math&amp;gt; is the frequency of the gene in individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; (For this particular model this quantity is 0.5).&lt;br /&gt;
&lt;br /&gt;
The frequency of the gene in the offspring population is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Q_{2}=\frac{\sum_{i=1}^{N}z_{i}q_{i}}{\sum_{i=1}^{N}z_{i}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;z_{i}&amp;lt;/math&amp;gt; is the number of times individual &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; in the parent population was drawn for reproduction. The Price equation 1.0 then is the following identity:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\triangle Q=Q_{2}-Q_{1}=\frac{N}{\sum_{i}z_{i}}\left[ \frac{\sum_{i}z_{i}q_{i}}{N}-\left( \frac{\sum_{i}z_{i}}{N}\right) \left( \frac{\sum_{i}q_{i}}{N}\right) \right] &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Q_{2}-Q_{1} =\frac{\sum_{i}z_{i}q_{i}}{\sum_{i}z_{i}}-\frac{1}{N}\sum_{i}q_{i} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{\sum_{i}z_{i}q_{i}+\frac{1}{N}\sum_{i}z_{i}\sum_{i}q_{i}-\frac{1}{N}\sum_{i}z_{i}\sum_{i}q_{i}}{\sum_{i}z_{i}}-\frac{1}{N}\sum_{i}q_{i} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=N\left[ \frac{\frac{1}{N}\sum_{i}z_{i}q_{i}-\left( \frac{1}{N}\sum_{i}z_{i}\right) \left( \frac{1}{N}\sum_{i}q_{i}\right) }{\sum_{i}z_{i}}\right] &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;=\frac{N}{\sum_{i}z_{i}}\left[ \frac{\sum_{i}z_{i}q_{i}}{N}-\left( \frac{\sum_{i}z_{i}}{N}\right) \left( \frac{\sum_{i}q_{i}}{N}\right) \right]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this simple case for N = 2 this amounts to &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\triangle Q=\left[ \frac{\sum_{i}z_{i}q_{i}}{2}-\frac{\sum_{i}q_{i}}{2}\right] &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Confusion ==&lt;br /&gt;
&lt;br /&gt;
The point where confusion starts, is that George Price named the right hand side of this equation ''Cov(z,q)''. The claim of the Price equation - which we contend - is that the equation unveils that a change in frequency - &amp;lt;math&amp;gt;\triangle Q&amp;lt;/math&amp;gt; - is explained by the covariance between having the gene and the number of offspring - ''Cov(z,q)''. The central issue here is that this ''Cov(z,q)'' is discussed as if it were a real covariance. Is that correct? &lt;br /&gt;
&lt;br /&gt;
Try yourself!&lt;br /&gt;
&amp;lt;java_applet code=&amp;quot;tutorial1.Tutorial1.class&amp;quot;  height=&amp;quot;400&amp;quot; width=&amp;quot;600&amp;quot; archive=&amp;quot;Price.jar&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you tried a few times, you may have found out that &amp;lt;math&amp;gt;\triangle Q&amp;lt;/math&amp;gt; can attain different values; the next generation is a random draw, which implies that the frequency ''Q'' can go up by 1/2, remain what it is, or go down by 1/2. The value of this so-called ''Covariance'' just follows that change in frequency (and because it is not a real covariance, we will use quotation marks from now on). This creates an illusion of understanding, because whatever happens, the covariance changes along with the outcome of the chance experiment. In other words: '''the data explain the data'''. &lt;br /&gt;
&lt;br /&gt;
This is, of course, not OK; the true and well-defined covariance is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Cov\left( X,Y\right) = p-\frac{1}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This does not depend on the realisation. Cov(X,Y) defines the properties of the chance experiment, and the realisation of this chance experiment defines &amp;quot;Cov(z,q)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==What would a proper probability theorist do?==&lt;br /&gt;
&lt;br /&gt;
Try to figure out the transition probabilities for the suggested model. It seems that you are a proper probability theorist, because that is what you just did.  Congrats!&lt;br /&gt;
&lt;br /&gt;
== What would a proper statistician do? ==&lt;br /&gt;
&lt;br /&gt;
If you are interested in statistics, which is only natural if you care for evolution, and you do not know the true model that generates the transitions, then you would want to try to answer the question what $p$ is. Is ''p&amp;gt;1/2''? Then having the gene is good for reproduction. Is ''p&amp;lt;1/2''? Then not. &lt;br /&gt;
&lt;br /&gt;
Is ''p=1/2''? Then it is good nor bad. So how do we find out? Well, the thing with statistics is that you will never find out for sure. All we can do is try to find ways to estimate this ''p'', or design tests on if and how ''p'' differs from ''1/2'', that will help us make statements about the true model with some confidence. Here are a few such statements.&lt;br /&gt;
&lt;br /&gt;
===Estimation of p===&lt;br /&gt;
&lt;br /&gt;
One of the reasons that so many are convinced of the value of the Price equation is that it ''almost'' hits the nail on the head (even though it misses the head completely). So here we go with what sometimes feels as an indication that the Price equation is not so wrong after all. If you sense this in yourself, just return to the interactive part above.&lt;br /&gt;
&lt;br /&gt;
If you draw a new generation, then that new generation comes with a &amp;quot;Cov(z,q)&amp;quot; . With probability &amp;lt;math&amp;gt;p^{2}&amp;lt;/math&amp;gt; you draw  two 1's, which implies  &amp;quot;Cov(z,q)&amp;quot;=+1/2. With probability &amp;lt;math&amp;gt;(1-p) ^{2}&amp;lt;/math&amp;gt; you draw  two 0's, which implies &amp;quot;Cov(z,q)&amp;quot;=-1/2. So&amp;quot;Cov(z,q)&amp;quot; is actually a random variable itself, the characteristics of which we can look at. Two natural characteristics are its expected value and its variance. Now the expectation of this so-called variance is, luckily,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ ^{\prime \prime }Cov\left( z,q\right) ^{\prime \prime }\right] =p-\frac{1}{2}. &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ ^{\prime \prime }Cov\left( z,q\right) ^{\prime \prime }\right] =\mathbb{E}\left[ \frac{\sum_{i}z_{i}q_{i}}{2}-\frac{\sum_{i}q_{i} }{2}\right] = &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
=\sum_{z_{1}=0,1,2}\left[ \frac{z_{1}q_{1}}{2}-\frac{q_{1}}{2}\right] &lt;br /&gt;
\mathbb{P}\left( Z_{1}=z_{1}\right) = &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
=-\frac{1}{2}\cdot \left( 1-p\right) ^{2}+0\cdot 2p\left( 1-p\right) +\frac{1}{2}\cdot p^{2}=p-\frac{1}{2}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the realisation varies quite a bit, as we have seen in interactive part above. This is reflected in the variance of &amp;quot;Cov(z,q)&amp;quot;;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Var\left[ ^{\prime \prime }Cov\left( z,q\right) ^{\prime \prime }\right] = \frac{1}{2}p\left( 1-p\right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;toggledisplay&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Var\left[ ^{\prime \prime }Cov\left( z,q\right) ^{\prime \prime }\right] =\mathbb{E}\left[ \left( ^{\prime \prime }Cov\left( z,q\right) ^{\prime&lt;br /&gt;
\prime }\right) ^{2}\right] -\mathbb{E}^{2}\left[ \left( ^{\prime \prime}Cov\left( z,q\right) ^{\prime \prime }\right) \right] =\frac{1}{2}p\left( 1-p\right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/toggledisplay&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This variance can be reduced though if we take a large sample. Suppose that we have individuals ''i=1,...,n'' with the gene, and individuals ''i=n+1,...,2n''&lt;br /&gt;
without it. Now we draw the next generation in the same way as before, which looks a bit more general; ''2n'' individuals are drawn, and at every draw&lt;br /&gt;
individual ''i'' has a probability with which it is drawn to reproduce. For ''i=1,...,n'' this probability is &amp;lt;math&amp;gt;\frac{p_{1}}{np_{1}+np_{0}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
For ''i=n+1,...,2n'' this probability is &amp;lt;math&amp;gt;\frac{p_{0}}{np_{1}+np_{0}}&amp;lt;/math&amp;gt;. For this transition, one can show that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[ \frac{\sum_{i=1}^{2n}z_{i}q_{i}}{2n}-\frac{\sum_{i=1}^{2n}q_{i}}{2n}\right] =p-\frac{1}{2} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\lim_{n\rightarrow \infty }Var\left[ \frac{\sum_{i=1}^{2n}z_{i}q_{i}}{2n}-\frac{\sum_{i=1}^{2n}q_{i}}{2n}\right] =0 &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we indeed define &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;^{\prime \prime }Cov\left( z,q\right)^{\prime \prime }&amp;lt;/math&amp;gt;  as &amp;lt;math&amp;gt;\frac{1}{2n}\left(\sum_{i=1}^{2n}z_{i}q_{i}- \sum_{i=1}^{2n}q_{i}\right) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;^{\prime\prime }Cov\left( z,q\right) ^{\prime \prime }+\frac{1}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is an unbiased estimator of ''p'' - because &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathbb{E}\left[ ^{\prime \prime }Cov\left( z,q\right) ^{\prime \prime }\right] =p-\frac{1}{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
The quantity &amp;lt;math&amp;gt;^{\prime\prime }Cov\left( z,q\right) ^{\prime \prime }&amp;lt;/math&amp;gt; is also regularly referred to as the ''sample'' covariance, which is not the true covariance (true covariance = fixed property of two random variables, sample covariance = itself a random variable).&lt;br /&gt;
&lt;br /&gt;
===Testing properties of p ===&lt;br /&gt;
&lt;br /&gt;
The ''sample'' covariance is typically also used as input for in tests of the type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
H_{0} : p=\frac{1}{2} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
H_{1} : p\neq \frac{1}{2}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== So how does the Price equation help here?== &lt;br /&gt;
&lt;br /&gt;
Not. For determining the properties of the model, the Price equation did not help, and in fact cannot even be of use. We found the transition&lt;br /&gt;
probabilities just by doing probability calculations. For doing statistics the Price equation did not help either. And yes, the Price equation applied to one actual draw does have the sample covariance of that draw in it, and the sample covariance is a useful thing, but we do not need the Price&lt;br /&gt;
equation for knowing that the sample covariance is useful. The sample covariance has been around forever; it was there well before George Price&lt;br /&gt;
was born, and it is used in parameter estmation and hypothesis testing in all other fields of science, where no one has ever heard of G.R. Price. And, most importantly, using the sample covariance is obviously not the same as using the Price equation. It is using the sample covariance.&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:39:17 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price_1.0</comments>		</item>
		<item>
			<title>Price</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Evolution is all about transitions. One generation gives birth to the next, which gives birth to yet another generation, in an endless chain of transitions. These transitions don't just go anywhere; some transitions are more likely than others. First of all do we beget offspring that is likely to bear some similarity with ourselves.  And how likely we are to get offspring at all, and how many, tends to depend on certain heritable characteristics. The relative likelihood of some transitions and the relative improbability of others imply that we can make informed guesses as to where this endless chain of transitions came from and where it is going. That is what the science of evolution does.&lt;br /&gt;
&lt;br /&gt;
The Price equation zooms in on transitions from one generation to the next. This suggests that it could be a fundamental tool for understanding this&lt;br /&gt;
process of evolution. It was formulated by George Richard Price in 1970 [http://www.nature.com/nature/journal/v227/n5257/abs/227520a0.html in an article in Nature], and acclaimed by some, maybe even quite a few researchers, to be a fundamental ingredient for models of evolution (link Gardner, Frank, Grafen). We think not. We think it is an unintended hoax. The reason why it is hard to identify it as such is that it is all about probability theory and statistics, and those two topics are just not that easy. The following tutorial will help by looking at what proper probability theory or statistics would do and compare that to what the Price equation does to numbers that represent those transitions. There is [http://dx.doi.org/10.1016/j.jtbi.2005.04.026 an article with the same message], but this tutorial makes it simpler, by allowing you to play around with models, data and samples yourself. At some points you may find that the steps the tutorial takes are evident and all too easy, but it is possible that after a few steps, as simple as they are, you may nonetheless feel confused enough to make you want to retrace your steps and be happy, the second time around, that they are that simple. Or not, in which case you will just have an easy journey to a deep understanding why the Price equation is not what some say it is. Enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Price 1.0: A very simple model ==&lt;br /&gt;
We will begin with the simplest real model that we can think of. No sex, no shrinking or expanding populations, no frequency dependence, no&lt;br /&gt;
complications whatsoever. Just two individuals that are ready to reproduce. Asexually. This gives us a version of the Price equation that is even&lt;br /&gt;
simpler than the first version by Price himself. And it will give us probability theory and statistics that is relatively nice and easy too, and therefore an excellent start that helps us get acquainted to the joys of rigour and precision.&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 2.0: A model with sexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
If we add sexual reproduction, everything gets slightly more complicated, the proper statistics as well as the Price equation. This makes&lt;br /&gt;
the statistics much more fun, and it makes the failure of the Price equation to be of any help even more salient. We like to keep it relatively simple though, so for the moment we do not assume actual different sexes, but we do assume that every individual is diploid&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 3.0: A model with frequency dependence ==&lt;br /&gt;
&lt;br /&gt;
We go back to the asexual model, but now we will take a model with frequency dependence. This will be a bit more complicated, but we can still use a basic, well known model. They are paired randomly, and play a game in those pairs. The game gives them payoffs according to a payoff matrix&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 Applet | Go straight to the software]]&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:38:14 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price</comments>		</item>
		<item>
			<title>Price</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Three simple models */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&lt;br /&gt;
= Introduction = &lt;br /&gt;
&lt;br /&gt;
Evolution is all about transitions. One generation gives birth to the next, which gives birth to yet another generation, in an endless chain of transitions. These transitions don't just go anywhere; some transitions are more likely than others. First of all do we beget offspring that is likely to bear some similarity with ourselves.  And how likely we are to get offspring at all, and how many, tends to depend on certain heritable characteristics. The relative likelihood of some transitions and the relative improbability of others imply that we can make informed guesses as to where this endless chain of transitions came from and where it is going. That is what the science of evolution does.&lt;br /&gt;
&lt;br /&gt;
The Price equation zooms in on transitions from one generation to the next. This suggests that it could be a fundamental tool for understanding this&lt;br /&gt;
process of evolution. It was formulated by George Richard Price in 1970 [http://www.nature.com/nature/journal/v227/n5257/abs/227520a0.html in an article in Nature], and acclaimed by some, maybe even quite a few researchers, to be a fundamental ingredient for models of evolution (link Gardner, Frank, Grafen). We think not. We think it is an unintended hoax. The reason why it is hard to identify it as such is that it is all about probability theory and statistics, and those two topics are just not that easy. The following tutorial will help by looking at what proper probability theory or statistics would do and compare that to what the Price equation does to numbers that represent those transitions. There is [http://dx.doi.org/10.1016/j.jtbi.2005.04.026 an article with the same message], but this tutorial makes it simpler, by allowing you to play around with models, data and samples yourself. At some points you may find that the steps the tutorial takes are evident and all too easy, but it is possible that after a few steps, as simple as they are, you may nonetheless feel confused enough to make you want to retrace your steps and be happy, the second time around, that they are that simple. Or not, in which case you will just have an easy journey to a deep understanding why the Price equation is not what some say it is. Enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Price 1.0: A very simple model ==&lt;br /&gt;
We will begin with the simplest real model that we can think of. No sex, no shrinking or expanding populations, no frequency dependence, no&lt;br /&gt;
complications whatsoever. Just two individuals that are ready to reproduce. Asexually. This gives us a version of the Price equation that is even&lt;br /&gt;
simpler than the first version by Price himself. And it will give us probability theory and statistics that is relatively nice and easy too, and therefore an excellent start that helps us get acquainted to the joys of rigour and precision.&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 1.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 2.0: A model with sexual reproduction ==&lt;br /&gt;
&lt;br /&gt;
If we add sexual reproduction, everything gets slightly more complicated, the proper statistics as well as the Price equation. This makes&lt;br /&gt;
the statistics much more fun, and it makes the failure of the Price equation to be of any help even more salient. We like to keep it relatively simple though, so for the moment we do not assume actual different sexes, but we do assume that every individual is diploid&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 2.0 Applet | Go straight to the software]]&lt;br /&gt;
&lt;br /&gt;
== Price 3.0: A model with frequency dependence ==&lt;br /&gt;
&lt;br /&gt;
We go back to the asexual model, but now we will take a model with frequency dependence. This will be a bit more complicated, but we can still use a basic, well known model. They are paired randomly, and play a game in those pairs. The game gives them payoffs according to a payoff matrix&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 | Go to the Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
[[Price 3.0 Applet | Go straight to the software]]&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:38:03 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price</comments>		</item>
		<item>
			<title>Category:Price equation</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Category:Price_equation</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;/* Using the price equation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using the price equation ==&lt;br /&gt;
&lt;br /&gt;
Tutorials ... and software....&lt;br /&gt;
&lt;br /&gt;
Go to [[Price | here ]] to start...&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:36:31 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Category_talk:Price_equation</comments>		</item>
		<item>
			<title>Category:Price equation</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Category:Price_equation</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;Created page with '== Using the price equation ==  Tutorials ... and software....  Go to [Price | here] to start...'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using the price equation ==&lt;br /&gt;
&lt;br /&gt;
Tutorials ... and software....&lt;br /&gt;
&lt;br /&gt;
Go to [Price | here] to start...&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:36:12 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Category_talk:Price_equation</comments>		</item>
		<item>
			<title>Price 3.0 Applet</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price_3.0_Applet</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&amp;lt;java_applet code=&amp;quot;tutorial3.Tutorial3.class&amp;quot;  height=&amp;quot;480&amp;quot; width=&amp;quot;600&amp;quot; archive=&amp;quot;Price.jar&amp;quot; /&amp;gt;&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:35:16 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price_3.0_Applet</comments>		</item>
		<item>
			<title>Price 2.0 Applet</title>
			<link>http://evolutionandgames.nl/wiki/index.php?title=Price_2.0_Applet</link>
			<description>&lt;p&gt;Julian.garcia:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Price equation]]&lt;br /&gt;
&amp;lt;java_applet code=&amp;quot;tutorial2.Tutorial2.class&amp;quot;  height=&amp;quot;480&amp;quot; width=&amp;quot;600&amp;quot; archive=&amp;quot;Price.jar&amp;quot; /&amp;gt;&lt;/div&gt;</description>
			<pubDate>Sat, 18 Sep 2010 22:34:59 GMT</pubDate>			<dc:creator>Julian.garcia</dc:creator>			<comments>http://evolutionandgames.nl/wiki/index.php?title=Talk:Price_2.0_Applet</comments>		</item>
	</channel>
</rss>