Agent design: PacWar

The context

This problem is about designing killer species that live in an imaginary world called PacWorld, created by Donald Knuth of Stanford University. PacWorld is inhabited by several species of tiny creatures called PacMites, all of which are engaged in a constant struggle for survival with every other species. Each individual mite lives out its short lifetime by following a small set of deterministic rules and interacting only with its immediate surroundings. However, in large numbers, the PacMites of a species combine to form complex patterns of behavior, which enable them to compete with PacMites of other species. Your goal is to design a species that will annihilate every other species in this world in a one-on-one duel.

screenshot of Pacworld

Pac World and PacMites

The Dynamics of PacWorld

  • All PacMites of a given species have a common genetic code. The PacMite genetic code has 50 components, we will call genes. Each gene takes on one of four values: 0, 1, 2 or 3. Thus there are 450 possible species of PacMites. We need a small amount of notation to describe the function of the genes. A turn is a rotation of 90 degrees counter-clockwise. We use l to represent an age (0..3), e represents the difference between directions of mites A and B (in the number of turns it takes A to face B's direction) (0..3), and k is an age (0..2). The genes and their general functions are:

    Examples

    Here are a few examples to aid in the understanding of the laws of PAC-world.

    How duels between species are evaluated

    Duels are held only between pairs of species. Duels will continue until one species has been completely eliminated, or until 500 time units have passed. If neither species has won after 500 time units, the relative populations of the two species will be used to determine the score of the duel. Each duel is worth a total of 20 points. These 20 points will be divided between the two species as follows:
    Points for a duel Outcome of a duel
    20-0 Destroying the opposing species in under 100 rounds
    19-1 Destroying the opposing species in 100-199 rounds
    18-2 Destroying the opposing species in 200-299 rounds
    17-3 Destroying the opposing species in 300-500 rounds
    13-7 Outnumbering the opponent by at least 10:1 after 500 rounds
    12-8 Outnumbering the opponent by between 3:1 and 10:1 after 500 rounds
    11-9 Outnumbering the opponent by between 1.5:1 and 3:1 after 500 rounds
    10-10 If neither species outnumbers the other by more than 1.5:1 after 500 rounds
    Observe that this scoring system gives significant advantage to species that actually destroy the opposing species rather than just outnumbering them. The reason for this complicated scoring system is that the set of all PacMite species is probably not a totally ordered set. Thus, it is possible that no clear winner would emerge from the competition if we simply considered the number of wins/losses/draws. The scoring system makes it unlikely that this will occur.

    Your task

    Your mission is to find a PacMite species that will annihilate the PacMites submitted by your classmates in a round-robin duel. All the primary code resources for the project are in the code/pac subdirectory on owlnet in the comp440 account.

    What to hand in