Agents
This section discusses the common features of agents (algorithms) implemented in this packages.
BanditOpt.Agents
— Module.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.
AgentBase
BanditOpt.Agents.AgentBase
— Type.AgentBase
AgentBase
is the base type for all MAB Algorithms
Methods
Base.show
— Function.show( agent::AgentBase )
Prints information about agent into the specified I/O.
Base.:==
— Function.==
Can be used to compare two agents.
BanditOpt.Agents.make_agents_with_k
— Function.make_agents_with_k( K::Int64, agent_list::Vector{} )
Returns a vector of agents specified in agent_list
with K
arms.
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.
Functions
reset!()
BanditOpt.Agents.reset!
— Function.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.
info_str()
BanditOpt.Agents.info_str
— Function.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.
get_arm_index()
BanditOpt.Agents.get_arm_index
— Function.get_arm_index( agent::StationaryAgentBase )
Gets the index of next arm to pull.
Example
update_reward!()
BanditOpt.Agents.update_reward!
— Function.update_reward!( agent::StationaryAgentBase, r::Real )
Updates the reward to bandit algorithm agent
. r
must a real number within valid range.
NonStationaryAgentBase
_TODO_