Skip to content

Commit 55628c7

Browse files
committed
Merge pull request #508 from Axelrod-Python/503
Addressing #503
2 parents 0c88bf8 + 32aca15 commit 55628c7

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ before_install:
1111
install:
1212
- pip install -r requirements.txt
1313
- pip install sphinx
14+
- pip install sphinx_rtd_theme
1415
- pip install coverage
1516
- pip install coveralls
1617
script:

axelrod/strategies/geller.py

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
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-
223
import inspect
234

245
from 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

Comments
 (0)