this is basically a smart pong ai. It uses the balls y pos to determine where it goes.
It works because when the ball is close, it moves towards the ball. if not, it moves resets it's position. this way, it can find the quickest path to the ball when it gets close.