Table of Contents

Sockets and Rockets

In this fachpraktikum you will learn about socket programming and text based protocols. You will implement a bot that plays games of shootout.

Shootout

Shootout is a very simple kids game in which you try to shoot your opponent. In each round of the game, each player chooses one of three moves (reload, shoot, protect). Reloading adds a bullet to your gun. Note that you can reload multiple times in a row, each time adding a bullet to your gun. Shooting uses up one bullet if your gun contains at least one bullet at the time. The goal is to shoot your opponent when he is not protecting himself while you have at least one bullet in your gun. If both players shoot with loaded guns in the same round the game is tied. After 25 rounds in which no player is shot, the player with the more bullets in the gun wins.

There is a server running at vms03.ethz.ch and listens on port 1500. The server collects the moves of both players for each round before revealing the moves to both players. Also, the server keeps track of each players performance (see scoring).

Exercises