<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
 
 

top page, english, japanese


Good intention and malicious intention on the social --

A rational strategy of the prisoner's dilemma is an open-and-shut case. And that had been giving lots of researchers gloom.
Due to folk theorem it's been known that "Cooperation" is the key to create a world of wealth. However, that seems to be realized under purposely designed condition in the real world. For an example, competitor companies realize goal through collaboration in order to get a larger market share and a larger circulation.

"A rotten apple spoils the barrel" as the saying goes, that's used for the human society though, is it always the truth? If it's not, what factor could be effective?

The famous tournament of Robert M. Axelrod polarized opinion.
It seems determinate criticism that the result depends on the initial values. However, Axelrod is a pioneer. Binmore recognized him for creating awareness it's important to select a specified equilibrium among countless equilibriums.



The software introduced at this page is a simulator of the iterated prisonner's dilemma.

Sixteen strategy patterns due to four bits codes do the arms race. Sixteen ones were not arbitrary selections but systematic samplings.

It has couple of observation rules which are reference data for the strategies.
As we will discuss in detail later, each individual player could observe opponent's forpassed cards or own memory of opponents' cards, or could evaluate opponent's strategy codes, opponent's stats of all forepassed cards, opponent's stats of ethical estimations of all forepassed cards. And each player would decide the card cooperation or denial due to own strategy pattern.
The observation rule is an abilitiy of each individual.

It adopts a geometric rule in order to meet and play with an opponent in random order. Each individual does game with a neighbor opponent selected in random. In case not founded, an individual would move to a random toward. And in case of both sides have a certain vital level they would do cross-reproduction.
In the initial phase, cause the world resource is affluence and plentiful, individuals would get bonus points just due to game and would procreate one after another. In this initial phase a random chance would make a large influence.

It's impossible to predict what equilibrium would be selected. It seems to be the sport of slight haphazards on such a systematic and superficial simulator. However the direction of the equilibrium selected would be exposed to view due what ability(the observation rule) would be given.

For ver.0.86, some additional rules were added. Those were supposed as metaphars of the social world. In each case, it's possible to choice or not.
One is dealing with between two of a kind. Individuals could do game or crossing in case of they have similarity of their genes, due to set a percentage of same bits of the gene.
Another is refusing to deal with, the rich refuses to deal with the weak. Individuals could not do game nor crossing in case of a large disparty, due to set the ratio of vital scores. However, an individual could copy the strategy(gene) of the rich in case of the ratio is in among certain ratios. That's the imitative learning. A reason of limitation of ratios is that the influence is few in case of too much disparty.

For ver.0.87 one observation rule was added. It's estimation of opponent's strategy codes which is named Rule-X preseted. It's just like an observational ability of opponent's real nature.
As for other observation rules which observe few forpassed cards, those do not include informations of opponents of that moment, it's impossible to know opponent's real nature.
In concrete, it just evaluates opponent's strategy codes which is also opponent's sign expression though, as a social simulation, it might be a kind of the inspiration.

For ver.0.88 further two observation rules were added. One Rule-Y refers opponent's stats of all forepassed cards. Another Rule-Z refers opponent's stats of ethical estimations of all forpassed cards.
Rule-Y observes the records of opponent's count of forepassed C-cards and count of forepassed D-cards, and evaluates the ratio of those. That's supposed to be an bureaucratic record.
Rule-Z observes the records of opponent's count of ethical behaviors and count of unethical behaviors, and evaluates the ratio of those. That's supposed to be an intuition, although I wonder what metaphor is such an insight.

What ability should be given for what equilibrium could be emerged? -- That's the keynote of the simulation and let us know how to emerge a wealth of the world.

Try to run it at first please.
 


 
iPDilemma, Iterated Prisonner's Dilemma Simulator
last updated on 7th January 2024 since 11th November 2003
Download ver.0.92.03 for Windows x86 -- it may be worked on Windows XP, 7, 8.x, 10 (32 bits)
Download ver.0.92.03 for Windows x64 -- it may be worked on Windows XP, 7, 8.x, 10 (64 bits)
 
Introduction
 
1. Process Summary
2. Rule and Strategy
3. Usage Summary
 
chapter1: Simulation
 
1-1. New Game
1-2. Counter Window
1-3. Start, Pause
1-4. Restore, Save
 
chapter2: Preference
 
2-1. CPU occupation
2-2. Gain
2-3. Mutation
2-4. World Resource
 
chapter3: Additional Rules
 
3-1. Affinity
3-2. Rich-Poor Gap
3-3. Imitative Learning
3-4. Exchange Observation Rule
 
chapter4: Latest Two Forepassed Cards
 
4-1. Observation Data of Rule-0 and Rule-1
4-2. Equilibrium and Structure
4-3. Samples
 
chapter5: Inspiration
 
5-1. Evaluation Method of Rule-X
5-2. Equilibrium and Structure
5-3. Samples
 
chapter6: Bureaucratic Records
 
6-1. Observation Data of Rule-Y
6-2. Equilibrium and Structure
6-3. Samples
 
chapter7: Intuition
 
7-1. Evaluation Method of Rule-Z
7-2. Equilibrium and Structure
7-3. Samples
 
chapter8: Advanced Settings
 
8-1. initial individuals percentage to niche
8-2. always deal with untill percentage to niche
8-3. one behavior max vital
8-4. required for crossing
8-5. newborn vital
8-6. newborn experience
8-7. dead line vital
8-8. opponent search count
8-9. void niche search count
8-a. max bonus in an initial
8-b. max bonus in a middle
 
chapter9: Predation Rotation (cherry on the cake)
 
9-1. Evaluation Method of Rule-XA
9-2. Equilibrium and Structure
9-3. Samples
 


Introduction


Sixteen strategies due to four bits codes do the arms race, mentioned at the front.
Each individual(player) would be born with a certain amount of vital, would select(meet) an opponent at random and would do the game. As that result, certain gain would be added to the vital. The individual would die case of the vital drained. In case of contacting between individuals both with relatively large vital, they don't game but procreate by crossing. That crossing point is random.
In case of crossing, four bits codes as its strategy codes is comparable to the gene. And the sign would be expressed by that codes. The offspring would have a similar codes of their parents. Its codes could be slight different codes due to mutation on low probability.
In case of no contacting in spite of searching neighbor niches, the individual would move at random. Slight vital would be spent for that move, and the individual would burn out the vital without contacting continuously. It needs more vital to develope a new area.

i.e. Each individual would do arms race due to the genetic algorithm with the game iterated prisonner's dilemma.

World resource is proportionate to total count of world niches. It's constant amount during a simulation. Grand total of sum of individuals' vital and remain of the world resource is always constant amount.
The gain of a game is a scramble for the world resource.
In an initial phase of the simulation remain of the world resource is very large, and there is a bonus points for just a game. With that, in an initial phase, almost individuals procreate a lots.
Of course that's at the initial phase only. The remaining would vanish away and an increase or decrease of vital of each individual would depend on only result of a game.

The gain as default values of a game bases on the prisonner's dilemma. A card is one of only two "Cooperation" or "Denial". That makes four patterns as cards combination.
It depends on five rules which refer to the observation data and respective strategies how to determin the card.
 



There are five rules as observation rules.
Rule-0 is an observation an opponent's forepassed latest two cards, Rule-1 is an observation own memory of latest two opponents' cards. Rule-X is an estimation of an opponent's strategy codes. Rule-Y is an estimation of an opponent's stats of all forepassed cards. Rule-Z is an estimation opponent's stats of ethical behaviors of all forepassed cards.

Due to those observation data, each individual exchanges its correspondence. Human does same as. Exchanging the response against opponents and exchanging the response due to the past received. The latter might be kinda childish.
Of course, as same as human, there are individuals never exchange its responces even what opponents or its past. For examples, an individual sends a card 'C'(Cooperate) only or 'D'(Denial) only, Former is called 'All-C' and latter is called 'All-D'. And there are peculier individuals responsed illogically to observation data. e.g. an individual sends a card 'C' against observation 'DD' and sends a card 'D' against observation 'CC'. It's might be called 'Perversity'.
Such character responces would be determined by each strategy codes.

Types of strategy codes are not arbitrary selections but systematic samplings which are exhaustive behaviors due to observation data. With that there are sixteen strategy codes.

Concrete patterns table as follows.
A right picture is a counter window expressed each sign and counts (TFT-Group and D-Group descents have a superiority). The observation data are four patterns 'CC', 'CD', 'DC' and 'DD'. Example, as for Rule-0 and Rule-1, its first character is a last but one card and second character is a previous card.

Observation Data and Strategy Cards(C: Cooperate, D: Denial)

CC CD DC DD name
codes 0000 C C C C All-C
codes 0001 C C C D Soft TFT
codes 0010 C C D C Major C
codes 0011 C C D D Slow TFT
codes 0100 C D C C Major C
codes 0101 C D C D TFT
codes 0110 C D D C Extream Favor
codes 0111 C D D D Hard TFT
codes 1000 D C C C Soft Perversity
codes 1001 D C C D Moderation Favor
codes 1010 D C D C Perversity
codes 1011 D C D D Major D
codes 1100 D D C C Slow Perversity
codes 1101 D D C D Major D
codes 1110 D D D C Hard Perversity
codes 1111 D D D D All-D
 



Sets up the rule and the world niches due to the menu 'New' pulldowned under 'Simulation'. And starts the simulation due to the menu 'Start'. It's possible to restore the simulation saved due to the menu 'Restore' and 'Save'.
Survival amounts of each individual are expressed in the counter window.

The New Simulation selects the rule and sets the size of the world niches.
There are five rules which are observation rules. Rule-0 is an observation opponent's forepassed records and Rule-1 is an observation own memory received by opponents, Rule-X is an estimation of an opponent's strategy codes, Rule-Y is an estimation of an opponent's stats of all forepassed cards, Rule-Z is an estimation of an opponent's stats of all forepassed ethical behaviors, those will be explained in depth later.
As for the size of the world niches, if the size is too large for the application window opened, an error message would be returned "the window is too small". In that case, set the window to be larger or re-set the size of the world niches to be smaller. That's detected for expression of a sign correctly adjudicated separately in X and Y axises. Size and propotion of a nich would be automatically adjusted.
With that new simulation, individuals amounted about 10 percentage of total niches would be plotted. Those locations would be random. Sixteen types individuals would be set as same amount as initial.

The simulation would start due to the menu 'Start', and would stop due to the menu 'Pause'.
The simulation on the way could be saved due to the menu 'Save' and it could be restored due to the menu 'Restore' in the case of paused condition.

Sets up CPU occupancy, game points, mutation probability and level of world resource due to the menu 'Preference'.
CPU occupancy is selected 'high' or 'low'. It might be good to select 'low' in the case of running background. Its expression could be out of work in the case of 'high' if it's wrong balance bandwidth between CPU and GPU. Also the bandwidth would be better in the case of closing the counter window.
Game points are equivalent to the jail time of the prisonner's dilemma, and those would be set plus or minus numerical values as game points.
Mutation probability might be good to be set small probability around 0.01 ~ 0.03. That mutates offspring's gene codes borned by crossing procreation from parents gene codes as strategy codes. i.e. That works same as mutation of the genetic algorithm.
Level of the world resource is 24 as default. That's an arbitrary value though, it's balanced level. A larger value makes world to be fertile and survival individuals would be in more. A smaller value makes world to be impoverished and survival individuals would be in less.
 




chapter1: Simulation


Sets up the rule and the size of the world niches. Sets up each numeral both of X and Y axises.

Selects one rule. There are five rules which are observation rules.
As for Rule-0, each individual observes two cards which current opponent played in past. As for Rule-1, each individual observes two cards which were received by forepassed opponents. Two cards are latest two cards in both of two rules. As for Rule-X, each individual observes an opponent's strategy codes and evaluates it as an ethical nature. As for Rule-Y, each individual evaluates an opponent's stats of all forepassed cards. As for Rule-Z, each individual evaluates an opponent's stats of all forepassed ethical behaviors.
Already mentioned in "Rule and Strategy", those observation data would be based on decision for card choice.

The world niches is sized by numbers of X and Y axises.
If the application window is too small for the size of world niches, an error message would be returned. In that case, set the window to be larger or re-set the size of the world niches to be smaller. That's detected for expression of a sign correctly adjudicated separately in X and Y axises. Size and propotion of a nich would be automatically adjusted.

With that new simulation, individuals amounted about 10 percentage of total niches would be plotted. Those locations would be random. Sixteen types individuals would be set as same amount as initial.
 



Due to open the counter window, all individuals amount of the moment are expressed. Also remaining of world resource and simulation elapsed time are expressed.

Right picture is occured shortly after setup a new simulation. Each individual is same amount as initial and is located at random.

The simulation would be running faster in case of closing the counter window.

Since ver.0.89.00, it's not existing in a right picture though, "cycle count" was added. That's counting cycle(round, circuit) of all individuals behave at once. Of course, cause there are death and birth, all individuals have not behaved the count expressed. It only means about cycle of snatchy whole.
 



The simulation begins to running due to the menu 'Start'.
 


The simulation stops due to the menu 'Pause'.




 



The simulation on the way could be saved due to the menu 'Save' and it could be restored due to the menu 'Restore' in the case of paused condition.
 


Right picture is occured shortly after restore a simulation data file which is located in a folder named "data" under the installation folder as a sample data file.
 




chapter 2: Preference


CPU occupancy is selected as 'high' or 'low'.

In the case of 'high', expression could be out of work if wrong balance bandwidth between CPU and GPU. That often happens on a business computer. In that case set 'low' the occupancy. But no worry on the gaming computer as an example.
Because the multi-threads though, those are synchronized and the simulation would be running on correctly in spite of the expression.

Also it might be better to set 'low' in case of sharing resources in the background simulating as an example.
 



Sets gain values which are equivalent to jail times of the prisonner's dilemma. Two individuals play a card as 'Cooperate' or 'Denial'. That makes four patterns as total.

As for the original prisonner's dilemma, jail times are as following table. The points as gain values made replacement are arbitrary. In both of cases it's same as the 'Denial' is of advantage for only one game.

jail time points
C against C 1 4
C against D 3 -7
D against C 0 7
D against D 2 -4
 



Sets probability of the mutation.

In case of contacting between individuals both with relatively large vital, they don't do game but procreate by crossing. In that case four bits codes as its strategy codes is comparable to the gene. And the sign would be expressed by that codes. The offspring would have a similar codes of their parents. The offspring codes could be slight different codes due to mutation.

That's equal to the genetic algorithm
The algorithm would create a gene which is optimized and is dominance and would win the arms race. The probability value might be good to be set around 0.01 ~ 0.03.
 



Sets the level of the world resource.

The default value is 24. That's an arbitrary value though, but good balanced value in guessing. A larger value makes world to be fertile and survival individuals would be in more. A smaller value makes world to be impoverished and survival individuals would be in less.

Due to too much value or too less value, it's possible that the world would be filled with individuals or would be filled with void niches. And those have a possibility to give troubles to the simulation.
 




chapter 3: Additional Rules


This function makes limitation about dealing.
Dealing with between two of a kind. Individuals could do game or crossing in case of they have similarity of their genes, due to set a percentage of same bits of the gene.
However, the affinity is not based on characteristic similarity but just similarity of gene.
 



The rich refuses to deal with the weak. Individuals could not do game nor crossing in case of a large disparty, due to set the ratio of vital scores.
 



An individual could copy the strategy(gene) of the rich in case of the ratio is in among certain ratios. That's the imitative learning. A reason of limitation of ratios is that the influence is few in cases of too few disparty and too much disparty.
And, the probability of the imitative learning could be set. Because it's nor realistic that the imitative learning would always be done under the condition.
 



The observation rule could be exchanged in a middle of the simulation. There is no problem about the observation data cause the data needed for all rules are recorded under each rule.
 




chapter 4: Latest Two Forepassed Cards


The observation data would be two latest forepassed cards. As for Rule-0, an individual could refer two cards which an opponent had played on its latest two games, previous card and last but one. As for Rule-1, an individual could refer two cards which two opponents had played on own latest two games.
(refer : Rules and Strategies)
The observation data would be four kinds which are CC and CD, DC, DD. C is Cooperation and D is Denial. The first card is a last but one, the second card is a previous card.
 



As for Rule-0 and Rule-1, the equilibrium would be a tug-of-war between TFT-Group and D-Group. It's hard to say which group (or which card) would be dominance.

Increase of C-Group spread is rare because C-Group would be exploiting group for D-Group. In an initial phase, C-Group become extinct because the vital points of C-Group with same C-Group is less than the vital points of D-Group with denial C-Group.
Especially in dominant of D-Group, the records of behaviors would be almost D-cards in the world. TFT-Group is resistant to D-Group though, in such a circumstance, TFT-Group become to choice D-card even if with same TFT-Group. Denial would be pervasive.

In case of the equilibrium in dominant TFT-Group, the vital points of C-card and C-card between TFT-Group and TFT-Group is rather than the vital points of D-card and D-card between D-Group and D-Group. That makes TFT-Group to be powerful and C-cards could be pervasive as the records of behaviors, and gives C-Group niches for alive. Cooperation could be pervasive under dominance of TFT-Group and C-Group. An equilibrium with fully cooperation could be stable.

As their direction, an equilibrium with C-cards pervaded due to TFT-Group under Rule-0 and an equilibrium with D-cards pervaded due to D-Group under Rule-1 are more likely to be selected.
 



A sample of an equilibrium with C-cards pervaded under Rule-0.
As a first picture, it's elpased three minutes and there is no dominance individual group. It might be characterized by that each individual group separates off as a cluster. As that result of the tug-of-war in guessing, TFT-Group become to be dominance and an equilibrium is emerged in which C-card goes around the world.
 
 


A sample of an equilibrium with D-cards pervaded under Rule-1.
As a first picture, it's elpased three minutes and there is no dominance individual group especially. But to mention one, D-Group has a superiority slightly over TFT-Group. After long cycles, D-Group and TFT-Group share the niches though, D-cards become pervasive as an actual condition.
 
 


 




chapter 5: Inspiration


The observation data would be an estimation result of opponent's strategy codes. The strategy codes is also a sign expression of each individual.
Normally strategy is a hidden nature, and this observation rule might be the inspiration (or intuition?). Just like the simulator, there might be social relations in which the nature would come to the surface. It might be a right simulation as a observation of the nature due to observe stats of opponent's all forepassed cards. (for an idea of later updates)

At first, estimation results of each sign(strategy codes) as a table. These estimation results would be treated as the observation results.
(refer : Rules and Strategies)

Sign and Estimation

estimation name
codes 0000 CC All-C
codes 0001 CC Soft TFT
codes 0010 CC(87%), CD(6%), DC(6%) Major C
codes 0011 CC(87%), CD(6%), DC(6%) Slow TFT
codes 0100 CC(93%), CD(3%), DC(3%) Major C
codes 0101 CC(93%), CD(3%), DC(3%) TFT
codes 0110 CC(87%), CD(6%), DC(6%) Extream Favor
codes 0111 CC(87%), CD(6%), DC(6%) Hard TFT
codes 1000 DD(87%), CD(6%), DC(6%) Soft Perversity
codes 1001 DD(87%), CD(6%), DC(6%) Moderation Favor
codes 1010 DD(93%), CD(3%), DC(3%) Perversity
codes 1011 DD(93%), CD(3%), DC(3%) Major D
codes 1100 DD(87%), CD(6%), DC(6%) Slow Perversity
codes 1101 DD(87%), CD(6%), DC(6%) Major D
codes 1110 DD Hard Perversity
codes 1111 DD All-D


Basically, all individuals which codes begin 1 (the first bit is one, 1xxx) would be estimated as 'DD'. And other individuals (0xxx) would be estimated as 'CC'.
The former select D-Card for the observation CC and could be argued that the group of individuals exploit good-natured fellows. Even if the Soft Perversity which selects C-Card for all other observations.
The latter could return a courtesy(C-Card) to the observation CC and could be argued that the group of individuals has an ethical nature.

In addition, the second bit and the third bit would be estimated to those two groups. In case of the former group (1xxx) with zero as those bits (10xx or 1x0x) would be given a probability to be estimated CD, DC except DD. In case of the latter group (0xxx) with one as those bits (01xx or 0x1x) would be given a probability to be estimated CD, DC except CC.
As for the second bit and the third bit, the second bit is lightly affected though that's almost no affected on the result of the simulation, even if in reverse these two bits. There are four individuals no affected by this estimation, All-C and SoftTFT are fixed to be estimated as CC, HardPerversity and All-D are fixed to be estimated as DD.

The fourth bit is not estimated daringly. This bit decides the card against DD, which is a focal bit whether an individual would be exploited due to C-card or would be tough due to D-card. However, simple comparisons cannot be made whether it's good or bad as an estimation. And let it left to the nature selection without estimation.

C Language codes as follows:
int signToEvaluationForRuleX(int sign)	// for Rule-X
{
	if(sign & 8) {
		if(!(sign & 6)) {
			if(!(sign & 2)) {
				if(mersenneTwister() < 0.1)
					return (3 - int(3.0 * mersenneTwister()));
			}
			if(mersenneTwister() < 0.1)
				return (3 - int(3.0 * mersenneTwister()));
		}
		return 3;
	} else {
		if(sign & 6) {
			if(sign & 2) {
				if(mersenneTwister() < 0.1)
					return int(3.0 * mersenneTwister());
			}
			if(mersenneTwister() < 0.1)
				return int(3.0 * mersenneTwister());
		}
		return 0;
	}

	return 0;			// CC
}
 



As for Rule-0 and Rule-1, two forepassed cards records are refered. Those are records which each individual impressed behaviors to the world. It might be a kind of return, for good or bad, to correspond to reference of the records.

As for Rule-X, opponent's nature(strategy) could be estimated in defiance of the records.

As for Rule-X, an initial phase would be almost a tug-of-war between TFT-Group and D-Group. But it's rare that C-Group group become extinct. Because TFT-Group could be powerfull. That gives C-Group niches for alive and refuse D-Group to increase.
TFT-Group choice D-card against D-Group, and choice C-card against TFT-Group and C-Group. That gives TFT-Group more vital points. Because each individual refers not records but nature of opponent.
 



Following pictures are simulations due to Rule-X. A first picture is a right after initializing. Its right picture is also an initial phase elpased couple of minutes and it's already under D-Group slight dominance. As for other pictures, TFT-Group became to be dominance with elpased time. That could argue it's the equilibrium full of cooperation. Count of each individual and elpased time are expressed in the counter window.
 
 
 


A next left picture is an equilibrium in which TFT-Group and D-Group share niches due to Rule-1. D-Group would be slightly dominance. A right picture is an equilibrium starting at this circumstance due to exchange the observation rule to Rule-X and TFT-Group become to be dominance.
D-card goes around under Rule-1, and C-card goes around the world after exchanging to Rule-X.
 
 


In an opposit way, due to start under Rule-X and exchange to under Rule-0, it's hard that D-card goes around the world. TFT-Group applies a break to that. Because TFT-Group refuses exploitation of D-card, and the points between C-card and C-card has an advantage for the tug-of-war of the world resouces.
That might be one of workings of a stabilized equilibrium which was Rock-In at once.
 
 




chapter 6: Bureaucratic Records


The observation data would be a stats of an opponent's all forepassed cards. That's sorted out four observation data as CC, CD, DC, DD.
(refer : Rules and Strategies)

Sorting and ratios of cards are as follows:
observation data .... ratio of C-cards
CC 75% above
DC 67% ~ 74%
CD 50% ~ 66%
DD under 49%

At the beginning of the simulation and new born individuals are given ten count cards record which are reasonable as their strategy codes(signs). If not, all individuals would be observed DD at the first game numerically. This is an adhoc method though.

As for All-C and All-D, their observation data would be fixed. CC for All-C, DD for All-D, cause All-C plays only C-card and All-D plays only D-card.

As for others, it's complexity. Their stats of cards depend on observation data of their neighbors' stats. i.e. That depends on the environment.
 



The equilibrium would be greatly affected by the chance of an initial phase. A dominant card could be one of both of C-card and D-card.
It's difficult to recognize the dominant card till the ascendant strategy codes(signs) would become strikingly apparent especially in the initial phase.
 
 
 



In this equilibrium, C-card became pervasive and TFT-Group had a superiority over D-Group. A left picture is an initial phase elpased ten minutes, in which TFT-Group already became dominant slightly.
 
 


In this equilibrium, D-card became pervasive and D-Group had a superiority over TFT-Group. A left picture is an initial phase elpased ten minutes, in which D-Group already became dominant slightly.
 
 


 




chapter 7: Intuition


The observation data would be a stats estimation of an opponent's all forepassed ethical behaviors. That's sorted out four observation data as CC, CD, DC, DD due to a ratio of ethical behaviors and unethical behaviors.
(refer : Rules and Strategies)

At first, methods of ethical estimation as follows:

A basis for estimation was set to be dealed with the possibility of intention and infection.
In a case of C-card, it could be considered there is a case deemed cooperation as just a good intention and there is a case deemed infection which helps a malicious intention, there is a case deemed a selfish motive which fosters a symbiotic relationship with themselves or a certain group.
In a case of D-card, it could be considered there is a case deemed denial as just a malicious intention and there is a case deemed countermove against malicious intention.

For exaples, C-card against All-D has an infection to help malicious intention and that's counted as an unethical behavior. D-card against All-D is deemed countermove against malicious intention and that's counted as an ethical behavior.
However, D-cards by All-D are always deemed to be based on malicious intention and all of them are counted as unethical behaviors. And so on, C-cards by All-C are always deemed to be based on good intention and all of them are counted as ethical behaviors.
As for other individuals, they have alternative strategies deemed intentions and those are evaluated ethical or unethical due to infections of their cards.


Like a C-Language Codes as follows:

	// four bits intenger, 0x0 ~ 0xf
	ownSign = own sign(strategy codes);
	oppSign = opponent's sign(strategy codes);
	
	// 0 : C-card, 1 : D-card
	ownCard = own card;
	oppCard = opponent's card;
	
	if(ownSign & 8) {
		// ownSign : D-Sys, Perversity-Sys, ModerationFavor
		if(ownCard)
			++(own unethical behaviors count);
		else
			++(own ethical behaviors count);
		if((oppSign & 1) && !(oppSign & 2)) {
			// oppSign : SoftTFT, HardTFT
			if(oppCard)
				++(opponent's ethical behaviors count);
			else
				++(opponent's unethical behaviors count);
		} else {
			if(oppCard)
				++(opponent's unethical behaviors count);
			else
				++(opponent's ethical behaviors count);
		}
	} else if((oppSign & 1) && !(oppSign & 2)) {
		// ownSign : SoftTFT, TFT
		if(oppSign & 8) {
			if(ownCard)
				++(own ethical behaviors count);
			else
				++(own unethical behaviors count);
		} else {
			if(ownCard)
				++(own unethical behaviors count);
			else
				++(own ethical behaviors count);
		}
		if(oppCard)
			++(opponent's unethical behaviors count);
		else
			++(opponent's ethical behaviors count);
	} else {
		// ownSign : AllC, MajorC, ExtreameFavor
		if(ownCard)
			++(own unethical behaviors count);
		else
			++(own ethical behaviors count);
		if(oppCard)
			++(opponent's unethical behaviors count);
		else
			++(opponent's ethical behaviors count);
	}
		

Sorting of the observation data and ratios of ethical and unethical behaviors are as follows:
observation data .... ratio of ethical behaviors
CC 75% above
DC 67% ~ 74%
CD 50% ~ 66%
DD under 49%

At the beginning of the simulation and new born individuals are given ten count cards record which are reasonable as their strategy codes(signs). If not, all individuals would be observed DD at the first game numerically. This is an adhoc method though.

As for All-C and All-D, their observation data would be fixed. CC for All-C, DD for All-D, cause All-C plays only C-card as an ethical behavior and All-D plays only D-card as an unethical behavior.

As for others, it's complexity. Their stats of cards depend on observation data of their neighbors' stats though, those estimations become to be different due to opponents' strategy codes(signs). As a direction, the momentum of recording ethical or unethical stats be reasonabled to their potentials of good and malicious intentions as their nature. At this point, that's different to Rule-Y.
 



The equilibrium would be affected by the chance of an initial phase. A dominant card could be one of both of C-card and D-card.
As a degree of certainly, in most of the simulations, individuals with momentum of ethical behavior (TFT, SoftTFT) become to be dominant and C-card become pervasive.
It's difficult to recognize the dominant card till the ascendant strategy codes(signs) would become strikingly apparent especially in the initial phase.
 



In this equilibrium, ethical behaviors became pervasive and TFT-Group had a superiority over D-Group. A left picture is an initial phase elpased three minutes, in which TFT-Group already became dominant slightly.
 
 
 


 




chapter 8: Advanced Settings

Following parameters could be changed due to menu "Adavanced Settings". Those are parameters which have an affect to consistency of the simulation. And so, cursory values make the simulation not only to be nonsensical but also to be hanged-up.

For an example, level of the world resource is 24 as default which could be exchanged in the Preference, which value is a resource for one niche.
If very small value for "dead line vital", it has possibility that too much individuals would be alived for number of niches.
And, inversely, if very large value for "dead line vital", it has possibility that all individuals would be dead.

Others, there are parameters which make the gain of the game to be deauthorized, almost parameters have drastic effects. In case of exchanging the parameters, it's better to grasp the working structure and to try to exchange a parameter point by point.

Those could be got back the values to initial values due to "reset to initial" button. For saving as default values, check "save as default" and push "Okay" button.
 




percentage of initial individuals to niche number.
Default ratio is ten percentage. It's might be better to set larger ratio because ten percentage is relatively dependent on the chance of the initial phase. In case of much individuals, it's lower probability that particular groups go around in the initial phase due to a random chance.
 



always deal with opponents untill individuals number increase the percentage to niche.
All individuals would do game or crossing with any opponent, regardless of the settings of the additional rules, untill individuals became to increase to this ratio to niches number.
Default ratio is fifteen percentage. In case under enable the additional rules, especially the ratio of individuals in the initial phase is low, if this ratio is too low it's possible that all individuals would be dead. Inversely, if this ratio is too high the settings of the additional rules would be nonsence.
 



Each individual pays out certain vital value for one behavior. Practically, mean of paying vital would be half of the value.
It costs for not only game and crossing but also for no behavior as a result. Less value makes individuals not to be ephemeral even if they continue to find no neighbors and continue to do no game. It might be good method for develope void area due to few individuals. Inversely, much value makes individuals to be ephemeral, and individuals got fewer points of the game would be quickly dead, it has possiblity that all individuals would be dead.
 



It's a vital value required for crossing as the parent. An individual and an opponent could procreate a child under case of both of them have more vital than this vital value. They pay a half of vital given to a newborn from own vital. i.e. This value must be more than the half value.
Less value makes to increase a case of crossing instead of doing game, and vital of each individual would be lower level. Occasion of the crossing would be increased though, ephemeral individuals would be increased too. Inversely, much value makes a momentum which individuals could procreate a child due to get much points of games.
 



It's a vital value which a newborn individual could have. That's given by parents. It must be under double value of the vital required for crossing.
 



It's an experience count which a newborn individual could be given. Please consider it as an influence of parents. As a default value '5', it's only Rule-Y and Rule-Z used though, if no count, each individual has no data of observation at first game.
It's might be good less count than default. Less count makes actual experiences to reflect to the observation data quickly. Inversely, much count it's hard to grow out of the innate data.
 



Each individual would be dead in case of under the vital value.
The default value is 24 which is set to be equal to the default value of the world resource level in the Preference. Less value makes individuals to be too much for niches number. Much value has possibility to makes all individuals to be dead.
 



It's a count that each individual search an opponent might be located at neighbor niche at random.
It's a behavior in case of trying to do game and crossing.
 



It's a count that each individual search an void niche might be located at neighbor at random.
It's a behavior in case of trying to move.
 



It's a maximum bonus points due to just do a game in an initial phase.
The initial phase as this case is a condition which individuals number is not so much and the world resource is more than enough. Actually, mean of the bonus points would be about half of this maximum value.
Less value delays individuals to increase in the initial phase. That makes the game points to be strongly affected for increasing in the initial phase though, it has possiblity that all individuals would be dead. Inversely, much value makes individuals to explode in the initial phase though, the game points would be lightly affected and ascendant individual groups might be determined due to a random chance.
 



After the initial phase, i.e. in a middle, it's a maximum bonus points due to just do a game. As a matter of fact, it's a bonus points for control balance of the world resource residual.
In a middle, the world resource is not more than enough which is ajusted not to be minor. In case of the world resource residual would be under certain level, the bonus points could be minor points. Mean of absolute value of the bonus points would be about half of this maximum value.
Much value makes the game points to be lightly affected and random chances began to determine the ascendant individual groups. Of course, there is a direction that individual groups which gets more game points became to be in the ascendant in elpased long cycles, cause the bonus points has just random fluctuations.
 




chapter 9: Predation Rotation (cherry on the cake)


The observation data would be an estimation result of opponent's strategy codes. At this point, it's same as Rule-X though it's different as the method of estimation.
That's created in an intented way and there might be no social signification. Stronger and weaker among individuals shall be the predation, and a dominant individual could be rotated due to relativize just like a scissors-rock-paper.
Such a real social relation is possible?

At first, estimation results of each sign(strategy codes) as a table. These estimation results would be treated as the observation results.
(refer : Rules and Strategies)

Sign and Estimation

estimation name
codes 0000 CC All-C
codes 0001 CC Soft TFT
codes 0010 CD(50%), DC(50%) Major C
codes 0011 CD(50%), DC(50%) Slow TFT
codes 0100 CD(50%), DC(50%) Major C
codes 0101 CD(50%), DC(50%) TFT
codes 0110 CD(50%), DC(50%) Extream Favor
codes 0111 CD(50%), DC(50%) Hard TFT
codes 1000 DD(30%), CD(35%), DC(35%) Soft Perversity
codes 1001 DD(30%), CD(35%), DC(35%) Moderation Favor
codes 1010 DD(30%), CD(35%), DC(35%) Perversity
codes 1011 DD(30%), CD(35%), DC(35%) Major D
codes 1100 DD(30%), CD(35%), DC(35%) Slow Perversity
codes 1101 DD(30%), CD(35%), DC(35%) Major D
codes 1110 DD Hard Perversity
codes 1111 DD All-D


All individuals which codes begin 1 (the first bit is one, 1xxx) and others (0xxx) are sorted out for estimation.
And, the second bit and the third bit would be estimated to those two groups. In case of the former group (1xxx) with zero as those bits (100x, 101x, 110x) would be given a probability to be estimated CD, DC except DD. In case of the latter group (0xxx) with one as those bits (001x, 010x, 011x) would be estimated CD or DC.
That's kinda resemblant to Rule-X though, The probability of an estimation result sorted out is profoundly different.

C Language codes as follows:
int signToEvaluationForPredation(int sign)	// for Rule-XA
{
	if(sign & 8) {
		if(!(sign & 6)) {	// SoftPerversity, SlowPerversity, Perversity, MajorD, ModerationFavor
			if(mersenneTwister() < 0.7)
				return (2 - int(2.0 * mersenneTwister()));
		}
		return 3;		// HardPerversity, All-D
	} else {
		if(sign & 6)	// MajorC, SlowTFT, TFT, ExtreameFavor, HardTFT
			return (2 - int(2.0 * mersenneTwister()));
		return 0;		// All-C, SoftTFT
	}

	return 0;
}
 



As an initial phase, it's dependent on a random chance though, in time TFT-Group(SoftTFT, TFT, SlowTFT, HardTFT) become to be ascendant.
Under dominance of TFT-Group, SoftTFT would stand out as a dominant individual. Under dominance of SoftTFT, ModerationFavor would suddenly prey on SoftTFT on a rampage and would be ascendant. And, TFT-Group would drive out ModerationFavor, and TFT or SlowTFT, HardTFT would be ascendant again.
These cycles would be rotated.

The mutation plays a part of the predation rotation. Please never set the probability of the mutation to zero. If zero probability, the simulation would be done Rock-In due to SoftTFT 100% after couple of rotations.
A particular individual would be ascendant which is premised on that the predators are not almost existing.
For an example, SoftTFT become pervasive without ModerationFavor. Under a condition which SoftTFT is pervasive, ModerationFavor survived slightly or borned due to the mutation would prey on SoftTFT and would become pervasive as quick as a blink.

Rarely, in a case of low count of niches, ModerationFavor would be done Rock-In as existing 100%. Because it's hard that TFT-Group as predators for ModerationFavor would born due to the mutation from ModerationFavor.
That might be impossible in case of a certain level of count of niches, e.g. 64 x 24 niches.

In case of too much niches, e.g. 128 x 48, dominant individuals would be rotated in couple of areas particularly. And it might be difficult to discriminate what individual is ascendant as a whole. It keeps working at confused fight due to the predation.
 



It's depended on random chances how the initial phase will be. As a following sample, HardTFT is slightly dominance. By way of dominant TFT-Group, SoftTFT become to be ascendant stood out.
 
 


ModerationFavor appear on the scean and they prey on SoftTFT. As this sample, other TFT-Group are still surviving at the time and ModerationFavor begin to be preyed by them quickly. Under dominant TFT-Group, HardTFT would be ascendant stood out at first.
 
 


Next, SoftTFT would be ascendant. And ModerationFavor would prey on them.
 
 


And HardTFT. And SoftTFT.
 
 


ModerationFavor. And, as this sample, next, SlowTFT
 
 


HardTFT. SoftTFT
 
 


ModerationFavor. And again SlowTFT.
 
 


HardTFT and SoftTFT. And SoftTFT
 
 


ModerationFavor. On this occasion, next, TFT. However, HardTFT already begin to be ascendant.
 
 




please post any impressions you may have
 


e_mail to webmaster