AlexMennen comments on Prisoner's Dilemma (with visible source code) Tournament - Less Wrong

47 Post author: AlexMennen 07 June 2013 08:30AM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (232)

You are viewing a single comment's thread. Show more comments above.

Comment author: itaibn0 06 June 2013 12:36:01PM *  1 point [-]

Using ThrustVectoring's idea, I have a template other people can use to make a clique-team. The following code

(let ((time (current-inexact-milliseconds))
(template '(let ((time (current-inexact-milliseconds))
(template '2))
(lambda (opponent)
(if (let pattern-match ((pattern template)
(value opponent))
(cond
((pair? pattern) (and (pair? value)
(pattern-match (car pattern) (car value))
(pattern-match (cdr pattern) (cdr value))))
((number? pattern) (case (+ pattern 1)
((1) #t)
((3) (equal? value template))
(else (and (number? value)
(= pattern value)))))
(#t (eq? pattern value))))
'C
0)))))
(lambda (opponent)
(if (let pattern-match ((pattern template)
(value opponent))
(cond
((pair? pattern) (and (pair? value)
(pattern-match (car pattern) (car value))
(pattern-match (cdr pattern) (cdr value))))
((number? pattern) (case (+ pattern 1)
((1) #t)
((3) (equal? value template))
(else (and (number? value)
(= pattern value)))))
(#t (eq? pattern value))))
'C
(if (= (* 369 271) 99999)
'D
'C))))

Tests weather the opponent code is based on the same pattern, and if so, cooperates. Otherwise it verifies an arithmetical fact and then defects.

ETA: Sorry, I was writing this in a hurry. To clarify, the idea was to create a Schelling point for a specific AbsoutismBot wrapper which will help all of the submitters to cooperate. Unfortunately, this current program doesn't work (and the indentation doesn't work either). I will try to modify it in the future.

ETA: Boy, the original is so bug-ridden it's funny. Anyways, I tested this and it should work. Use this for Schelling point needs.

ETA: Bah, I give up in trying to get it indented properly.

ETA: AlexMennen has clarified the rules so that my meta-strategy is illegal.

Comment author: AlexMennen 10 June 2013 08:46:24PM 3 points [-]

Copying code written by others would be considered a violation of the one submission per person rule.