Last year we had a project called ``Parallel Pied Pipers'' whose description can be found here. (You should read last year's description before continuing.) This year we're going to use the same basic idea, but now it's a multi-player game! The shape of the field that initially contains the rats is a square of size F meters. In the middle of each of the four sides of the field is a 2m wide gate. Each of the four teams of pipers tries to get rats though their own gate (they are getting paid per captured rat). Once a rat goes through the gate it exits the game. There is a small holding area outside each gate, of size F meters by 10 meters, where a piper can move if he wishes. All pipers start spaced out within the 2m gate.
When pipers are away from other pipers, or are near other pipers from their own team, the piper/rat behavior is the same as last year's project. However, because different piper teams play different music genres, rats are confused by the dissonance of different tunes. In particular, consider a rat that can hear the music of multiple pipers from different teams because they are all within 10m of the rat and playing music. If there is a single dominant tune (i.e., one of the teams has more nearby pipers than any single other team) then the rat will be attracted to the closest of the pipers from that team. Otherwise, the rat will behave as if there is no sound, i.e., the rat will not be attracted to any of the pipers.
Each of the four teams has d pipers. Each piper is executing an instance of the same code, but instantiated with a unique piper-id parameter (between 1 and d). Pipers have complete access to all positional information, including the positions and music-playing status of the other teams' pipers, but pipers do not explicitly communicate with other pipers.
The simulator will detect when all rats have been eliminated, and you will be ranked based on the number of rats that exited though your gate. There will be a timeout to handle cases where some rats simply can't be convinced to go though any gate. We will run some tournaments at the end of class with various values for the parameters F, S (the number of rats), and d.
You will have access to the players and reports from last year's teams. You can choose to use code written last year if you wish, making sure to make suitable acknowledgements. Alternatively, you can write your own code from scratch if you prefer.
Some ideas to think about:
Ken Ross 2015-09-21