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_base_bandit.TestBaseBandit Class Reference

Tests the base class that all bandits rely on. More...

Inheritance diagram for bandit.tests.test_base_bandit.TestBaseBandit:

Public Member Functions

 test_instantiate_k (self)
 Test that the bandit properly sets the number of arms.
 

Detailed Description

Tests the base class that all bandits rely on.

Since this is an abstract class, it uses a simple inheriting class to allow testing of the defined functionality.

Definition at line 25 of file test_base_bandit.py.

Member Function Documentation

◆ test_instantiate_k()

bandit.tests.test_base_bandit.TestBaseBandit.test_instantiate_k (   self)

Test that the bandit properly sets the number of arms.

Any positive integer is permitted and everything else is rejected. This mimics real life where you can't have a non-natural number of arms. Zero is explicitly excluded, since it makes the object trivial.

Definition at line 32 of file test_base_bandit.py.


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