Presentation is loading. Please wait.

Presentation is loading. Please wait.

Evolutionary Iterated Prisoner’s Dilemma Game H.-T. Kim Evolutionary Computation, 2009.

Similar presentations


Presentation on theme: "Evolutionary Iterated Prisoner’s Dilemma Game H.-T. Kim Evolutionary Computation, 2009."— Presentation transcript:

1 Evolutionary Iterated Prisoner’s Dilemma Game H.-T. Kim Evolutionary Computation, 2009

2 Outline Evolutionary Prisoner's Dilemma Game –Prisoner's Dilemma Game –Iterated Prisoner's Dilemma Game –N-person Iterated Prisoner's Dilemma Game –Robert Axelrod’s nIPD game Evolution of Iterated Prisoner's Dilemma Game Strategies in Structured Demes Under Random Pairing in Game Playing Simulation on Worksite Interactions between Laborers and Firms by using Multi-Agent based Evolutionary Computation 1

3 Prisoner's Dilemma Game 2 ‘ 승현 ’ 의 payoff table 주원 자백 ( 배반 ) 침묵 ( 협력 ) 승현 자백 ( 배반 ) 교수님의 미움 조기졸업 연구비 2 배 침묵 ( 협력 ) 6 년짜리 박사과정교수님의 의심 어느 날 SC 랩 공용통장에서 거액의 연구지원금이 사라진 사건이 발생, 교수님이 범인으로 승현이와 주 원이를 지목했다. 하지만 물증은 없는 상황. 그래서 교수님은 그 두 명을 각각 따로 방으로 불러서 다음 과 같이 말했다. ‘ 만약 범행을 순순히 시인한다면 정직한 너한테만 특별히 이번 달 연구비를 2 배로 주고 졸업도 일찍 시켜 주겠다. 하지만 괜히 입다물고 있다가 다른 사람이 자백하면 그 사람만 혜택을 주고, 너는 석사졸업 후 6 년짜리 박사과정으로 보내겠다.’ 하지만 교수님은 만약 둘 다 자백하면 혜택은 전혀 주지 않을 계획이다. 이 상황에서, 어떻게 하는 것이 승현과 주원의 가장 합리적인 선택일까 ? ‘ 죄수 A’ 의 payoff table B 자백 ( 배반 ) 침묵 ( 협력 ) A 자백 ( 배반 ) 4년4년 0년0년 침묵 ( 협력 ) 10 년 1년1년 내쉬 균형 !

4 Prisoner's Dilemma Game 게임의 특징 –1950 년대에 Merrill Flood 와 Melvin Dresher 에 의해서 고안 – 죄수 2 명이 형사에게 취조 당하는 상황을 가정한 모델 2 명의 player 는 서로 의사소통 불가능 – 많은 사회현상이 이러한 형태를 닮아 있다는 점에서 중요한 모델 게임이론, 경제학, 그리고 정치학에서 깊이 연구 Ex) 군비경쟁, 가격경쟁 … 게임의 조건 –R : 상호협력시의 payoffT : 나만 배반했을시의 payoff –P : 상호배반시의 payoffS : 나만 협력했을시의 payoff 3

5 Iterated Prisoner's Dilemma Game IPD 게임 –2 명의 player 가 Prisoner Dilemma 게임을 여러 번 반복 – 상대방이 배반했을시 벌칙을 가하는 것이 가능 IPD 게임의 결과 – 게임을 반복할수록 서로 협력하는 양상을 보임 – 게임의 player 가 학습능력이 있어야 함  반복을 통해, 협력하는 것이 궁극적으로 더 많은 이득을 가져온다는 것을 학습 4

6 N-person Iterated Prisoner's Dilemma Game nIPD 게임의 특징 –2 명  n 명으로 player 가 증가 –Real-world problem 을 보다 폭 넓게 반영 – 문제를 모델링하기 위해 ‘ 진화연산 ’ 이 주로 사용 Robert Axelrod 의 nIPD 게임 실험 –nIPD 게임 상황에서, 각 개체는 어떻게 행동하는 것이 가장 합리적인가 ? – 실험 과정 step1) 각 분야의 전문가가 수동으로 작성한 전략을 서로 경쟁 step2) 진화연산을 이용해 각 개체의 전략을 진화  실험결과, 가장 우세 전략은 ? 5

7 Robert Axelrod’s nIPD game – Step1 각 학문 분야의 전문가들에게 IPD 게임에서 특정 행동 전략을 수행하 는 프로그램 요청 – 각 프로그램은 이전의 3 번의 게임에서 자신과 상대방의 행동 ( 배신, 협력 ) 을 기억 – 자신의 행동전략은 이 기억에 기반 ex) 상대방이 2 번 배신했으면 나도 배신, 무조건 배신, 2 회 협력 후 1 회 배신 각 프로그램을 서로 경쟁시켜 가장 우세한 전략을 선정 – 방식 : round-robin tournament – 총 63 개의 프로그램이 경쟁 어떤 프로그램은 마르코프 모델이나 베이즈 추론 같은 복잡한 기법을 사용 게임의 최종승자 – 제출된 전략중 가장 간단한 ‘TIT FOR TAT’ –TIT FOR TAT: 처음은 일단 협력, 이후부터는 상대방의 행동을 따라하기 6

8 Robert Axelrod’s nIPD game – Step2 진화연산이 전략을 성공적으로 진화시킬 수 있는지 실험 Encoding –C : CooperationD : Defect – 이전 1 번의 게임에 대해, – 행동전략 : 각 경우에 대해 어떻게 행동 ( 협력, 배반 ) 할지 규정 –ex) TIT FOR TAT 7 CCCDDCDD case 1 case 2case 3 협력  총 4 가지 경우가 존재 ! CCCDDCDD case 4 배신 협력 배신

9 Robert Axelrod’s nIPD game – Step2 Encoding - 이전 3 번의 게임을 기억해야 하는 경우 CC CC CC (case 1) CC CC CD (case 2) CC CC DC (case 3) … DD DD DC (case 63) DD DD DD (case 64)  따라서 총 64bit + 6bit 로 전략 encoding 가능 64bit : 각 경우와 행동을 1 대 1 맵핑 6bit : 이전 3 번의 행동을 기억 EX) CCDCDDDC … DC CCDDCD – 가능한 전략의 수 = 가지 경우

10 Robert Axelrod’s nIPD game – Step2 기타 변수들 –Fitness : Payoff 의 합 –Population : 20 –Generation : 50 실험 결과 – 진화된 대부분의 전략은 협력에 보답하고 배신에는 보복하는 양상 TIT FOR TAT 과 유사 !! –TIT FOR TAT 보다 더 높은 점수를 얻는 전략도 발견 실험 양상 ①초기 세대에는 협조적인 개체들이 다른 개체에 보답을 받지 못하고 소멸 ②약 10~20 세대 이후에는 협조에 보답하고 배신에 보복하는 전략이 등장 ③이후 위와 같은 전략이 population 에 다수 분포 9

11 Evolution of Iterated Prisoner's Dilemma Game Strategies in Structured Demes Under Random Pairing in Game Playing Hisao Ishibuchi, Member, IEEE, and Naoki Namikawa, Student Member, IEEE 김 희 택김 희 택김 희 택김 희 택 IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, VOL. 9, NO. 6, DECEMBER 2005

12 Outline Introduction Two neighbor structure –IPD game structure –Mating strategy Simulation – Standard Pairing Scheme Random Pairing Scheme Simulation – Random Pairing Scheme Conclusion 11

13 Introduction Spatial IPD game –Framework of structured demes –Cells of two-dimensional grid-world Two neighborhood structure ① Interaction among players through the IPD game ② Interaction among players for mating strategies  Similar to world of territorial animals or plant Random pairing scheme –Plays game with a randomly chosen neighbor at every round –Demonstrate evolution of cooperation behavior (in random pairing) 12

14 Basic structure – Payoff Matrix Payoff Matrix of the game 13

15 Basic structure – Strategy Encoding Single player has a single strategy Every Strategy is represented by 5 bit binary sequence –Example of strategy (TIT-FOR-TAT) 14

16 IPD game structure – World and Neighborhood Use 31 * 31 grid-world –All player locate on one cell –961 player exist Examples of neighborhood structure 15

17 IPD game structure - Game play and Fitness N IPD (i) –The set of Player i and its neighbors Game play –The game is iterated for a pre-specified number of rounds (e.g, 100 rounds) –Each player plays game against only its neighbors Randomly select opponents Fitness –Average payoff obtained from each round of the game 16

18 Mating strategy – formulation N GA (i) –Set of player i and its neighbors  N IPD (i) = N GA (i) is not always hold Parents is selected from N GA (i) –Using roulette wheel selection Selection probability of strategy j –f(s i ) : fitness of player i with strategy s i –F min (N GA (i)) : minimum fitness among the N GA (i) 17

19 Mating strategy – crossover and mutation One point crossover Bitmap mutation 18

20 Simulation Two kinds of simulation ① Simulate two neighborhood structure with standard pairing scheme Verify the effect of two neighborhood structure on evolution of cooperative behavior ② Simulate two neighborhood structure with random pairing scheme Examine the effect random pairing scheme on evolution of cooperative behavior 961 spatially fixed player (31 * 31 grid-world) Mistake (noisy IPD model) –A player chooses an action different from its strategy 19

21 Standard Pairing Simulation – Parameter Setting Case of two neighborhood structure Parameter value 20 Mistake probability0, 0.001, 0.01, 0.1 Crossover probability1.0 Mutation probability1 / (5*961) Termination of IPD game100 rounds Termination of evolution1000 generations

22 Standard Pairing Simulation – Result N IPD has a significant effect on the evolution of cooperative behavior N GA has a much smaller effect than N IPD Small N IPD facilitate the evolution of cooperative behavior 21

23 Standard Pairing Simulation – Result (2) Better results were obtained from smaller mistake probabilities Cooperative behavior were evolved independently from the two neighborhood structures 22

24 Random Pairing Scheme Every player chooses its opponent randomly from N IPD at every round of the game The memory about the interaction with a neighbor may influence an player’s future action against another neighbor 23

25 Random Pairing Simulation – Result (1) The same parameter specifications were used as in the previous Evolution of cooperative behavior is very difficult to achieve Increase number of opponents  Decreased the probability to play against the same opponent  Decrease in average payoff 24

26 Random Pairing Simulation – Result (2) Strategy characterized by the genetic form “1***1” 25 ParameterValue Mistake probability0 NIPD(i)3 NGA(i)5

27 Random Pairing Simulation – Result (3) Strategy characterized by the genetic form “****0” –The existence of strategies of this type prevents the consecutive occurrence of mutual cooperation 26 ParameterValue Mistake probability0 NIPD(i)5 NGA(i)5

28 Random Pairing Simulation – Result (4) Strategy characterized by the genetic form “11**1” –Those strategies have the ability to recover from mutual defection (D, D) –This ability seems to be important under a noisy situation 27 ParameterValue Mistake probability0.01 NIPD(i)3 NGA(i)5

29 Random Pairing Simulation – Result (5) 28 ParameterValue Mistake probability0.01 NIPD(i)5 NGA(i)5 The TFT strategy “10011” increased its percentage to almost 100% Higher average payoff was obtained from strategies of the form “11**1,” rather than the TFT strategy “10011.”

30 Other Simulations 29

31 Conclusion Formulated a spatial IPD game using the concept of two neighborhood structures ① Interaction among players through the IPD game ② Mating strategies –Computer Simulation Use of a small interaction neighborhood facilitated the evolution of cooperative behavior Introduced a random pairing scheme with the two neighborhood structures –Computer Simulation Cooperative behavior was evolved when we smallest interaction neighborhood is used Future Work –Explain the results of random pairing scheme simulation –Use a stochastic strategy represented by a string of real numbers between 0 and 1 –Evolution of cooperative behavior under the random pairing scheme in a large interaction neighborhood 30

32 Simulation on Worksite Interactions between Laborers and Firms by using Multi-Agent based Evolutionary Computation Soft Computing Laboratory, Yonsei University Hee-Taek Kim and Sung-Bae Cho Social Simulation Workshop at the International Joint Conference on Artificial Intelligence

33 Motivation Laborers and firms formulate strategic relationship –What is rational strategy in position of laborer or firm Can we drive mutual benefits relation between Laborers and firm? General economic belief laborer tends to cooperate with cooperative firms Firm tends to cooperate with cooperative laborers 32 Wage Labor High wage... High wage... Low wage, but high productivity Low wage, but high productivity

34 Introduction of the Simulation Model Construct computational work-site interaction model –Multi-agent based approach –Consist of worker agent and firm agent –Implement adaptive agent by using evolutionary computation Simulate interaction between workers and firms –Workers and firms are mutually interact each other –Make collaborative or competitive relationship 33

35 Evolutionary Computation Based on Darwinism –“Survivals of the fittest” –Apply evolutionism to computation Widely used to modeling social phenomena –Individual population, behavioral rule, selection and reproduction –Each individual can adapt to dynamic environment Basic evolution process 34 Population Selection Reproduction (Crossover and mutation) Reproduction (Crossover and mutation) Calculate Fitness Calculate Fitness

36 Simulation Process – Laborer’s Phase The interaction protocol between workers and firms can be divided into two phase –Laborer’s phase and firm’s phase 35 Laborers have to decide whether to resign from firm or not Laborers have to decide whether to cooperate or defect with his employer Laborers have to decide whether to resign from firm or not Laborers have to decide whether to cooperate or defect with his employer

37 Simulation Process – Firm’s Phase Firm’s phase 36 Firms have to decide whether to cooperate or defect with his opponent laborers

38 Overall Process of Simulation 37

39 Simulation framework 38

40 Internal Attributes – Laborer Attributes of laborerDescription int IDUnique identifier of this laborer int employedFirmIDUnique identifier of a firm who employed this laborer double assetTotal asset of this laborer doubleproductivityThe productivity offered to firm doublelivingCost Living expenses per one generation. S ubtract from asset intstateCurrent state { WORKING, JOBLESS, FRESH, FAILED } intcontinuesThe counts of generations from employment to now ArraychromosomeArray of integers representing strategy of this laborer ArrayfirmCareerAfter resignation, laborer never employed to same firm again QueuefirmPastBehaviorsThe cooperation history of the firm employed this laborer QueuelaborerPastBehaviorsThe cooperation history of this laborer 39

41 Internal Attributes– Firm Attributes of firmDescription int IDUnique identifier of the firm double capitalTotal capital of this firm. Correspond to laborer’s asset doublesupportingCostThe cost for maintenance of a firm ArraychromosomeArray of integers representing strategy of this firm ArraymyLaborersArray of laborers who are employed in this firm 40

42 Action of Agent Cooperation and defection Laborer –Cooperation : High Productivity ( Prod H ) –Defection : Low Productivity ( Prod L ) –Resign : resign from opponent firm Firm –Cooperation : High wage ( Wage H ) –Defection : Low wage ( Wage L ) 41 (Laborer, Firm) Firm cooperationdefection Laborer Cooperation(Wage H, Prod H - Wage H )(Wage L, Prod H – Wage L ) Defection(Wage H, Prod L - Wage H )(Wage L, Prod L – Wage L )

43 Behavioral Strategy of Agent Behavioral strategy determine current action of the agent –All individuals has its own strategy –All strategies evolve as the simulation being progressed 42

44 Evolutionary Engine Fitness evaluation –Firm The capital attribute is treated as fitness of the firm –Laborer The asset attribute is treated as fitness of the laborer Selection –Used roulette wheel selection –Possibility of selection 43

45 Evolutionary Engine Crossover and mutation –One point cross over –One point bit mutation Elimination –Eliminate incapable agents from simulation 44

46 Experimental Design DescriptionValue Firm Initial capital2000 Initial number of laborers per one firm10 Maximum number of laborers per one firm30 supportingCost30 Wage H 12 Wage L Wage H /2 Laborer Initial asset200 livingCost10 Prod H 18 Prod L Prod H /2 Othe Initial number of firms30 Maximum capacity of history queue ( ) 10 Mistake probability DescriptionValue Initial population of firm30 Maximum population of firmInfinite Initial population of laborers330 Maximum population of laborersInfinite Increment rate of laborers population (Reproduce rate) Mutation rate0.005 Selection methodRoulette wheel Crossover method1 point crossover (Worker, Firm) Firm cooperationDefection Worker Cooperation(12, 6)(6, 12) Defection(12, -3)(6, 3) (Laborer, Firm) Firm cooperationdefection Labor er Cooperation(Wage H, Prod H - Wage H )(Wage L, Prod H – Wage L ) Defection(Wage H, Prod L - Wage H )(Wage L, Prod L – Wage L )

47 Experimental Result 46

48 Experimental Result (2) 47

49 Conclusion – Second Experiment Forbid resignation of laborers –Laborers cannot escape from vicious firm –Firms just want to extort faithful laborer Results in breakdown of all agents because of selfish behavior of the firms 48

50 Current Works Extend 2*2 interaction model  Continuous model based on linear algebra –Asset/livingCost  X 1 + RecentGivenPay  X 2 + Continuous  X 3 … Beside previous activity of opponent agent, many other factors can affect current action of the agent –Environmental information, my current state, opponent state, and so on… Test various policies to simulation model and analysis it’s effect 49

51 과제 nIPD game 을 직접 구현해 봅시다 ^^ 기본적인 실험방법은 Robert Axelrod’s nIPD game 과 동일 –Population, Generation, Mutation Rate, Crossover Rate, payoff matrix, 게 임 방식 모두 자유 – 단 payoff matrix 는 prisoner’s dilemma game 의 조건을 만족해야 함 –http://www.aistudy.co.kr/biology/genetic/example_mitchell.htm 참고http://www.aistudy.co.kr/biology/genetic/example_mitchell.htm 단, 3 번의 이전게임이 아니라, 바로 직전 1 번의 게임만 기억 – 따라서 전략 길이는 6bit 가 됨 제출물 – 보고서, 소스코드 – 기한 : 9 월 24 – 언어 : VS2008 로 돌아가는 거 (C, C++, C# 등 ) 50

52 보고서 실험 개요 실험 셋팅에 관한 내용 –Population, Generation, Mutation Rate, Crossover Rate, payoff matrix, 게 임 방식 등 실험 결과 – 실험결과 우세 전략이 어떻게 나왔는가 ? – 그래프, 도표 등을 동원하여 진화 과정을 잘 보일 수도 있을 듯 – 스크린 샷 결론 51

53 감 사 합 니 다감 사 합 니 다감 사 합 니 다감 사 합 니 다


Download ppt "Evolutionary Iterated Prisoner’s Dilemma Game H.-T. Kim Evolutionary Computation, 2009."

Similar presentations


Ads by Google