k-Armed Bandit 1.0.0
A collection of k-armed bandits and assoicated agents for reinforcement learning
|
Test the BaseAgent class. More...
Public Member Functions | |
test_q_table_creation (self) | |
Verify that the table initializes with the right values. | |
test_exploitation (self) | |
Test that the class picks the best action based on the table. | |
test_exploration (self) | |
Test that the class picks a random valid action from the table. | |
Test the BaseAgent class.
This tests the creating of the Q-table, as well as the exploration/exploitation helper methods.
Definition at line 23 of file test_base_agent.py.
agent.tests.test_base_agent.TestBaseAgent.test_exploitation | ( | self | ) |
Test that the class picks the best action based on the table.
This tests that the class will reliable return the index associated with the best action. It should also arbitrarily break ties in the case of multiple entries with an equivalent score.
Definition at line 44 of file test_base_agent.py.
agent.tests.test_base_agent.TestBaseAgent.test_exploration | ( | self | ) |
Test that the class picks a random valid action from the table.
Definition at line 69 of file test_base_agent.py.
agent.tests.test_base_agent.TestBaseAgent.test_q_table_creation | ( | self | ) |
Verify that the table initializes with the right values.
Definition at line 30 of file test_base_agent.py.