Learning Curve

Play against a neural network trained via double DQN.

lives round 0 survived 0:00 trained 0

You fly the white ship.

Arrows or WASD to turn and thrust, space to fire.

← → turn↑ thrustspace fireP pauseV policy vision
Hits / min (self-play)0

How often it hits in its own practice games.

rate = 60 · H / (N · Δt)
H
hits in self-play
N
decision steps
Δt
1/15 s
TD loss0

How wrong its value estimates turn out to be a step later.

L = meanB [ clip(δ, ±1)² ] δ = R + γ³ · Q′(s′, a*) − Q(s, a) a* = argmaxa Q(s′, a) R = rt + γ rt+1 + γ² rt+2 plotted: L̄ ← L̄ + α (L − L̄), α = 0.01
δ
TD error, clipped to ±1
B
batch, 64
γ
discount, 0.97
Q, Q′
live net, target net
s, s′
state now, and three decisions on
r
reward from one decision
running mean of L, the plotted line
Mean max Q0

What it expects the best move available to be worth.

mean max Q = meanB [ maxa Q(s, a) ] Q(s, a) = V(s) + A(s, a) − meana A(s, a)
V
state value
A
advantage
B
batch, 64
s, a
state, action
Epsilon0

How often it moves at random instead of following its policy.

ε = max(εmin, 1 − (1 − εmin) · min(1, n / 3000))
ε
share of decisions taken at random
εmin
0.06, floor
n
transitions
Reward per stepby term

What it is being paid for, term by term.

r = Σi wi · fi bari = wi fi / maxi |wi fi|
fi
term i, per decision
whit
+2.0, paid to the step that fired
waim
+0.04 a step on the intercept
wgot
−1.5
wfire
−0.04
Policy network