33 Test that the update works correctly.
35 The agent uses a weighted average, so use known values to ensure correct calculation.
38 rewards = numpy.array(range(15, 26))
39 expected_results = numpy.array(
40 [15, 15.5, 16, 16.5, 17, 17.5, 18, 18.5, 19, 19.5, 20])
41 for i
in range(expected_results.size):
43 self.
agent.update(action=0, reward=rewards[i])
44 self.assertEqual(self.
agent.table[0], expected_results[i])