Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.fictitious-play
AHoF D79 Fictitious Play: in a repeated game each player best-responds to the empirical frequency of the opponent's past actions. With two candidate actions the best response keeps the higher expected payoff and prefers action 0 when its payoff is at least action 1's: prefers-action-zero? p0 p1 = decide (p1 <= p0) best-response-value p0 p1 = if (p1 <= p0) then p0 else p1 (the larger payoff) over exact rationals. Proved native and axiom-free: the preference decision, the best-response (max) value, and the switch when action 1 pays more. Requires audit/decide-nnrat-at-most, logic/if-data (both in the D63 checkpoint). Scope (measured by the kernel): this module has 3 worked instances (statements about specific values). None of its theorems is a guarantee about the algorithm for all inputs; `lein verify rainbow.algorithms.proofs.ahof.fictitious-play` prints this classification.
fictitious/prefers-action-zero?
fictitious/prefers-action-zero? : (x₁ x₂ : ℚ≥0) → data/Bool
ℚ≥0 = nnrat/NonnegativeRational
fictitious/best-response-value
fictitious/best-response-value : (x₁ x₂ : ℚ≥0) → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
fictitious/prefers-higher-payoff
fictitious/prefers-higher-payoff : → bo/is-safe 3/4 1/2 = data/true
= = equality/Eq
fictitious/best-response-is-larger
fictitious/best-response-is-larger : → ac-mcts/node-value 3/4 1/2 = 3/4
= = equality/Eq
fictitious/switches-when-lower
fictitious/switches-when-lower : → bo/is-safe 1/2 3/4 = data/false
= = equality/Eq