def test_should_apply_reinforcement_learning(self, cfg):
    cl = Classifier(reward=34.29, immediate_reward=11.29, cfg=cfg)
    population = ClassifiersList(*[cl])
    ClassifiersList.apply_reinforcement_learning(population, 0, 28.79, cfg.beta, cfg.gamma)
    assert (abs((33.94 - cl.r)) < 0.1)
    assert (abs((10.74 - cl.ir)) < 0.1)
def test_should_apply_reinforcement_learning(self, cfg):
    cl = Classifier(reward=34.29, immediate_reward=11.29, cfg=cfg)
    population = ClassifiersList(*[cl])
    ClassifiersList.apply_reinforcement_learning(population, 0, 28.79, cfg.beta, cfg.gamma)
    assert (abs((33.94 - cl.r)) < 0.1)
    assert (abs((10.74 - cl.ir)) < 0.1)