Help : Pond AI

Hello, I need your help.
On this website : https://blockly-games.appspot.com there is a game : Pond. For this game we have to do an AI in JS.

Can you help me how to do it ?