# Making Programmes & Evolutionary Game theory

## Recommended Posts

Hello Everybody;

Im back from my holiday now; but over it i was reading a very good book called 'It must be beautiful; Great Equations of modern Science', when I came over an interesting proposition whilst reading about evolutionary game theory. It was to create a porgramme to represent a hawk/ dove game described below;

A resource is available for a series of animals; Hawk, Dove, Retaliator, Bully.

These use different stratagies;

Hawk; Will always fight and wins 50% of the time, but this is minus the cost incurred.

Dove; Will never fight; and will loose against hawk with no cost, and can share resource with another dove with no cost.

Retaliator; Will fight if other animal will e.g. acts like a hawk against a hawk, and will not fight against somebody it can share resource with, e.g. dove, and will share at no cost.

Bully; Opposite of retaliator. Will win at no cost against animal which will not fight e.g. dove, but will not fight against animal that will fight.

The formulae matrix for the stratagies is shown below; V= Victory; C=Cost.

Meets Hawk Meets Dove Meets Retaliator Meets Bully

Pay off to hawk ½(v-c) V ½(v-c) V

Pay off to Dove 0 V/2 V/2 0

Pay off to Retaliator ½(v-c) V/2 V/2 V

Payoff to Bully 0 V 0 0

So my question is; how can i make a programme to simulate these (other than database spreadsheet etc.) Where I choose Cost and Victory values and see the value output for each animal? Or could anybody make on and give it to me and tell me how they made it please?

Thanks A lot

##### Share on other sites

Learn Javascript:

http://www.w3schools.com

## Create an account

Register a new account