class
Crowbar::Evolution::Bandit
- Crowbar::Evolution::Bandit
- Reference
- Object
Overview
Multi-Armed Bandit credit assignment using the Upper Confidence Bound (UCB1) algorithm. Dynamically balances exploitation of high-yield mutators/scopes with exploration of less-tested ones.
Defined in:
crowbar/evolution/bandit.crConstructors
Instance Method Summary
- #arms : Hash(String, Arm)
-
#ensure_arm(name : String) : Arm
Ensure an arm is registered
- #exploration_coeff : Float64
- #exploration_coeff=(exploration_coeff : Float64)
- #pulls_for(name : String) : Int64
-
#record_pull(name : String)
Record that an arm was executed
-
#reward(name : String, value : Float64)
Credit an arm with a reward
- #rewards_for(name : String) : Float64
-
#score_for(name : String) : Float64
Retrieve score for inspection/telemetry
-
#select(available_arms : Array(String), prng : PRNG) : String
Select the best arm among available names based on UCB1 score
- #total_pulls : Int64
- #total_pulls=(total_pulls : Int64)
Constructor Detail
Instance Method Detail
Select the best arm among available names based on UCB1 score