PD Basic

PD Basic preview image

1 collaborator

Uri_dolphin3 Uri Wilensky (Author)

Tags

game theory 

Tagged by Reuven M. Lerner over 11 years ago

prisoner's dilemma 

Tagged by Reuven M. Lerner over 11 years ago

social science 

Tagged by Reuven M. Lerner over 11 years ago

Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 5.0.4 • Viewed 662 times • Downloaded 116 times • Run 2 times
Download the 'PD Basic' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

You and your partner have been arrested for robbing a bank and find yourselves in the classic prisoner's dilemma. The police place each of you into separate rooms and come to you with the following proposal...

"We know you two did this, but don't have proof for anything but a minor charge of firearm possession that will give you a year of jail time. Confess to the robbery and we will make sure the judge goes easy on you, 3 years. If your partner confesses and you don't, we're going to throw the book at you and give you 5 years of prison time. If your partner doesn't and you do, we will let you go free."

Should you remain silent or should you confess? How much jail time you will receive depends on your answer and also on your partner's answer to the same question. The following table summarizes the results of the four different situations:

 Your Action | Partner's Action | Your Jail Time | Partner's Jail Time
----------------------------------------------------------------------
   Silent          Silent               1                  1
   Silent          Confess              5                  0
   Confess         Silent               0                  5
   Confess         Confess              3                  3

HOW TO USE IT

SETUP: Place yourself in the prisoner's dilemma

ANSWER: Answer the police and receive your sentence.

YOU-SILENT?: If you are silent, you will not confess. If you are not silent, you will confess.

PARTNER-SILENCE-KNOWN?: When on, this switch allows you to control the actions of your partner with the PARTNER-SILENT? switch.

PARTNER-SILENT?: If your partner is silent, he will not confess. If he is not silent, he will confess.

THINGS TO TRY

Turn off PARTNER-SILENCE-KNOWN?. Attempt to minimize your prison sentence. Can you do better than your partner? Why or why not?

What strategy is best for the group as a whole?

Describe a real life scenario that is similar to the prisoner's dilemma, preferably one from your own life. What was the best decision? Why?

EXTENDING THE MODEL

Examine the PD TWO PERSON ITERATED model.

NETLOGO FEATURES

The use of the USER-MESSAGE primitive to give the prison sentence.

The use the SIZE turtle variable and TURTLE SIZES option on the view to make large faces.

The use of the SHAPE turtle variable to change the faces.

RELATED MODELS

PD Two Person Iterated

PD N-Person Iterated

PD Basic Evolutionary

HOW TO CITE

If you mention this model in a publication, we ask that you include these citations for the model itself and for the NetLogo software:

  • Wilensky, U. (2002). NetLogo PD Basic model. http://ccl.northwestern.edu/netlogo/models/PDBasic. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.
  • Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.

COPYRIGHT AND LICENSE

Copyright 2002 Uri Wilensky.

CC BY-NC-SA 3.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

This model was created as part of the projects: PARTICIPATORY SIMULATIONS: NETWORK-BASED DESIGN FOR SYSTEMS LEARNING IN CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT. The project gratefully acknowledges the support of the National Science Foundation (REPP & ROLE programs) -- grant numbers REC #9814682 and REC-0126227.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

globals [partner-is-silent?]

to setup
  clear-all
  ;;Build the jail cell
  ask patches with [ count neighbors != 8 ] [
    set pcolor gray]

  ;;make the face visible
  crt 1 [set color gray set size 30 set shape "face"]
  ;; set up the prisoner's dilemma
  ifelse partner-silence-known? [
    set partner-is-silent? partner-silent?
  ]
  [
    ;;if partner silence is not known, choose randomly whether or not he is silent.
    ifelse random 2 = 0
    [ set partner-is-silent? true ]
    [ set partner-is-silent? false ]
  ]
end 

;;play the game, changing the face depending on the outcome.

to answer
  setup  ;;clears variables away so that setup doesn't need to be pressed every time.

  ;;next the four possible combinations of choices are dealt with.
  ;;the result corresponds to the tables in the interface and Info tabs.
  ;;first check to see if your partner was silent.
  ifelse partner-is-silent? [
      ;;now go through your two possible choices
      ifelse you-silent? [
      ask turtles [set shape "face silent"]
      user-message "You and your partner both remain silent.  You are sentenced to one year imprisonment."
    ] [
      ask turtles [set shape "face devious"]
      user-message "You confess and your partner remains silent. You go free."
    ]
  ]
  ;;your partner confessed.
  [
    ;;again go through your two possible choices
    ifelse you-silent? [
      ask turtles [set shape "face sucker" ]
      user-message "You remain silent, but your partner confesses.  You are sentenced to five years imprisonment."
    ] [
      ask turtles [set shape "face rational"]
      user-message "You and you partner both confess.  You are sentenced to three years imprisonment."
    ]
  ]
end 


; Copyright 2002 Uri Wilensky.
; See Info tab for full copyright and license.

There are 10 versions of this model.

Uploaded by When Description Download
Uri Wilensky over 11 years ago Updated to NetLogo 5.0.4 Download this version
Uri Wilensky about 12 years ago Updated version tag Download this version
Uri Wilensky about 12 years ago Updated to version from NetLogo 5.0.3 distribution Download this version
Uri Wilensky almost 13 years ago Updated to NetLogo 5.0 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Model from NetLogo distribution Download this version
Uri Wilensky over 14 years ago PD Basic Download this version

Attached files

File Type Description Last updated
PD Basic.png preview Preview for 'PD Basic' over 11 years ago, by Uri Wilensky Download

This model does not have any ancestors.

This model does not have any descendants.