Skip to content

Commit 21ad4d7

Browse files
committed
Changes to documentation and style
1 parent 15463da commit 21ad4d7

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

axelrod/strategies/selfsteem.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ class SelfSteem(Player):
1717
If 0.95 > |f| > 0.3, rational behavior; follows TitForTat algortithm.
1818
If 0.3 > f > -0.3; random behavior.
1919
If f < -0.95, algorithm is at rock bottom; always cooperates.
20+
21+
Names:
22+
23+
- SelfSteem: [Andre2013]_
2024
"""
2125

2226
name = 'SelfSteem'
@@ -32,7 +36,7 @@ class SelfSteem(Player):
3236

3337
def strategy(self, opponent: Player) -> Action:
3438
turns_number = len(self.history)
35-
sine_value = sin(2*pi*turns_number/10)
39+
sine_value = sin( 2 * pi * turns_number / 10 )
3640

3741
if sine_value > 0.95:
3842
return D

docs/reference/all_strategies.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ Here are the docstrings of all the strategies in the library.
135135
.. automodule:: axelrod.strategies.shortmem
136136
:members:
137137
:undoc-members:
138+
.. automodule:: axelrod.strategies.selfsteem
139+
:members:
140+
:undoc-members:
138141
.. automodule:: axelrod.strategies.titfortat
139142
:members:
140143
:undoc-members:

0 commit comments

Comments
 (0)