The entire game is written as a single HTML page, so using the "View Page Source" feature (if available) of your web browser shows the entire source code of this game. The auto-play algorithm is present in the function named autoMove(). It is about 100 lines of code that decides the next move of the player.
Direct link to the autoMove() source code: https://github.com/susam/invaders/blob/0.9.0/invaders.html#L...