Game Theory Lab
In this week’s lab, you will be looking at some scientific models implemented in NetLogo (https://ccl.northwestern.edu/netlogo/). In the instructions below, I’ll draw your attention to a few different models (all related to the Prisoner’s Dilemma) and include some suggestions for how you go about exploring these models. I would encourage you to follow your own nose in your exploration of these programs or other models that are included in NetLogo. Find the parts that are exciting or engaging for you and spend some time coming to understand how they work.
NetLogo is a programming language and integrated simulation environment. Without using any other applications, you can use NetLogo to develop simulations, run them and analyze them. It is nice as a teaching/learning tool because it allows the user to (relatively) easily generate (i) models, (ii) visualizations of the model to see what it is doing, and (iii) user interface widgets for interacting with the model. My biggest problem with NetLogo is that the programming language is strange and idiosyncratic compared to other languages you might be familiar with. For that reason, most of this lab is not programming based, but investigation based. A chance for you to experiment with model parameters and to better understand the Game Theoretical models we have been talking about this week. If you do want to better understand the code,
• a reference is available here: https://ccl.northwestern.edu/netlogo/docs/dictionary.html
Copyright By PowCoder代写 加微信 powcoder
• and a user manual can be found here: https://ccl.northwestern.edu/netlogo/docs/
but you will not be expected to know anything about how to program NetLogo on the exam or any
other assessment in this course.
Downloading / Installing
NetLogo is freely available for download and installation. You can download it here: https://ccl.northwestern.edu/netlogo/. If, for some reason you have difficulty installing it, there is also a web-version that runs in your browser. It is available here. http://www.netlogoweb.org/ The desktop version is more full featured, and hopefully shouldn’t be hard to install, so I’d try that one first.
Model #1: PD Basic
Once you have NetLogo installed, run it (we want just NetLogo, not NetLogo3D).
Once it is open, in the pull down menu, select File -> Models Library. Then type “prisoner” in the
search field (lower left) and select PD Basic.
Within any NetLogo program, there are three tabs: Interface, Info, and Code. The first of these is used to run and interact with the model, the second is used to document and describe the model and the third is used to edit the simulation’s source code.
Click on each of the three tabs to take a look. In the code tab you’ll see NetLogo’s idiosyncratic language. I wouldn’t spend to much time here—at least for this first model that you have loaded. It is not a typical NetLogo program, and so not a great one to study if you are interested in better understanding the language.
Read the info tab and have a brief go at playing against the computer and confirm / remind yourself about how the basic prisoner’s dilemma game works.
Model #2: PD Two Person Iterated
Following the same steps as you followed to open PD Basic, open PD Two Person Iterated. Read the INFO tab. Do the tasks described in THINGS TO NOTICE and THINGS TO TRY. Consider modifying the code in simple ways. For instance can you modify the payoff matrix (see the get- payoff section of the code) to find something interesting? How do the strategies specified in the code work for the new game that you have made by changing the payoff matrix? Think of your own code modifications and play around. Use your playing to confirm your understanding of the Prisoner’s Dilemma and similar games, or perhaps find something that surprises you.
Model #3: PD Basic Evolutionary
Open PD Basic Evolutionary and similarly, read the INFO tab and use it to guide your exploration of the iterated Prisoner’s Dilemma. Again do the tasks in the tasks described in THINGS TO NOTICE and THINGS TO TRY.
Other models
You will have noticed that there are many other models available for exploring in the library that comes with NetLogo. If you are done with the above models, take a look through these other models and play with them. Some relate to topics we have already studied
• Biology/Flocking
• Biology/Wolf Sheep Predation
• Computer Science/Cellular Automata/Life
Others are just interesting!
• Biology/Ants
• Biology/Evolution/Sunflower Biomorphs
• Computer Science/Smooth Life
• Social Science/Traffic Grid
Take a look at these models. You’ll get much more out of them if you read the ‘info’ tab and not just look at the pretty graphics!
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com