⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Optimizer Race: SGD vs Momentum vs Adam

This simulation demonstrates how optimization algorithms are used to train machine learning models, running plain gradient descent, momentum-based gradient descent, and Adam side by side on the same 3D loss surface so you can watch, in real time, why they converge at different speeds and along different paths. Switch between a convex bowl, an elongated ravine, a saddle point, and a landscape with multiple local minima to see each optimizer's characteristic behaviour — plain SGD zig-zagging across narrow valleys, momentum smoothing that zig-zag into a fast diagonal descent, and Adam's per-parameter adaptive step size letting it push through saddle points where the gradient nearly vanishes. Tune the learning rate and momentum coefficient live and hit Run to race all three from the same starting point.