Every time you restart the program, the box will appear in a different spot and the ball's speed and direction will change, so you can see how the cat responds to slower or faster balls.
An example of Proportional - Integral - Derivate control. The cat is following the ball; how closely it follows depends on the values Kp, Ki, and Kd. Holding down <b> makes a block appear for the ball to bounce off of. It would be easy to just have the cat's x position always be equal to the ball's x position by definition, but doing it this way makes it look more like a person is controlling the cat.