Ejemplo n.º 1
0
 def test_hw_value_10(self):
     '''Test first hw problem'''
     _in = TESTS[12]['input']
     _out = TESTS[12]['output']
     tdl = TD_lambda(_in['prob_to_state'], _in['val_estimates'],
                     _in['rewards'])
     result = tdl.get_lambda()
     self.assertEqual(min(result), _out)
Ejemplo n.º 2
0
 def test_practice_value_3(self):
     '''Test third practice problem'''
     _in = TESTS[2]['input']
     _out = TESTS[2]['output']
     tdl = TD_lambda(_in['prob_to_state'], _in['val_estimates'],
                     _in['rewards'])
     result = tdl.get_lambda()
     self.assertEqual(round(min(result), 3), _out)