Classic arcade games: Space invaders

In my city, games arcades are colloquially called 'invaders'. Many generations of players have been brought up with this classic computer game. By now, you know full well that the site is mainly interested in demo mode, that is, getting the computer to play against itself and win about 90% of all games.

The simple strategy of staying just out of range and firing seems to work remarkably well. The battleships are not particularly active, admittedly, though they do speed up when nearing the base. A simple technique of the three ships which are closer to the player firing is employed. Opposing every upcoming rocket would be better tactics. All games will be won by the computer then, by capturing the base, even if the human player loses no lives. Choosing both responses, to the corresponding extent, will set the difficulty level.

Other factors set difficulty, as well, like number of lives and battleships, number of simultaneous rockets allowed, initial height of ships and the ratio of rocket to battleship speed.

The first version of some programs can usually be improved: If you don't think anything of the 'graphics', I concur- I am mainly interested in demo mode, though. (The initial sprites for battleships looked more like kettles!) A rocket will sometimes swish by without a hit. When the battleships are close to the base, occasionally you hardly have time to see the shrapnel which blocks rockets launched, and the base capture condition needs another 6 lines to check more thoroughly. All these are unsightly, but do not affect statistics.

I have not writen a statistics mode for this one, but the computer played 20 games and won 18, which looks close to the 90% target. Here you are getting the executable file, and the source code will be given later. There is also a breakout demo which looks very successful, if sometimes slow. In a few months time, it will be presented. 1