@@ -0,0 +1,1338 @@
+# -*- coding: utf-8 -*-%0A%0A%22%22%22%0AGeller - by Martin Chorley (@martinjc), heavily inspired by Matthew Williams (@voxmjw)%0A%0AThis code is inspired by Matthew Williams' talk %0A%22Cheating at rock-paper-scissors %E2%80%94 meta-programming in Python%22%0Agiven at Django Weekend Cardiff in February 2014.%0A%0AHis code is here: https://github.com/mattjw/rps_metaprogramming%0Aand there's some more info here: http://www.mattjw.net/2014/02/rps-metaprogramming/%0A%0AThis code is **way** simpler than Matt's, as in this exercise we already%0Ahave access to the opponent instance, so don't need to go %0Ahunting for it in the stack. Instead we can just call it to%0Asee what it's going to play, and return a result based on that%0A%0AThis is almost certainly cheating, and more than likely against the%0Aspirit of the 'competition' :-)%0A%22%22%22%0A%0Aimport random%0Afrom axelrod import Player%0A%0A%0Aclass Geller(Player):%0A%0A    def strategy(self, opponent):%0A%0A        #%0A        # See what the opponent will throw%0A        # respond with whatever gives least jail time%0A        rand_state = random.getstate()%0A        opp_move = opponent.strategy(self)%0A        random.setstate(rand_state)%0A%0A        if opp_move == 'C':%0A            return 'C'%0A        elif opp_move == 'D':%0A            return 'D'%0A%0A    def __repr__(self):%0A        %22%22%22%0A        The string method for the strategy:%0A        %22%22%22%0A        return 'Geller'%0A

Create geller.py