k-Armed Bandit 1.0.0
A collection of k-armed bandits and assoicated agents for reinforcement learning
Loading...
Searching...
No Matches
Public Member Functions | List of all members
agent.tests.test_base_agent.TestBaseAgent Class Reference

Test the BaseAgent class. More...

Inheritance diagram for agent.tests.test_base_agent.TestBaseAgent:

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.
 

Detailed Description

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.

Member Function Documentation

◆ test_exploitation()

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.

◆ test_exploration()

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.

◆ test_q_table_creation()

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.


The documentation for this class was generated from the following file: