FlyHunter

Dennis Shasha

Omniheurist Course

Computer Science


 

Description

In this game, you will play the role of a fly one game and of a flyhunter in another. The flyhunter is armed with k lasers and k detectors where k will be a parameter I will give you on the day of the contest. The flyhunter is also given s shots per laser, another parameter I will give you.

The room is a circle having radius 10 meters. A detector can detect the presence of a fly using a beam that describes a chord in the circle having width 0.1 meter. The laser can kill a fly with a shot but its beam has a width of only 0.05 meter Both the detector and laser beams can point in any direction at every unit time. The fly hunter decides where to put the detectors and laser beams at time 0.

The fly must move 0.2 meters per unit time but can do so in any direction. The fly cannot sense the detection beam nor does the fly know where the detectors are.

In each time unit, all detectors report whether they have detected anything to the flyhunter and the flyhunter can decide for the next time unit: (i) where to point the detectors (direction is expressed as radians) (ii) where to point his/her lasers and whether they should fire. If a fly isn't hit, it specifies where it will be in the next time unit.

Architect

The architect is responsible for responding to these commands, showing the position of the flies and the detection beams to the spectators, telling the spectators whether the fly has been hit, keeping track of the number of laser shots that have been taken, and keeping track of the number of time units that have elapsed. If all laser shots have been fired, then the number of time units is infinite. The graphics should be nice.