From b2b46a5590d95f27857144b848929bfa3fae79b1 Mon Sep 17 00:00:00 2001 From: Nicky Case Date: Mon, 17 Jul 2017 18:32:02 -0400 Subject: [PATCH] WORDS --- index.html | 9 +- js/core/Scratcher.js | 4 +- js/slides/4_Slides_Evolution.js | 39 +-- js/slides/5_Slides_Distrust.js | 41 +++ .../{5_Slides_Noise.js => 6_Slides_Noise.js} | 0 ..._Slides_Sandbox.js => 7_Slides_Sandbox.js} | 0 ...s_Conclusion.js => 8_Slides_Conclusion.js} | 0 ..._Slides_Credits.js => 9_Slides_Credits.js} | 0 js/slides/X_Slides_Feetnotes.js | 6 + lang/en.html | 271 ++++++++++++++++-- 10 files changed, 326 insertions(+), 44 deletions(-) create mode 100644 js/slides/5_Slides_Distrust.js rename js/slides/{5_Slides_Noise.js => 6_Slides_Noise.js} (100%) rename js/slides/{6_Slides_Sandbox.js => 7_Slides_Sandbox.js} (100%) rename js/slides/{7_Slides_Conclusion.js => 8_Slides_Conclusion.js} (100%) rename js/slides/{8_Slides_Credits.js => 9_Slides_Credits.js} (100%) create mode 100644 js/slides/X_Slides_Feetnotes.js diff --git a/index.html b/index.html index 6c2c241..5c8d43e 100644 --- a/index.html +++ b/index.html @@ -56,10 +56,11 @@ - - - - + + + + + diff --git a/js/core/Scratcher.js b/js/core/Scratcher.js index d27113f..df951eb 100644 --- a/js/core/Scratcher.js +++ b/js/core/Scratcher.js @@ -83,14 +83,14 @@ Scratcher.smallScratch = function(x,y,width,height,_onChange,_onComplete){ // Animate! Scratcher.scratchAnim(scratcher, true) .then(function(){ - _onChange(); + if(_onChange) _onChange(); }) .then(function(){ return Scratcher.scratchAnim(scratcher, false); }) .then(function(){ slideshow.dom.removeChild(scratcher); // Destroy DOM - _onComplete(); + if(_onComplete) _onComplete(); }); }; diff --git a/js/slides/4_Slides_Evolution.js b/js/slides/4_Slides_Evolution.js index 18e4f9b..2cc089a 100644 --- a/js/slides/4_Slides_Evolution.js +++ b/js/slides/4_Slides_Evolution.js @@ -110,8 +110,8 @@ SLIDES.push({ var x = 510; var y = 200; var nextStep; - var textStep = 2; - // var textStep = 8; + // var textStep = 2; + var textStep = 8; self.add({ id:"step_1", type:"Button", x:x, y:y, text_id: "label_play_tournament", size:"long", @@ -205,22 +205,24 @@ SLIDES.push({ SLIDES.push({ onstart: function(self){ - // Tournament var o = self.objects; - Tournament.resetGlobalVariables(); - Tournament.INITIAL_AGENTS = [ - {strategy:"all_c", count:5}, - {strategy:"all_d", count:5}, - {strategy:"tft", count:5}, - {strategy:"grudge", count:5}, - {strategy:"prober", count:6} - ]; - o.tournament.reset(); - _hide(o.tournament); _fadeIn(o.tournament, 10); + + // SCRATCH IN TOURNAMENT + Scratcher.smallScratch(0, 0, 480, 540, function(){ + Tournament.resetGlobalVariables(); + Tournament.INITIAL_AGENTS = [ + {strategy:"all_c", count:5}, + {strategy:"all_d", count:5}, + {strategy:"tft", count:5}, + {strategy:"grudge", count:5}, + {strategy:"prober", count:6} + ]; + o.tournament.reset(); + }); // The same with grudger & detetive! o.text.setTextID("evo_10"); - _hide(o.text); _fadeIn(o.text, 400); + _hide(o.text); _fadeIn(o.text, 1000); // Button: start/stop var isPlaying = false; @@ -239,7 +241,7 @@ SLIDES.push({ } } }); - _hide(o.autoplay); _fadeIn(o.autoplay, 600); + _hide(o.autoplay); _fadeIn(o.autoplay, 1200); // Listen... var step = 0; @@ -284,7 +286,7 @@ SLIDES.push({ onstart: function(self){ var o = self.objects; - // Oh no + // TODO: FART SOUND Tournament.resetGlobalVariables(); Tournament.INITIAL_AGENTS = [ {strategy:"all_d", count:24}, @@ -294,7 +296,7 @@ SLIDES.push({ // Text o.text.setTextID("evo_11"); - _hide(o.text); _fadeIn(o.text, 200); + //_hide(o.text); _fadeIn(o.text, 100); // Next self.add({ @@ -302,12 +304,13 @@ SLIDES.push({ text_id:"evo_11_btn", size:"long", message: "slideshow/next" }); - _hide(o.next); _fadeIn(o.next, 500); + //_hide(o.next); _fadeIn(o.next, 200); }, onend: function(self){ self.remove("text"); self.remove("next"); + _.clear(); } }); diff --git a/js/slides/5_Slides_Distrust.js b/js/slides/5_Slides_Distrust.js new file mode 100644 index 0000000..39bfd03 --- /dev/null +++ b/js/slides/5_Slides_Distrust.js @@ -0,0 +1,41 @@ +SLIDES.push({ + id: "distrust", + onjump: function(self){ + + // Tournament + Tournament.resetGlobalVariables(); + Tournament.INITIAL_AGENTS = [ + {strategy:"tft", count:20}, + {strategy:"all_d", count:1}, + {strategy:"all_c", count:1}, + {strategy:"grudge", count:1}, + {strategy:"prober", count:1} + ]; + self.add({id:"tournament", type:"Tournament", x:-20, y:20}); + + }, + onstart: function(self){ + + var o = self.objects; + + // Reset Tournament + _.resetTournament = function(){ + Tournament.resetGlobalVariables(); + Tournament.INITIAL_AGENTS = [ + {strategy:"tft", count:20}, + {strategy:"all_d", count:1}, + {strategy:"all_c", count:1}, + {strategy:"grudge", count:1}, + {strategy:"prober", count:1} + ]; + o.tournament.reset(); + }; + _.resetTournament(); + + // Move tournament + o.tournament.dom.style.left = 480; + + }, + onend: function(self){ + } +}); \ No newline at end of file diff --git a/js/slides/5_Slides_Noise.js b/js/slides/6_Slides_Noise.js similarity index 100% rename from js/slides/5_Slides_Noise.js rename to js/slides/6_Slides_Noise.js diff --git a/js/slides/6_Slides_Sandbox.js b/js/slides/7_Slides_Sandbox.js similarity index 100% rename from js/slides/6_Slides_Sandbox.js rename to js/slides/7_Slides_Sandbox.js diff --git a/js/slides/7_Slides_Conclusion.js b/js/slides/8_Slides_Conclusion.js similarity index 100% rename from js/slides/7_Slides_Conclusion.js rename to js/slides/8_Slides_Conclusion.js diff --git a/js/slides/8_Slides_Credits.js b/js/slides/9_Slides_Credits.js similarity index 100% rename from js/slides/8_Slides_Credits.js rename to js/slides/9_Slides_Credits.js diff --git a/js/slides/X_Slides_Feetnotes.js b/js/slides/X_Slides_Feetnotes.js new file mode 100644 index 0000000..75805d9 --- /dev/null +++ b/js/slides/X_Slides_Feetnotes.js @@ -0,0 +1,6 @@ +SLIDES.push({ + id: "credits", + onstart: function(self){ + self.add({ id:"bg", type:"Background", color:"#222" }); + } +}); \ No newline at end of file diff --git a/lang/en.html b/lang/en.html index 8140f93..3afdeac 100644 --- a/lang/en.html +++ b/lang/en.html @@ -3,6 +3,10 @@ + + + +

During World War I, peace broke out. @@ -96,7 +100,7 @@ Wow, that's mean... and also the correct answer!

-Sure, seems like the right thing to do... or is it? +Sure, seems like the right thing to do... OR IS IT??

@@ -289,7 +293,7 @@ Congrats, you placed your bet on the right horse.

Copycat goes by many names. -The Golden Rule, reciprocal altruism, tit for tat, or... live and let live. +The Golden Rule, reciprocal altruism, tit for tat, or... live and let live. That's why "peace" could emerge in the trenches of World War I: when you're forced to play the same game with the same specific people (not just the same generic "enemy") over and over again -- @@ -476,8 +480,9 @@ However... There are jerks. Look around.

If Copycat is the strategy in this repeated game of trust that's so powerful -- -that even soldiers in the trenches of World War I independently "evolved" a similar strategy -- -why, then, are there so many un-trusting, un-trustworthy people around? +that even soldiers in World War I trenches independently "evolved" a similar strategy, called "live and let live" -- +why, then, are there so many un-trusting, un-trustworthy people? +What's causing our epidemic of un-trust?

A clue's in that sentence itself. "In this repeated game of trust." So far we've only talked about change in the players: @@ -489,9 +494,196 @@ What could lead to...

- + +

+Before everything goes to heck: let's start with something nice. +A world, mostly populated by nice Copycats, +with only one each of a +mean Always Cheat, +naive Always Cooperate, +unforgiving Grudger, and +manipulative Detective. +

+Use the buttons on the right to start the simulation, +go through it step-by-step, or restart it. → +

+ +

+Under our current rules, Copycat wins easily. +

+But that's under our current rules, which say that +players play against each other 10 rounds per match. +What if players had to play 20 rounds? 5 rounds? 3 rounds? 1 round? +Use the slider below to change this rule, start the simulation, +and see what happens – then repeat this for as many numbers as you'd like to experiment with: +

+ +

+(when you're done, press:) +

+ +

+As you just saw, if you play enough rounds, Copycat still wins... +but when people play with each other less and less... suddenly, // HOW MUCH? +ALWAYS CHEAT dominates once again. +

+In 1985, when Americans were asked how many close friends they had, +the most common answer was "three". In 2004, the most common answer was "zero". +Furthermore, we're also (relatively) less likely to +get married, volunteer, go to church, join organizations, or participate in local politics. +We're losing our "social capital". +And as you discovered for yourself just now, +the fewer "repeat interactions" there are, the more distrust will spread. +

+(and no, mass media doesn't count: +it has to be repeat two-way interactions between specific individuals.) +

+

+oh, it gets worse... → +

+ +

+There's another way to breed distrust. +Here are the "payoffs" for a single round of the trust game: +

+

+Note: although the reward for mutual trust (+2) is less than the temptation to exploit (+3), +with enough repeat interaction, trust can still win! +But now, click the arrows above to change the reward from +2 to +1, +then click "start". +Even though +1 is still more than the punishment for mutual distrust (0)... +what happens? +

+(after you try that, feel free to play around with different "payoff" combinations! +once you're done experimenting, hit:) +

+

+(simulating: 5 rounds per match) +

+ +

+So even if the reward for getting a "win-win" is still more +than the punishment for a "lose-lose"... +if the reward for mutual trust is too low, distrust evolves. +

+I think, as a culture, we're losing the value of finding "win-wins". +We're more interested in "win-lose", because viciousness gets views, conflict gets clicks. +We'd rather live and let die. +Maybe I'm just overthinking things, maybe I'm just old and shaking my fist at a cloud... +but don't you feel it? That we've forgotten something?... +

+

+...whatevs i dunno → +

+ +

+Aaaaanyway, you can now play with both the number of rounds and the payoffs! +These two things interact with each other a lot. +For example, even though a low +1 reward creates distrust with 5 rounds per match, +trust can still win with 10 rounds per match! (Click START to simulate this) +

+

+Once you're done experimenting, +(and there'll be a much bigger "sandbox" to play around with at the end) +let's take a look at our final, most interesting barrier to trust... +

+

+Misteaks Mistakes. → +

+ + + + + +

+As cool as Copycat is, it has a huge, fatal weakness I haven't mentioned yet. +To understand it, let's imagine two Copycats are playing against each other: +

+

+Being a nice player, both their first moves will be: +

+ +

+And normally, they'd just pay back each others' kindness and sing Kumbaya 'til the end of days. +

+

+But what if, while trying to reciprocate... +

+ +

+OH NO +
+Mistakes, miscommunication, misinterpretations -- accidents happen all the time in real life. +

+

+But if the other person doesn't think it was an accident... +

+ +

+OH NO x2 +
+The other player, being a Copycat, had to retaliate... +

+

+...and you, being a Copycat as well, will also have to retaliate... +

+ +

+And like the Hatfields and McCoys, or the Crips and Bloods, +these two Copycats will spiral into an endless feud of vengeance... +

+

+...that started over a single mistake, long forgotten. +

+How tragic. But now, are there other characters, types of players, who can... +

+

+...survive mistakes? → +

+ +

+Let's meet some new faces! +

+ +

+COPYKITTEN: +Hello! I'm like Copycat, +except I Cheat back only after you Cheat me twice in a row. +After all, the first one could be a mistake! Purrrrr +

+ +

+SIMPLETON: +hi i try start cooperate. (unless i make mistake) +if you cooperate back => good thing => i do same thing as last move. (even if it was mistake) +if you cheat back => bad thing => i do opposite thing as last move. (even if it was mistake) +

+ +

+RANDOM: +Monkey robot! Ninja pizza tacos! lol i'm so random +(Just plays Cheat or Cooperate randomly with a 50/50 chance) +

+ +

+Alright, let's see how well these peeps do when they... +

+

+...play against each other → +

+ + + + + + + + + + + @@ -532,7 +724,10 @@ In each round of a one-on-one game, there's a [N]% chance a player makes a mista

-...once you're done playing around in Sandbox Mode, click: +...once you're done playing around, let's recap +

+

+what we've learnt →

@@ -541,15 +736,43 @@ 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
+

+ +TRUST: +- repeated interaction: +- win-win: +- dealing with mistakes: forgive, and try to be clear and honest yourself + +DISTRUST: +- loss of social capital +- win-lose, use versus them, zero-sum +- gleefully punishing even small mistakes + +But above all, there's also... +

+

+...the bigger lesson → +

+ +

+Don't hate the player, hate the game. +
+Game theory lesson. +
+Short term: game changes players. But don't be cynical +
+Long term: players change game, from the bottom up -- evolution. +
+So if we wanna cure our epidemic of distrust, +and rebuild a trusting & trustworthy civic society, it's up to all of us. +Let's all learn and act to find win-wins, +to create repeated interactions, +(and...) +

+ +

+...to live and let live. +

@@ -557,7 +780,12 @@ blah blah blah blah

- + + + + + + @@ -706,15 +934,18 @@ next →

4. Repeated Tournament

+

+5. The Evolution of Distrust +

-5. Making Mistaeks +6. Making Mistaeks

-6. Sandbox Mode +7. Sandbox Mode

-7. Conclusion +8. Conclusion

-Credits +9. Credits