Greeps contest rules
General:
- Competitors can submit more than one Greep file as long as they use
substantially different strategies. What is "substantially different"
is at the sole discretion of the judge (me). Each contestant will be
placed according to the final performance of their best-performing Greep.
- Contestants can work in teams or individually.
- Everyone who plans to compete must submit at least one
Greep for the preliminary rounds, and should plan to attend as
well.
- Every individual or team that competes must have at least
one member present at the finals.
- The initial materials contain three maps, which will be the first
three maps used in the competition.
At the preliminary rounds four additional maps will be revealed (though
not given to you), and at the finals, three more. Final placements will
be based on performance on all ten maps.
- Students who have not taken CS 142 or the equivalent or higher are
eligible to participate in the beginner division. See below for further
rules pertaining to each division.
Beginner division rules:
- Only change the class 'Greep'. No other classes may be modified
or created.
- Inside 'Greep', only modify 'getAuthorName' (to return your own
name) and 'act' (to do everything else).
- You cannot move more than once per 'act'. If 'move()' appears more
than once in 'act', each occurrence must be in a different branch of an
if/else.
- This is the complete list of commands you can issue to do things:
- turn(N); (except replacing N with any whole number)
- turnHome();
- move();
- checkFood();
- dropTomato();
- spit("red");
- spit("orange");
- spit("purple");
- setFlag(1, B); (except replacing B with true, false, or an if-question)
- setFlag(2, B); (except replacing B with true, false, or an if-question)
- setMemory(N); (except replacing N with a number between 0 and 255)
Numbers (listed as N above) can be plain, e.g. "5", or computed, e.g. "getMemory() + 10".
- This is the complete list of if-questions you can ask:
- atWorldEdge()
- atShip()
- atWater()
- carryingTomato()
- randomChance(N) (for any N between 0 and 100)
- seePaint("red")
- seePaint("orange")
- seePaint("purple")
- getFlag(1)
- getFlag(2)
- getMemory() < N (for any N between 0 and 255)
- getMemory() > N (for any N between 0 and 255)
- getMemory() == N (for any N between 0 and 255; note double-equals sign!)
Numbers (listed as N above) can be plain, e.g. "5", or computed, e.g. "getMemory() + 10".
Advanced division rules:
- Only change the class 'Greep'. No other classes may be modified
or created.
- No additional fields. You cannot extend the Greeps' memory. That
is: You are not allowed to add fields to the class (except final
fields). You can use the one byte memory that is provided.
- You cannot move more than once per 'act' round.
- You cannot communicate directly with other Greeps. That is: no
field accesses or method calls to other Greep objects are allowed.
(Greeps can communicate indirectly via the paint spots on the
ground.)
- No long vision. You are allowed to look at the world only at the
immediate location of the Greep. Greeps are almost blind, and cannot
look any further.
- No creation of objects. You are not allowed to create any
scenario objects (instances of user-defined classes, such as Greep or
Paint). Greeps have no magic powers - they cannot create things out of
nothing.
- No tele-porting. Methods from Actor that cheat normal movement
(such as setLocation) may not be used.
- No over-fitting. Your Greeps must have the same behaviour on every
map; you may not make use of information about which map you're on even
if you figure out some way to discern that information.