k-Armed Bandit 1.0.0
A collection of k-armed bandits and assoicated agents for reinforcement learning
|
Test the Greedy agent solver. More...
Public Member Functions | |
None | setUp (self) |
Create an object to help with testing. | |
test_always_exploit (self) | |
Test that the algorithm always chooses exploit. | |
test_update (self) | |
Test that the update works correctly. | |
Public Attributes | |
agent | |
Test the Greedy agent solver.
Definition at line 6 of file test_greedy.py.
None agent.tests.test_greedy.TestGreedy.setUp | ( | self | ) |
Create an object to help with testing.
Definition at line 11 of file test_greedy.py.
agent.tests.test_greedy.TestGreedy.test_always_exploit | ( | self | ) |
Test that the algorithm always chooses exploit.
Since this is greedy, once a value is the best, it should always pick that option.
Definition at line 17 of file test_greedy.py.
agent.tests.test_greedy.TestGreedy.test_update | ( | self | ) |
Test that the update works correctly.
The agent uses a weighted average, so use known values to ensure correct calculation.
Definition at line 31 of file test_greedy.py.
agent.tests.test_greedy.TestGreedy.agent |
Definition at line 15 of file test_greedy.py.