reveal.js comes with a few themes built in:
Black (default) -
White -
League -
Sky -
Beige -
Simple
Serif -
Night -
Moon -
Solarized
TODO: Sacrifice a cat
class TitForTat(Player):
"""A player starts by cooperating and then mimics previous move by opponent."""
name = 'Tit For Tat'
classifier = {
'memory_depth': 1, # Four-Vector = (1.,0.,1.,0.)
'stochastic': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
@staticmethod
def strategy(opponent):
return 'D' if opponent.history[-1:] == ['D'] else 'C'
class TestTitForTat(TestPlayer):
name = "Tit For Tat"
player = axelrod.TitForTat
expected_classifier = {
'memory_depth': 1,
'stochastic': False,
'inspects_source': False,
'manipulates_source': False,
'manipulates_state': False
}
def test_strategy(self):
"""Starts by cooperating."""
self.first_play_test(C)
def test_effect_of_strategy(self):
"""Repeats last action of opponent history."""
self.markov_test([C, D, C, D])
self.responses_test([C] * 4, [C, C, C, C], [C])
self.responses_test([C] * 5, [C, C, C, C, D], [D])
class MindBender(MindWarper):
"""
A player that changes the opponent's strategy by modifying the internal
dictionary.
"""
name = 'Mind Bender'
classifier = {
'memory_depth': -10,
'stochastic': False,
'inspects_source': False,
'manipulates_source': True, # changes what opponent will do
'manipulates_state': False
}
@staticmethod
def strategy(opponent):
opponent.__dict__['strategy'] = lambda opponent: 'C'
return 'D'