0/4 tasks
The robot has a throwing arm whose power goes from 1 to 10. It doesn’t know where the ball will land for each power. Make some throws, collect data and train a line; then let the model predict the power it takes to land in the basket.
Pick a power and throw. Wherever the ball lands, a point is added to the chart.
Throw with different powers. Every throw is a data point made of a power and a distance.
The basket is 3.5 m away. You don’t pick the power: the model works it out from the line.
First make at least two throws and find the line.
Move the line closer to the points with the sliders. The red lines show how far each point is from the line: that is the error. Then watch the model do the same job.
The line as Python code
power = 5distance = 0.4 * power + 1# ≈ 3 mtarget = 3.5power = (target - 1) / 0.4