Extend the one-variable optimizer to a two-dimensional surface f(x,y)=x²+y². Return every point so convergence can be inspected axis by axis.
Required APIdef gradient_descent_2d(x, y, learning_rate, steps):
return [[step, x, y, loss], ...]BehaviorThink through the mechanism first if you want the extra reasoning step. It never blocks the editor.
gradient_descent_2d(1.0, 2.0, 0.25, 1)both axes must move under the same gradient rule
gradient_descent_2d(0.0, 0.0, 0.5, 2)the minimum must remain fixed
2 hidden edge tests run after the visible contract passes.
Run Tests to see the contract verdicts here.