Example #1
0
def intro():
    h = [html.P(),
         html.rsquotify("Hi there! We're going to play a game based on a classic cognitive science experiment first performed by Peter Wason in 1960 (references at the end)."),
         html.P(),
         html.rsquotify("Here's how it works. I'm thinking of a rule which separates sequences of three numbers into "),
         html.singlequote("awesome"),
         html.rsquotify(" triplets, and not-so-awesome triplets. I'll tell you for free that 2 4 6 is an awesome triplet."),
         html.P(),
         html.rsquotify("What you need to do is to figure out which rule I'm thinking of. To help you do that, I'm going to let you experiment for a bit. Enter any three numbers, and I'll tell you whether they are awesome or not. You can do this as many times as you like, so please take your time."),
         html.P(),
         html.rsquotify("When you're sure you know what the rule is, hit "),
         html.singlequote("Continue"),
         html.rsquotify(", and I'll test you to see if you've correctly worked out what the rule is."),
         html.P(),
         html.Form(method='POST', action='/start',
                   _=["Enter three numbers: ",
                      html.Input(name='triple'),
                      html.submit('Start')])]
    return h
Example #2
0
def enlighten(preamble):
    h = [preamble, " In fact, ", RightRule().in_english,
         html.P(),
         # XXX rephrase the 'you invented' when no rule matches
         "The rule for awesomeness was a fairly simple one, but you invented a more complicated, more specific rule, which happened to fit the first triplet you saw. In experimental tests, it has been found that 80% of subjects do just this, and then never test any of the pairs that ",
         html.I(html.rsquotify("don't")),
         " fit their rule. If they did, they would immediately see the more general rule that was applying. This is a case of what psychologists call ",
         html.singlequote("positive bias"),
         ". It is one of the many biases, or fundamental errors, which beset the human mind.",
         html.P(),
         "There is a thriving community of rationalists at the website ",
         html.link('http://www.lesswrong.com', "Less Wrong"),
         html.rsquotify(" who are working to find ways to correct these fundamental errors. If you'd like to learn how to perform better with the hardware you have, you may want to pay them a visit.")]
    return h
Example #3
0
 def evaluate(self, request):
     h1 = html.Table(rules='all',
                     _=[[html.Tr([html.Th("Triplet"),
                                  html.Th("Your judgment"),
                                  html.Th("In fact, it's")])]
                        +[triplet.display(considered_awesome)
                          for triplet, considered_awesome in zip(test_triplets, self.tests)]])
     errors = self.match_rules()
     bestscore, besttest = min((nerrors_k, k) for k, nerrors_k in enumerate(errors))
     log('evaluate %r %r %r', self.id, besttest, bestscore)
     if bestscore >= 3:
         h2 = enlighten(html.rsquotify("I'm not sure what rule you settled on."))
     else:
         h2 = candidate_rules[besttest].explain(bestscore)
     h3 = [html.rsquotify("If you'd like to learn more about positive bias, you may enjoy the article "),
           html.link('http://www.overcomingbias.com/2007/08/positive-bias-l.html',
                     html.singlequote("Positive Bias: Look Into the Dark")),
           ".",
           html.P(),
           html.rsquotify("If you'd like to learn more about the experiment which inspired this test, look for a paper titled "),
           html.singlequote("On the failure to eliminate hypotheses in a conceptual task"), 
           " (Quarterly Journal of Experimental Psychology, 12: 129-140, 1960)."]
     request.reply([h1, html.P(), h2, html.P(), h3, footer])