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 | Public Attributes | List of all members
agent.tests.test_greedy.TestGreedy Class Reference

Test the Greedy agent solver. More...

Inheritance diagram for agent.tests.test_greedy.TestGreedy:

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
 

Detailed Description

Test the Greedy agent solver.

Definition at line 6 of file test_greedy.py.

Member Function Documentation

◆ setUp()

None agent.tests.test_greedy.TestGreedy.setUp (   self)

Create an object to help with testing.

Definition at line 11 of file test_greedy.py.

◆ test_always_exploit()

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.

◆ test_update()

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.

Member Data Documentation

◆ agent

agent.tests.test_greedy.TestGreedy.agent

Definition at line 15 of file test_greedy.py.


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