The ball starts somewhere random
The weight starts at w = −1 and the loss there is 16.50. The goal is to reach the bottom of the valley, where the loss is lowest.
Measure the slope
The slope of the loss at this point is −8. A negative slope means the valley goes down to the right, a positive one to the left. The red arrow runs parallel to the surface and points the way down.
Take a step against the slope
The new w is the old one minus the learning rate times the slope: −1 − 0.20 · (−8) = 0.60. The loss is now 6.26.
Step 2
The same two moves repeat: measure the slope, step against it. Now w = 1.56 and the loss is 2.57. As the slope shrinks the steps get shorter, and near the bottom the arrow is hidden.
Step 3
The same two moves repeat: measure the slope, step against it. Now w = 2.14 and the loss is 1.25. As the slope shrinks the steps get shorter, and near the bottom the arrow is hidden.
Step 4
The same two moves repeat: measure the slope, step against it. Now w = 2.48 and the loss is 0.77. As the slope shrinks the steps get shorter, and near the bottom the arrow is hidden.
Step 5
The same two moves repeat: measure the slope, step against it. Now w = 2.69 and the loss is 0.60. As the slope shrinks the steps get shorter, and near the bottom the arrow is hidden.
Step 6
The same two moves repeat: measure the slope, step against it. Now w = 2.81 and the loss is 0.53. As the slope shrinks the steps get shorter, and near the bottom the arrow is hidden.
Step 7
The same two moves repeat: measure the slope, step against it. Now w = 2.89 and the loss is 0.51. As the slope shrinks the steps get shorter, and near the bottom the arrow is hidden.
Step 8
The same two moves repeat: measure the slope, step against it. Now w = 2.93 and the loss is 0.50. As the slope shrinks the steps get shorter, and near the bottom the arrow is hidden.
The ball reached the bottom
After 8 steps w = 2.93 and the loss is 0.50. The slope is almost zero and so are the steps. Learning stops here.