AUTOMATIC TRANSLATION http://www.redcientifica.com/gaia/dp/p2_nor_i.htm
Index:
How To play to the Dilemma of the Prisoner
- Introduction
- The dilemma of the Prisoner Classic
- How to play to this game
- Examples of Player
- Grammar in Lex and Yacc
- To propose new rules
- A player indeed original
Introduction
This game is a analogy of other to the that all we play in the life real. It is try of to study different attitudes social (selfishness, altruism and cooperation) and to prove which they are strategies evolutivamente stable, which it is impose or disappear in a population. For this we will create "beings virtual" that it is will move in a "world virtual" it being behaved according to some rules that we we will be able to program. You can to participate in this game creating one of these "player virtual" with the rules that you wish.
Each player possess a value in points (money, energy, weight, fitness,...) and when it is find with other player, throw a "departure" between they, it being modified the weight of each one. Each player try of to obtain the maximum i number of points.
[ Back to Index ]
The dilemma of the Prisoner Classic
In the dilemma of the prisoner between two player, each player has two options possible: D: DEFRAUD
C: COOPERATEFor the that already habíais visitado this page before, is obvious that the grammar there is changed a little, more that nothing, before was in castilian and now it is in english, but i believe that it is understand ;-).
Each player not knows what option is going to to choose the other.
Exist four possibilities: that none defraud, that it make the two, that it make only the first, or that it make only the second. The points cattle in each case it is show in the following table:
If... ...then the player 1... and the player 2... the player 1 receive... and the player 2 receive... Co-operate Co-operate 3 3 Co-operate Defraud 0 5 Defraud Co-operate 5 0 Defraud Defraud 0 0
It is try of to obtain the greater number of points. The game puede it be played a or many times followed.We think that only it is plays a time. It better for a player in principle is always to co-operate:
If the other co-operate, is better to defraud (i i earn 5 and he 0, in time of to earn both 3).
If the other defraud, also is better to defraud (for to earn both 0, in time of to earn he 5 and i 0). Seem that the player good they will be those that always defraud.
Without embargo, we think now that the game it is repeats, and that exist several couples of player.
The player that it is devote to it be defrauded mutually earned both 0; in change player that co-operate mutually earned 3 without to cease. If the player they are capable of to recall it that they have fact its opponents, this information puede be very interesting for to decide the future actions.
[ Back to Index ]
How to play to this gameFor favor, read these procedures and the examples before of to play.
The admission of participating end the 1 of february of 1998.
Each participating (person) in the game puede to create one or several player virtual.
The player virtual created it is will put all together in a "soup of player". This soup is a program that it is it is developing in these moments. For now it is puede to advance that the progrma will admit the following varying:
- To play several departures all against all; for example, each player will play 100 departures followed with each one of the remaining player
- With the pretension of to simulate more faithfully the game of the prisoner in the life real, will exist the option of that the player it is move to the random for a flat. To the it be found two player, will play a "departure to the prisoner" and after will follow it being moved. The flat it will be able it is so large as it is wish, and it is they will be able to define several types of "barriers" creating thus maps of obstacles in the world virtual of player.
For to create a player is accurate to fill and to send this form. When it is close the admission of participating, will exist a file with the definitions of all the agents. Then it is will execute the program with that file, and each day it is will update the pages of this web with the state of the game.
A player it is defined for a series of rules that describe how is going to it be behaved front to other player. It normal they are player with some four rules, though they can be more. The maximum of rules for player is 50.
You can to create your own rules continuing the procedures of the grammar, or you can to use the same rules that appear in the examples for to create your own agents, or to modify them slightly.
A player born initially with 0 points, and procures but points according to this table.
If... ...then the player 1... and the player 2... the player 1 receive... and the player 2 receive... Co-operate Co-operate 3 3 Co-operate Defraud 0 5 Defraud Co-operate 5 0 Defraud Defraud 0 0
A player not is capable of to distinguish if it is playing against a player different each time, or always against the same. The player keep a report of the departures but not they are capable of it be distinguished between yes. For example, a player puede to have stored it following:
P = 9
I C D C D C C D C THE D D C C C D C D NP 1 2 3 4 5 6 7 8 9
NP: Number of Departure
P: Departure Current
To continuation it is show several examples of agents. It is recommend to read the examples, already that in they it is explain how to create agents.
[ Back to Index ]
Example 1: "always to co-operate"It is try of to co-operate always
BEGIN PLAYER
NAME=player_example_1
BEGIN RULE
CONDITION=ALWAYS
ACTION=COOPERATE
END RULE
END PLAYER
The spaces and tabulators they are optional, it is ignore.
The "NAME PLAYER" puede be any combination of numeros, letters and the simbolos "_" and "-", without spaces.
For favor, to put in the name of player something that you identify and you distinguishes of other player. This field is as a Key, Password or Pseudonym. Not pongais your name of battery without more, is better to add for example a number.
And for favor, that nobody put as name of player "player_example_1". You can to copy a player of the examples but debeis to change the name.
Other form of to make it same is:
BEGIN PLAYER
NAME=player_example_1
BEGIN RULE
PRIORITY=0
CONDITION=ALWAYS
ACTION=COOPERATE
END RULE
END PLAYER
To each rule it is to him puede to assign a priority. The priority is useful when exist several rules, and is possible that the condition it will be certain for more of a rule. In that case it is will execute the rule of priority more high (with the number more high). If it is give the case of that the priority more high the has more of a rule of the joint of the that they can it be fired, then the program will choose a to the random.
[ Back to Index ]
Example 2: "always to defraud"It is try of to defraud always
BEGIN PLAYER
NAME=player_example_2
BEGIN RULE
CONDITION=ALWAYS
ACTION=DEFRAUD
END RULE
END PLAYER
If it is fulfil the condition ALWAYS (always it is fulfil), then it is defraud
Other form of to make it same is:
BEGIN PLAYER
NAME=player_example_2
BEGIN RULE
CONDITION=ALWAYS
ACTION=DEFRAUD(100%)
END RULE
END PLAYER
If it is fulfil the condition ALWAYS (always it is fulfil), then it is defraud the 100% of the times
Other form of to make it same is:
BEGIN PLAYER
NAME=player_example_2
BEGIN RULE
CONDITION=ALWAYS
ACTION=COOPERATE(0%)
END RULE
END PLAYER
If it is fulfil the condition ALWAYS (always it is fulfil), then it is co-operate the 0% of the times, is to say, it is defraud always.
[ Back to Index ]
Example 3: "to co-operate and to defraud alternative"It is try of to co-operate and to defraud alternatively
BEGIN PLAYER
NAME=player_example_3
BEGIN RULE
PRIORITY=2
CONDITION=NP=MULTIPLE OF 2
ACTION=COOPERATE
END RULE
BEGIN RULE
PRIORITY=1
CONDITION=ALWAYS
ACTION=DEFRAUD
END RULE
END PLAYER
The first rule has greater priority that the second If the number of departure is multiplo of 2 (departures pars), it is co-operate The rest of the cases, it is defraud [ Back to Index ]
Example 4: "to co-operate the 47% of the times"It is try of to co-operate the 47% of the times and to defraud the rest
BEGIN PLAYER
NAME=player_example_4
BEGIN RULE
CONDITION=ALWAYS
ACTION=COOPERATE(47%)
END RULE
END PLAYER
The rule it is fulfil always, and consist in to co-operate 47 times of each hundred. For this it is generate a i number to the random of 1 to 100. If the i number is smaller or equal that 47, it is co-operate and in case opposite, it is defraud.
Other form of to make it same is:
BEGIN PLAYER
NAME=player_example_4
BEGIN RULE
PRIORITY=2
CONDITION=47%
ACTION=DEFRAUD
END RULE
BEGIN RULE
PRIORITY=1
CONDITION=ALWAYS
ACTION=COOPERATE
END RULE
END PLAYER
The first rule has greater priority that the second. For to know if it is fulfil the condition of the first rule, it is generate a number to the random of 1 to 100. If the i number is smaller or equal that 47, then the condition it is fulfil and it is execute the action, that is to defraud. If not it is fulfil, then it is analyze the other rule, that always it is fulfil and for so much it is co-operate.
[ Back to Index ]
Example 5: "Where the give the take"It is try of to co-operate the first time, and to repeat the last play of our opponent the rest of the departures.
BEGIN PLAYER
NAME=player_example_5
BEGIN RULE
PRIORITY=2
CONDITION=NP=1
ACTION=COOPERATE
END RULE
BEGIN RULE
PRIORITY=1
CONDITION=I HAVE YOU HAVE COOPERATE IN NP=P-1
ACTION=COOPERATE
END RULE
BEGIN RULE
PRIORITY=1
CONDITION=I HAVE YOU HAVE DEFRAUD IN NP=P-1
ACTION=DEFRAUD
END RULE
END PLAYER
If the departure is the first, it is co-operate. If the opposite ("THE") there is co-operated in the departure previous, is to say, in i number of departure equal to the departure current less one ("NP=P-1"), then it is co-operate If the opposite ("THE") there is defrauded in the departure previous, is to say, in i number of departure equal to the departure current less one ("NP=P-1"), then it is defraud [ Back to Index ]
Example 6: "Mixture of cooperative and take and daca"It is try of to co-operate the first time, and the rest of the departures it is makes: the 40% of the times it is co-operate, and the 60% remaining, it is co-operate alone if our opponent there is co-operated in its two you finish departures.
BEGIN PLAYER
NAME=player_example_6
BEGIN RULE
PRIORITY=4
CONDITION=NP=1
ACTION=COOPERATE
END RULE
BEGIN RULE
PRIORITY=3
CONDITION=40%
ACTION=COOPERATE
END RULE
BEGIN RULE
PRIORITY=2
CONDITION=I HAVE YOU HAVE COOPERATE IN NP=P-1 AND I HAVE YOU HAVE COOPERATE IN NP=P-2
ACTION=COOPERATE
END RULE
BEGIN RULE
PRIORITY=1
CONDITION=ALWAYS
ACTION=DEFRAUD
END RULE
END PLAYER
Rule 1: If the departure is the first, it is co-operate. Rule 2: It is generate a number to the random of 1 to 100. If the i number is smaller or equal that 40, then the condition it is fulfil and it is execute the action, that is to co-operate. If not it is fulfil, then it is analyze the rules 3 and 4. Rule 3: If the opposite ("THE") there is co-operated in the departure previous, is to say, in i number of departure equal to the departure current less one ("NP=P-1"), and in the previous to this ("NP=P-2"), then it is co-operate Rule 4: If not it is there is compliment no of the previous, it is defraud [ Back to Index ]
Example 7: "Rencoroso Total"It is try of to co-operate the first time and all the following (we suppose that they are 10) while the other also it make. If some time the opposite defraud, then from that moment it is defraud always.
BEGIN PLAYER
NAME=RENCOROSOTOTAL
BEGIN RULE
PRIORITY=3
CONDITION=NP=1
ACTION=COOPERATE
END RULE
BEGIN RULE
PRIORITY=1
CONDITION=ALWAYS
ACTION=COOPERATE
END RULE
BEGIN RULE
PRIORITY=2
CONDITION=I HAVE YOU HAVE DEFRAUD IN NP=P-1
ACTION=DEFRAUD
END RULE
BEGIN RULE
PRIORITY=2
CONDITION=I HAVE YOU HAVE DEFRAUD IN NP=P-2
ACTION=DEFRAUD
END RULE
BEGIN RULE
PRIORITY=2
CONDITION=I HAVE YOU HAVE DEFRAUD IN NP=P-3
ACTION=DEFRAUD
END RULE
BEGIN RULE
PRIORITY=2
CONDITION=I HAVE YOU HAVE DEFRAUD IN NP=P-4
ACTION=DEFRAUD
END RULE
BEGIN RULE
BEGIN RULE
PRIORITY=2
CONDITION=I HAVE YOU HAVE DEFRAUD IN NP=P-5
ACTION=DEFRAUD
END RULE
BEGIN RULE
PRIORITY=2
CONDITION=I HAVE YOU HAVE DEFRAUD IN NP=P-6
ACTION=DEFRAUD
END RULE
BEGIN RULE
PRIORITY=2
CONDITION=I HAVE YOU HAVE DEFRAUD IN NP=P-7
ACTION=DEFRAUD
END RULE
BEGIN RULE
PRIORITY=2
CONDITION=I HAVE YOU HAVE DEFRAUD IN NP=P-8
ACTION=DEFRAUD
END RULE
BEGIN RULE
PRIORITY=2
CONDITION=I HAVE YOU HAVE DEFRAUD IN NP=P-9
ACTION=DEFRAUD
END RULE
END PLAYER
[ Back to Index ]
The format of the rules is the following: (described segun Lex and Yacc)
Grammar in Lex and Yacc
This format puede to seem very complicated, but in reality is very simple. Of all forms, for to create your own rules puede be but easy guíarte for the examples, and not for this grammar.A player it is composes of rules player : "BEGIN PLAYER" "NAME=" IDENTIFICADOR rules "END PLAYER" ; Puede have a or more rules rules : rule | rule rules ; A rule has the form: "IF conditions THEN conclusion", and puede to have Furthermore a priority rule : "BEGIN RULE" listaCondiciones action "END RULE" | "BEGIN RULE" priority listaCondiciones action "END RULE" ; To each rule it is to him puede to assign a priority
for that in the case of power it be fired but of a rule,
it is execute the rule of priority but high. priority : "PRIORITY=" I NUMBER ; listaCondiciones: "CONDITION=" conditions ; Puede have a or more conditions separated for AND, or puede not have condition and the rule be certain always conditions : condicion | condicion "AND" conditions ; condicion : cond_the | cond_i | cond_np | "ALWAYS" | tantoPorCiento ; cond_the : "I HAVE YOU HAVE" play "IN NP=" departure ; cond_i : "I HAVE" play "IN NP=" departure ; cond_np : "NP=" departure | "NP=MULTIPLE OF" I NUMBER ; departure : I NUMBER | "P-" I NUMBER ; action : "Action:" play | "Action:" play "(" tantoPorCiento ")" ; play : "COOPERATE" | "DEFRAUD" ; tantoPorCiento : I NUMBER "%" ; [0-9]+ { return I NUMBER; } [To-Z-z0-9\_\-]+ { return IDENTIFICADOR; }[ Back to Index ]
To propose new rulesYou can to propose new rules not envisaged for the grammar and if is possible the we will include for to make the game more potent. Send your commentaries or suggestions to E-mail
[ Back to Index ]
A player indeed original
BEGIN PLAYER
NAME geos:player
BEGIN DEATH
CONDITION=NEVER
ACTION=ALWAYS
END DEATH
END PLAYER
[ Back to Index ]
[ To play Already! | ¿How To play? | Results of the Game ] [ Gaia Home Page | Game Home Page ] [ More information | Procedures of the first issue of the game | Results of the first issue of the game ] [ E-mail | E-mail ]
In Internet en
http://www.redcientifica.com/gaia/