Tino Intro To Java

Last modified: March 17, 2026

Lab A4.901 Creature AI - Contest Submission

Mission

You are writing the AI for a creature that will wander the world finding and collecting food while avoiding walls. The creature must follow these rules while collecting treats:

  1. The creature can never end a frame even partially inside a wall. No going through walls.
  2. The creature can never end a frame more than 2 pixels from where they started (i.e. no moving faster than 2). Since move(2) moves at most by square root of 5, that is the absolute limit.
  3. You cannot remove or change any properties of any walls.
  4. You cannot move any treats or change the properties of any treats.
  5. You cannot remove any treats the creature is not touching.
  6. You cannot change the size or image of the creature.

Contest Submission

You will submit your best version of Creature AI for this assignment even if you are still stuck on previous Creature AI assignments. You should include a link to your google doc in the comment field.

Submission

  • Submit your PX_LastName_FirstName_Creature.java file. For example if you were in 3rd period and named Michael Wang, then you would submit P3_Wang_Michael_Creature.java.
  • Make sure your Google Doc has Editing permissions for "anyone with the link." This is for your teacher and TAs.
  • Paste the link to your Google Doc in the Submission Comments section on this submission form (which becomes visible after you enter a file to submit)

You must Sign In to submit to this assignment

Dark Mode

Outline