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
bandit.tests.test_static.TestStaticBandit Class Reference

Test case to test that the static bandit works correctly. More...

Inheritance diagram for bandit.tests.test_static.TestStaticBandit:

Public Member Functions

 test_instantiate_rewards (self)
 Test that the class can handle reward values.
 
 test_correct_rewards (self)
 Test that the right reward is returned when each arm is selected.
 

Detailed Description

Test case to test that the static bandit works correctly.

Definition at line 6 of file test_static.py.

Member Function Documentation

◆ test_correct_rewards()

bandit.tests.test_static.TestStaticBandit.test_correct_rewards (   self)

Test that the right reward is returned when each arm is selected.

This should allow any indexing inputs that you could use for numpy arrays and reject everything else. The correct inputs should return the appropriate rewards that match the reward values set by the class.

Definition at line 46 of file test_static.py.

◆ test_instantiate_rewards()

bandit.tests.test_static.TestStaticBandit.test_instantiate_rewards (   self)

Test that the class can handle reward values.

Acceptable values should be some sort of iterable with a number of elements equal to k. Each element should be numeric. Alternatively, None can be used to have the class randomly select values.

Definition at line 11 of file test_static.py.


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