Gradient Descent Simulator

Visualize how the gradient descent algorithm iteratively updates a parameter to find the minimum of a cost function. Adjust the learning rate (alpha) to see the effects of taking steps that are too small or too large.

Target Function f(x) = x⁴ - 4x² + x + 10

Hyperparameters

0.050
Small (0.001) Large (0.2)
-2.50
-3.0 +3.0

Live Metrics

Iteration 0
Current x -2.5000
Cost f(x) 0.0000
Gradient f'(x) 0.0000

Optimization Landscape

Cost Function
Trajectory