Agents

Agents

This section discusses the common features of agents (algorithms) implemented in this packages.

BanditOpt.AgentsModule.

BanditOpt.Agents module provides implementations of various multi-arm bandit algorithms and an unified API to access those algorithms. This includes base types for implementing various types of agents and the common interface.

source

AgentBase

AgentBase

AgentBase is the base type for all MAB Algorithms

source

Methods

Base.showFunction.
show( agent::AgentBase )

Prints information about agent into the specified I/O.

source
Base.:==Function.
==

Can be used to compare two agents.

source
make_agents_with_k( K::Int64, agent_list::Vector{} )

Returns a vector of agents specified in agent_list with K arms.

source

StationaryAgentBase

StationaryAgentBase

StationaryAgentBase is the base type for all agents designed to handle stationary arms. Even though it is not enforced, the assumption is the reward updated to stationary agents are from a stationary arm model.

source

Functions

reset!()

reset!( agent::AgentBase )

Resets the internal statistics of the bandit algorithm, except for the number of arms and other algorithm specific parameters. reset!() will make agent as fresh as it was first created.

source

info_str()

info_str( agent::AgentBase, latex::Bool = false )

Return a information string about the agent and it's parameters. If flag latex is set to true, then the returned string will be a compactable latex string.

source

get_arm_index()

get_arm_index( agent::StationaryAgentBase )

Gets the index of next arm to pull.

Example

source

update_reward!()

update_reward!( agent::StationaryAgentBase, r::Real )

Updates the reward to bandit algorithm agent. r must a real number within valid range.

source

NonStationaryAgentBase

_TODO_