DeterministicBanditEnvironment<T>

Models & Types · AiDotNet.ReinforcementLearning.Environments

A deterministic multi-armed bandit environment for testing purposes.

Implements: IEnvironment<T>

For Beginners

A bandit is like a slot machine. Each “arm” (action) has a fixed reward. This deterministic version always gives the same reward for the same action, making it perfect for testing - you always know what reward to expect.

How It Works

This environment provides a simple bandit setting where each action has a fixed deterministic reward. It’s useful for testing RL data loaders and agents with predictable outcomes.

Constructors

Constructor Summary
DeterministicBanditEnvironment(int actionSpaceSize, int observationSpaceDimension, int maxSteps, int seed) Initializes a new instance of the DeterministicBanditEnvironment class.

Properties

Property Summary
bool IsContinuousActionSpace { get; }
int ActionSpaceSize { get; }
int ObservationSpaceDimension { get; }

Methods

Method Summary
ValueTuple<Vector<T>, T, bool, Dictionary<string, object>> Step(Vector<T> action)
Vector<T> Reset()
void Close()
void Seed(int seed)