Original Post
So, I just finished making a pong game, and I am pretty happy with how my AI turned out, but I though it might be interesting to see how other people would tackle this problem, so I could get the feel for some of the methods that are used to do this kind of thing. Anyways, here's mine, it's in java, but I think the idea is clear enough even if syntax is a bit different between different languages (the 2.1 and 2.5 are just the numbers that seems to work the best with the ball speed and screen size I was using). computerPaddlePosition += ( ball.getY() - computerPaddlePosition ) * Math.pow( (double)ball.getX() / (WINDOW_WIDTH * 2.1), 2.5 );