11# -*- coding: utf-8 -*-
22
3- """
4- Geller - by Martin Chorley (@martinjc), heavily inspired by Matthew Williams (@voxmjw)
5-
6- This code is inspired by Matthew Williams' talk
7- "Cheating at rock-paper-scissors — meta-programming in Python"
8- given at Django Weekend Cardiff in February 2014.
9-
10- His code is here: https://github.com/mattjw/rps_metaprogramming
11- and there's some more info here: http://www.mattjw.net/2014/02/rps-metaprogramming/
12-
13- This code is **way** simpler than Matt's, as in this exercise we already
14- have access to the opponent instance, so don't need to go
15- hunting for it in the stack. Instead we can just call it to
16- see what it's going to play, and return a result based on that
17-
18- This is almost certainly cheating, and more than likely against the
19- spirit of the 'competition' :-)
20- """
21-
223import inspect
234
245from axelrod import Actions , Player , random_choice
@@ -29,6 +10,23 @@ class Geller(Player):
2910 """Observes what the player will do in the next round and adjust.
3011
3112 If unable to do this: will play randomly.
13+
14+ Geller - by Martin Chorley (@martinjc), heavily inspired by Matthew Williams (@voxmjw)
15+
16+ This code is inspired by Matthew Williams' talk
17+ "Cheating at rock-paper-scissors — meta-programming in Python"
18+ given at Django Weekend Cardiff in February 2014.
19+
20+ His code is here: https://github.com/mattjw/rps_metaprogramming
21+ and there's some more info here: http://www.mattjw.net/2014/02/rps-metaprogramming/
22+
23+ This code is **way** simpler than Matt's, as in this exercise we already
24+ have access to the opponent instance, so don't need to go
25+ hunting for it in the stack. Instead we can just call it to
26+ see what it's going to play, and return a result based on that
27+
28+ This is almost certainly cheating, and more than likely against the
29+ spirit of the 'competition' :-)
3230 """
3331
3432 name = 'Geller'
0 commit comments