Bookkeeping definitions for finite action space sequential learning problems #
If the number of actions is finite, it makes sense to define the number of times each action was chosen, the time at which an action was chosen for the nth time, the value of the reward at that time, the sum of rewards obtained for each action, the empirical mean reward for each action, etc.
For each definition that take as arguments a time t : โ, a history h : โ โ ๐ ร R, and possibly
other parameters, we put the time and history at the end in this order, so that the definition can
be seen as a stochastic process indexed by time t on the measurable space โ โ ๐ ร R.
Number of times action a was chosen up to time t (excluding t).
Equations
- Learning.pullCount A a t ฯ = {s โ Finset.range t | A s ฯ = a}.card
Instances For
Number of pulls of arm a in the history before time n.
This is the number of entries in h in which the arm is a.
Instances For
The event that the action at time n is b and that b was pulled k times before is
a preimage by ((history O A R' n, O n), A n).
Number of steps until action a was pulled exactly m times.
Equations
Instances For
If we pull action a at time 0, the first time at which it is pulled once is 0.
stepsUntil a m is a stopping time with respect to the filtration filtrationAction.
Reward obtained when pulling action a for the m-th time.
If it is never pulled m times, the reward is given by the second component of ฯ, which in
applications will be indepedent with same law.
Equations
- Learning.rewardByCount A R' a m ฯ = match Learning.stepsUntil A a m ฯ.1 with | none => ฯ.2 m a | some n => R' n ฯ.1
Instances For
The value at 0 does not matter (it would be the "zeroth" reward). It should be considered a junk value.
Array of rewards by count, truncated at time t: the entry (a, m) is the reward received at
the (m + 1)-th pull of action a if that pull happened before time t, and the entry
(m + 1, a) of the auxiliary array ฯ.2 otherwise.
This is an auxiliary definition used to prove results about the distribution of rewardByCount.
It is defined recursively: at time t, the
entry (A t, pullCount A (A t) t) is replaced by the reward R' t.
See rewardByCountUntil_apply_of_lt_pullCount and rewardByCountUntil_apply_of_pullCount_le.
Equations
- Learning.rewardByCountUntil A R' 0 xโ = fun (p : ๐ ร โ) => xโ.2 (p.2 + 1) p.1
- Learning.rewardByCountUntil A R' t.succ xโ = Function.update (Learning.rewardByCountUntil A R' t xโ) (A t xโ.1, Learning.pullCount A (A t xโ.1) t xโ.1) (R' t xโ.1)
Instances For
If action a was pulled at most m times before time t, then the entry (a, m) of
rewardByCountUntil A R' t ฯ is the entry (m + 1, a) of the auxiliary array.
If action a was pulled more than m times before time t, then the entry (a, m) of
rewardByCountUntil A R' t ฯ is the reward received at the (m + 1)-th pull of a.
rewardByCountUntil A R' t (x, z) p depends on z only through z (p.2 + 1) p.1.
For each entry, rewardByCountUntil A R' t ฯ coincides with rewardByCount for t large
enough.
Measurability of rewardByCountUntil A R' t with respect to a ฯ-algebra m for which the
actions and rewards before time t and the auxiliary array are measurable.