File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,12 @@ class VeryBad(Player):
8
8
It cooperates in the first three rounds, and uses probability
9
9
(it implements a memory, which stores the opponent’s moves) to decide for
10
10
cooperating or defecting.
11
-
11
+ Due to a lack of information as to what that probability refers to in this
12
+ context, probability(P(X)) refers to (Count(X)/Total_Moves) in this
13
+ implementation
14
+ P(C) = Cooperations / Total_Moves
15
+ P(D) = Defections / Total_Moves = 1 - P(C)
16
+
12
17
Names:
13
18
14
19
- VeryBad: [Andre2013]_
@@ -34,7 +39,7 @@ def strategy(opponent: Player) -> Action:
34
39
total_moves = len (opponent .history )
35
40
cooperations = opponent .cooperations
36
41
37
- cooperation_probability = cooperations / ( total_moves * 1.0 )
42
+ cooperation_probability = cooperations / total_moves
38
43
39
44
if cooperation_probability > 0.5 :
40
45
return C
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ Here are the docstrings of all the strategies in the library.
138
138
.. automodule :: axelrod.strategies.titfortat
139
139
:members:
140
140
:undoc-members:
141
- .. automodule :: axelrod.strategies.worse_and_worse
141
+ .. automodule :: axelrod.strategies.verybad
142
142
:members:
143
143
:undoc-members:
144
144
.. automodule :: axelrod.strategies.worse_and_worse
You can’t perform that action at this time.
0 commit comments