Skip to content

Commit c20a106

Browse files
committed
Conflicts: axelrod/tests/strategies/test_axelrod_second.py
2 parents a643480 + 36ac9a4 commit c20a106

File tree

4 files changed

+30
-9
lines changed

4 files changed

+30
-9
lines changed

CHANGES.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# v3.9.0, 2017-10-13
2+
3+
New strategies, a minor bug fix and a small documentation improvement.
4+
5+
- Add the Bush Mosteller strategy
6+
https://github.com/Axelrod-Python/Axelrod/pull/1002
7+
- Add k42r from Fortran code
8+
https://github.com/Axelrod-Python/Axelrod/pull/1135
9+
- Add MemoryDecay
10+
https://github.com/Axelrod-Python/Axelrod/pull/1137
11+
- Add k32r from Fortran code
12+
https://github.com/Axelrod-Python/Axelrod/pull/1138
13+
- Add Random Tit For Tat
14+
https://github.com/Axelrod-Python/Axelrod/pull/1136
15+
- Add k42r from Fortran code
16+
https://github.com/Axelrod-Python/Axelrod/pull/1139
17+
- Add reference to documentation
18+
https://github.com/Axelrod-Python/Axelrod/pull/1134
19+
- Fix minor bug in the fingerprints
20+
https://github.com/Axelrod-Python/Axelrod/pull/1140
21+
22+
23+
Here are all the commits for this PR:
24+
https://github.com/Axelrod-Python/Axelrod/compare/v3.9.0...v3.8.1
25+
126
# v3.8.1, 2017-10-13
227

328
Minor change to behaviour of Champion

axelrod/tests/strategies/test_axelrod_second.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,30 +509,27 @@ def test_strategy(self):
509509
self.versus_test(axelrod.Cooperator(), expected_actions=actions)
510510

511511
# It will take until turn 18 to respond decide to repond D->D
512-
random.seed(1)
513512
actions = [(C, D)]
514513
actions += [(C, D), (D, D), (D, D), (C, D), (C, D), (C, D), (D, D),
515514
(D, D), (C, D), (C, D), (D, D), (C, D), (D, D), (C, D),
516515
(C, D), (D, D), (C, D)] # Randomly choose
517516
actions += [(D, D)] * 30 # Defect
518-
self.versus_test(axelrod.Defector(), expected_actions=actions)
517+
self.versus_test(axelrod.Defector(), expected_actions=actions, seed=1)
519518

520519
# Highly-defective opponent
521520
# It will take until turn 20 to respond decide to repond D to C
522521
opponent_actions = [D] * 17 + [C, C, C, C]
523522
almost_defector = axelrod.MockPlayer(actions=opponent_actions)
524523

525-
random.seed(1)
526524
actions = [(C, D)]
527525
actions += [(C, D), (D, D), (D, D), (C, D), (C, D), (C, D), (D, D),
528526
(D, D), (C, D), (C, D), (D, D), (C, D), (D, D), (C, D),
529527
(C, D), (D, D), (C, C)] # Randomly choose
530528
actions += [(C, C)] # Coop for a minute
531529
actions += [(D, C), (D, C)]
532-
self.versus_test(almost_defector, expected_actions=actions)
530+
self.versus_test(almost_defector, expected_actions=actions, seed=1)
533531

534532
#Here it will take until turn 40 to detect random and defect
535-
random.seed(2)
536533
actions = [(C, C)]
537534
actions += [(C, D), (D, C), (C, D), (D, C), (C, D), (C, C), (C, D),
538535
(C, C), (C, D), (D, C), (C, D), (D, C), (C, D), (D, C),
@@ -541,7 +538,7 @@ def test_strategy(self):
541538
(C, D), (D, C), (C, D), (D, C), (C, D), (D, C), (C, D)] #Randomly choose
542539
actions += [(D, C), (C, D), (D, C)] # 17 D have come, so tit for tat for a while
543540
actions += [(D, D), (D, C)] * 100 # Random finally detected
544-
self.versus_test(axelrod.Alternator(), expected_actions=actions)
541+
self.versus_test(axelrod.Alternator(), expected_actions=actions, seed=2)
545542

546543
class TestCave(TestPlayer):
547544
name = "WmAdams"
@@ -577,4 +574,3 @@ def test_strategy(self):
577574
actions = [(C, D), (C, D), (C, D), (C, D), (C, D), (D, D), (C, D), (C, D), (D, D), (C, D), (D, D), (C, C)]
578575
actions += [(C,C)] * 99
579576
self.versus_test(changed_man, expected_actions=actions, seed=1)
580-

axelrod/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.8.1"
1+
__version__ = "3.9.0"

docs/reference/overview_of_strategies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ repository.
119119
"K46R_", "Graham J Eatherley", ":class:`Eatherley <axelrod.strategies.axelrod_second.Eatherley>`"
120120
"K47R_", "Richard Hufford", "Not Implemented"
121121
"K48R_", "George Hufford", "Not Implemented"
122-
"K49R_", "Rob Cave", "Not Implemented"
122+
"K49R_", "Rob Cave", ":class:`Cave <axelrod.strategies.axelrod_second.Cave>`"
123123
"K50R_", "Rik Smoody", "Not Implemented"
124124
"K51R_", "John Willaim Colbert", "Not Implemented"
125125
"K52R_", "David A Smith", "Not Implemented"

0 commit comments

Comments
 (0)