From 0c610b1e14f0c07c6e16aa444c76f2407231560b Mon Sep 17 00:00:00 2001 From: Nicky Case Date: Wed, 12 Jul 2017 17:46:38 -0400 Subject: [PATCH] fuller crap outline --- js/sims/Tournament.js | 50 +++++++++++++------------- js/slides/4_Slides_Evolution.js | 64 ++++++++++++++++++++++++++++++++- js/slides/5_Slides_Noise.js | 13 ++++++- js/slides/6_Slides_Sandbox.js | 21 +++++++---- lang/en.html | 17 ++++++--- 5 files changed, 126 insertions(+), 39 deletions(-) diff --git a/js/sims/Tournament.js b/js/sims/Tournament.js index c5323a4..c5eb8ff 100644 --- a/js/sims/Tournament.js +++ b/js/sims/Tournament.js @@ -1,37 +1,35 @@ -Tournament.SELECTION = 5; +Tournament.resetGlobalVariables = function(){ + + Tournament.SELECTION = 5; + Tournament.NUM_TURNS = 10; + + Tournament.INITIAL_AGENTS = [ + {strategy:"tft", count:5}, + {strategy:"all_d", count:5}, + {strategy:"all_c", count:0}, + {strategy:"grudge", count:0}, + {strategy:"prober", count:0}, + {strategy:"tf2t", count:5}, + {strategy:"pavlov", count:5}, + {strategy:"random", count:5} + ]; + + publish("pd/defaultPayoffs"); + + PD.NOISE = 0; + +}; + +Tournament.resetGlobalVariables(); + subscribe("rules/evolution",function(value){ Tournament.SELECTION = value; }); -Tournament.NUM_TURNS = 10; subscribe("rules/turns",function(value){ Tournament.NUM_TURNS = value; }); -// CREATE A RING OF AGENTS -/*Tournament.INITIAL_AGENTS = [ - {strategy:"tft", count:5}, - {strategy:"all_d", count:5}, - {strategy:"all_c", count:15}, - {strategy:"grudge", count:0}, - {strategy:"prober", count:0}, - {strategy:"tf2t", count:0}, - {strategy:"pavlov", count:0}, - {strategy:"random", count:0} -];*/ - -Tournament.INITIAL_AGENTS = [ - {strategy:"tft", count:5}, - {strategy:"all_d", count:5}, - {strategy:"all_c", count:0}, - {strategy:"grudge", count:0}, - {strategy:"prober", count:0}, - {strategy:"tf2t", count:5}, - {strategy:"pavlov", count:5}, - {strategy:"random", count:5} -]; - - // OH THAT'S SO COOL. Mostly C: Pavlov wins, Mostly D: tit for two tats wins (with 5% mistake!) // ALSO, NOISE: tft vs all_d. no random: tft wins. low random: tf2t wins. high random: all_d wins. totally random: nobody wins diff --git a/js/slides/4_Slides_Evolution.js b/js/slides/4_Slides_Evolution.js index 7dfb6d9..6ee7fd4 100644 --- a/js/slides/4_Slides_Evolution.js +++ b/js/slides/4_Slides_Evolution.js @@ -21,4 +21,66 @@ SLIDES.push({ onend: function(self){ self.clear(); } -}); \ No newline at end of file +}); + +// Place Your Bets +SLIDES.push({ + onstart: function(self){ + + // Tournament + Tournament.INITIAL_AGENTS = [ + {strategy:"all_c", count:15}, + {strategy:"all_d", count:5}, + {strategy:"tft", count:5} + ]; + self.add({id:"tournament", type:"Tournament", x:-20, y:20}); + + // Words to the side + self.add({ + id:"text", type:"TextBox", + x:510, y:30, width:450, height:500, + text_id:"evo_bets" + }); + + // Button + self.add({ + id:"button_step", type:"Button", + x:510, y:300, + text_id:"button_step", + message: "tournament/step" + }); + + // Button + self.add({ + id:"button_next", type:"Button", + x:510, y:400, + text_id:"label_next", + onclick:function(){ + _.answer = "tft"; + publish("slideshow/scratch"); + } + }); + + }, + onend: function(self){ + self.clear(); + } +}); + +// Result: First Round + +// Result: Second Round + +// Result: til the end... + +// Explanation + +// (Yup, even w Grudgers & Detectives) + +// Problem 1: Number of interactions + +// Problem 2: Payoffs + +// Teaser... + + diff --git a/js/slides/5_Slides_Noise.js b/js/slides/5_Slides_Noise.js index ebafbdd..0cedc78 100644 --- a/js/slides/5_Slides_Noise.js +++ b/js/slides/5_Slides_Noise.js @@ -1,5 +1,16 @@ +// One-off SLIDES.push({ id: "noise", onstart: function(self){ } -}); \ No newline at end of file +}); + +// New characters + +// Tournament + +// Tournament #2 + +// Tournament: adjust noise + +// Teaser... \ No newline at end of file diff --git a/js/slides/6_Slides_Sandbox.js b/js/slides/6_Slides_Sandbox.js index 618f4a8..740d802 100644 --- a/js/slides/6_Slides_Sandbox.js +++ b/js/slides/6_Slides_Sandbox.js @@ -2,16 +2,25 @@ SLIDES.push({ id: "sandbox", onstart: function(self){ - - } - /*add:[ // The tournament simulation - {id:"tournament", type:"Tournament", x:-20, y:-20}, + Tournament.resetGlobalVariables(); + self.add({id:"tournament", type:"Tournament", x:-20, y:-20},); // Screw it, just ALL of the Sandbox UI - {id:"sandbox", type:"SandboxUI"} + self.add({id:"sandbox", type:"SandboxUI"}); - ]*/ + // Button for next... + self.add({ + id:"button_next", type:"Button", + x:510, y:500, + text_id:"label_next", + message: "slideshow/scratch" + }); + + }, + onend: function(self){ + self.clear(); + } }); \ No newline at end of file diff --git a/lang/en.html b/lang/en.html index 9894563..a0a0ffc 100644 --- a/lang/en.html +++ b/lang/en.html @@ -145,6 +145,10 @@ And *that's* why "peace" broke out in the trenches of World War I. Each side was

+

+step +

+ @@ -195,13 +199,13 @@ In each round of a one-on-one game, there's a [N]% chance a player makes a mista

blah blah blah blah +blah blah blah blah
+blah blah blah blah +blah blah blah blah
blah blah blah blah blah blah blah blah
blah blah blah blah -blah blah blah blah blah blah blah blah
-blah blah blah blah -blah blah blah blah

@@ -326,6 +330,9 @@ rules 3) reproduce top 5

+

+next +

@@ -351,11 +358,11 @@ rules 5. Making Mistaeks

-6. Sandbox +6. Sandbox Mode

7. Conclusion

-X. Credits +Credits