```python
R = adam_online_regret([[1.0]] * 4, [0.0], alpha=0.5)
print([round(r, 4) for r in R])
```
Output:
[1.0, 1.5, 1.6464, 1.7887]
Reasoning:
Round 1 pays |0 - 1| = 1 and the best fixed point for that one loss is 1, so the regret starts at 1. The learner then moves toward 1, so later rounds cost less than 1 each while the hindsight point still pays 0, and the regret grows ever more slowly.
Adam's convergence result is stated in the online setting: at each round the optimizer commits to parameters θt, only then is the loss ft revealed, and it pays ft(θt). Its score is the regret, the total loss paid minus the loss of the best single fixed point chosen with hindsight. Run the version of Adam the paper analyses on a stream of absolute-value losses and report the regret after every round.
centers: array of shape (T, d). Round t reveals ft(θ)=∑i=1d∣θi−ct,i∣ with ct = row t−1.
theta1: the first prediction θ1 (length d).
Returns a list of T floats; entry t−1 is the regret after t rounds,
R(t)=∑s=1tfs(θs)−minθ∑s=1tfs(θ).
The optimizer, with m0=v0=0 and gt=sign(θt−ct) (the subgradient, 0 where θt,i=ct,i):
β1,t=β1λt−1,mt=β1,tmt−1+(1−β1,t)gt,vt=β2vt−1+(1−β2)gt2,m^t=1−β1tmt,v^t=1−β2tvt,θt+1=θt−tαv^t+ϵm^t.
Notes
The bias correction uses the constant β1, not β1,t.
The minimum is over all of Rd; the losses separate by coordinate.
ft is evaluated at θt before the update that uses gt.