YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

The Effect of Optimism in the Face of Uncertainty

A Study of Optimistic Initialization in Multi-Armed Bandits

Project Structure

bandit-project/
β”œβ”€β”€ index.html       ← Main page (hero, theory, simulator, insights)
β”œβ”€β”€ style.css        ← All styles (dark theme, responsive layout)
β”œβ”€β”€ simulation.js    ← Core bandit engine (BanditEnv, EpsilonGreedyAgent, runSimulation)
└── main.js          ← UI logic (Plotly charts, sliders, hero canvas)

How to Run

Just open index.html in any modern browser. No build step, no server needed.

# Option 1: Direct
open index.html

# Option 2: Local server (recommended)
python3 -m http.server 8080
# then visit http://localhost:8080

Algorithm

Ξ΅-Greedy with three initialization strategies:

Strategy Initial Qβ‚€ Exploration drive
Optimistic +5 to +20 High (natural)
Normal 0 Medium (Ξ΅ only)
Pessimistic βˆ’5 to βˆ’20 Low

Update rule: Q(a) ← Q(a) + [R βˆ’ Q(a)] / N(a) (incremental sample mean)

Parameters

Parameter Description Range
K (arms) Number of bandit arms 2 – 10
Iterations Steps per simulation run 100 – 3000
Ξ΅ (epsilon) Exploration probability 0.00 – 0.50
Runs Repetitions averaged together 1 – 50
Οƒ (noise) Reward standard deviation 0.1 – 3.0
Opt Qβ‚€ Optimistic initial value +1 to +20
Pess Qβ‚€ Pessimistic initial value βˆ’1 to βˆ’20

Metrics Tracked

  • Average reward over iterations (smoothed with rolling window)
  • % Optimal action selected β€” how fast the agent finds the best arm
  • Cumulative reward β€” total reward accumulated
  • Arm selection heatmap β€” which arms each strategy visited most

Key Takeaways

  1. Optimism = free exploration β€” even with Ξ΅=0, optimistic agents explore all arms
  2. Faster convergence β€” optimistic agents discover the best arm sooner
  3. Pessimism is costly β€” premature commitment to a suboptimal arm
  4. Ξ΅ still matters β€” for non-stationary environments, keep Ξ΅ > 0

sanjay

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support