Atari Breakout

“Artificial Intelligence” for Google’s Atari Breakout:

function ballx(){return parseFloat(document.querySelector("#breakout-ball").style.left.split("px")[0]);}
function update(e){try{document.querySelector("#breakout-paddle").style.left=(ballx()-75)+"px";}catch(ex){}}var intervalTimer = setInterval(update, 0);