Prisoner’s Dilemma with N-Participants and Optional Cooperation Matt Lee Period 5 Computer Systems Lab
Background Prisoner’s Dilemma-A Non-Zero Sum game where the objective is to simply have the maximum payoff . There are only two decisions, cooperate or defect. Depending on the output of the two participants, different values will be given.
First Quarter Retrofitted an arrayList to keep track of prisoners and decisions. Two prisoners able to play using random algorithm
Right Now Prisoners able to use strategies Tit for Tat variations usable A prototype version of one variation is usable. New methods have been added to the Prisoner class, particularly the one to see the previous decision and hold it.
Research Netlogo’s ‘Prisoner’s Dilemma with N-participants’ has an interesting way to do PD. Simulates entire world and encounters in PD situations.
Future Implement a variation of the N-participant from netlogo Implement/test more strategies Look over an interesting bit of code.
TFT (Semi-purely by accident) if(turn!=0) { while(run<size) { if(run!=IDtag) { Boolean desu=(Boolean)list.get(run); boolean desu2=desu.booleanValue(); if(desu2==false) falsers++; else if(desu2==true) truers++; } run++; } if(falsers>=truers) player.setDecision(false); else if(falsers<truers) player.setDecision(true); } else player.setDecision(true); /*while(counter<size) { prisoner player2=(prisoner) list.get(counter); if(player2==player) { break; } else { boolean oppDeci=player2.getDecision(); player.setDecision(oppDeci); } }*/