Deterministic algorithms and environments #
A deterministic algorithm chooses its action in a deterministic way. That is, that action is given by a measurable function of the history and of the current observation instead of a general Markov kernel. Similarly, a deterministic environment gives feedback in a deterministic way.
Main definitions #
We introduce two typeclasses IsDeterministicAlg and IsDeterministicEnv to express that
an algorithm or an environment is deterministic. We also give definitions for the initial action
and the next action of a deterministic algorithm, and for the feedback functions of a deterministic
environment. Finally, we give a construction of a deterministic algorithm and environment from
measurable functions.
IsDeterministicAlg alg: a typeclass expressing that the algorithmalgis deterministic.IsDeterministicEnv env: a typeclass expressing that the environmentenvis deterministic.nextAction alg n: the function that gives the action of a deterministic algorithmalgat stepn, as a function of the history beforenand of the observation at stepn.actionZero alg: the initial action of a deterministic algorithmalg, as a function of the first observation. This isnextAction alg 0applied to the empty history.feedbackFun env n: the function that gives the feedback of a deterministic environmentenvat stepn, as a function of the history, the current observation and the current action.feedbackFunZero env: the function that gives the initial feedback of a deterministic environmentenv. This isfeedbackFun env 0applied to the empty history.detAlgorithm nextA h_next: a deterministic algorithm that chooses its action according to the measurable functionnextA(with proof of measurabilityh_next). The initial action isfun o โฆ nextA 0 (default, o).detEnvironment obs f hf: a deterministic environment with observation kernelsobs, that gives feedback according to the measurable functionf(with proof of measurabilityhf).
An algorithm is deterministic if its actions are determined by measurable functions of the history and of the current observation (and not possibly random kernels).
- exists_nextAction (n : โ) : โ (nextAction : Hist ๐ ๐ ๐จ n ร ๐ โ ๐) (h_meas : Measurable nextAction), alg.policy n = ProbabilityTheory.Kernel.deterministic nextAction h_meas
Instances
The action of a deterministic algorithm at step n, as a function of the history before n
and of the observation at step n.
Equations
- Learning.nextAction alg n = โฏ.choose
Instances For
The initial action of a deterministic algorithm, as a function of the first observation.
Equations
- Learning.actionZero alg o = Learning.nextAction alg 0 (default, o)
Instances For
An environment is deterministic if its feedbacks are determined by measurable functions of the history, the observation and the action (and not possibly random kernels).
- exists_f (n : โ) : โ (f : (Hist ๐ ๐ ๐จ n ร ๐) ร ๐ โ ๐จ) (hf : Measurable f), env.feedback n = ProbabilityTheory.Kernel.deterministic f hf
Instances
The feedback function of a deterministic environment at step n.
Equations
- Learning.feedbackFun env n = โฏ.choose
Instances For
The initial feedback function of a deterministic environment, as a function of the first observation and the first action.
Equations
- Learning.feedbackFunZero env p = Learning.feedbackFun env 0 ((default, p.1), p.2)
Instances For
A deterministic algorithm, which chooses the action given by the function nextA.
The initial action is fun o โฆ nextA 0 (default, o).
Equations
- Learning.detAlgorithm nextA h_next = { policy := fun (n : โ) => ProbabilityTheory.Kernel.deterministic (nextA n) โฏ, isMarkovKernel_policy := โฏ }
Instances For
A deterministic environment, where the feedback is given by evaluating fixed measurable functions.
Equations
- Learning.detEnvironment obs f hf = { obs := obs, feedback := fun (n : โ) => ProbabilityTheory.Kernel.deterministic (f n) โฏ, isMarkovKernel_obs := instโ, isMarkovKernel_feedback := โฏ }