Skip to content

Commit 8e8a5b7

Browse files
committed
Add stochastic classifier
1 parent 72ec845 commit 8e8a5b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/axelrod_fortran/player.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from axelrod.action import Action
66
from axelrod import Game
77
from ctypes import cdll, c_int, c_float, byref, POINTER
8+
from .strategies import classifiers
89

910
C, D = Action.C, Action.D
1011
strategies = cdll.LoadLibrary('libstrategies.so')
@@ -30,6 +31,9 @@ def __init__(self, original_name, game=Game()):
3031
self.original_name = original_name
3132
self.original_function = self.original_name
3233
self.game = game
34+
is_stochastic = classifiers[self.original_name]['stochastic']
35+
if is_stochastic is not None:
36+
self.classifier['stochastic'] = is_stochastic
3337

3438
def __enter__(self):
3539
return self

0 commit comments

Comments
 (0)