A java programming competition.


What is a RatBot? 

A RatBot is a computer program placed in a computer-generated maze.  You will write the functions that control your RatBots, and then test them to see how well you have programmed them.  Will your RatBot succeed or will it get lost in the maze?

This is the 14th year of RatBots competitions and we are looking to expand to more high schools! Also, while the competition was first created for use in high school programming classes we have found that alumni and other programmers have wanted to compete also - so anyone may enter! Just specify your division (HIGH SCHOOL or OPEN) when submitting an entry.


Download the complete RULES and INSTRUCTIONS (This includes instructions on how to write a RatBot.)

Download the complete SOURCE CODE for RatBots14 (This includes source code for demo RatBots to get started.)
(Most recent version is 14.2 released on 2/8/14 includes a few small bug fixes and upgrades.)

Demo RatBots (included in the source code)

Download the RUNNABLE .jar FILE for RatBots14

For the third year, RatBots is based off of the AP Computer Science GridWorld platform. No prior experience with this platform is necessary to succeed. Also thanks to Patrick Angle and Chris Von Hoene who have contributed large components to this project over the past two years.



There will be three categories of competition again this year.  Every RatBot will automatically be entered in every event (maybe one RatBot could sweep them all!)  Each participant may enter up to three different RatBots into the competitions.  If you choose to submit multiple entries, please make sure that they are substantially different from each other. 

  1. RatBot League – Each RatBot will compete against each of the other RatBots in a head to head competition of 100 rounds.  The RatBot that wins the most rounds will win the match.  The RatBot with the best overall win-loss record will win the tournament.  (If there are enough entries, the tourney will be multi-staged.) 
  1. The Singles Competition – Each RatBot will be individually placed in the maze for 100 rounds.  The RatBot that acquires the highest average score will win this competition.  A scoreboard will be updated regularly throughout the submission process for this competition.

  2. The Battle Royale competition – By random draw, the RatBots in groups of up to eight will be placed in the maze for 100 round competitions.  The top three RatBots in wins in each match will advance to the next matches.  Once the field has been narrowed to nine or fewer finalists, a 100 round live computer-cast final will decide the winner! (The exact structure of this competition will be decided once the number of entrants is known.)

How to enter:

To submit a RatBot, email your RatBot's .java file to . In your email please include your name and school or specify OPEN division. Include "RatBots" in the message title. No other competitors will have any access to your code.

All RatBots must be submitted by midnight on Thursday, May 15th.

You may replace a submission prior to the deadline, however it is preferred that you do not overuse this priveledge since receipt of submissions is not automated.

Each person may submit up to three RatBots, provided that they are substantially different.

Results of the competitions will be posted on this website.

Good Luck!


Please email any questions you have, bugs you find, or suggestions for improvement to



For many years my classes have spent 3-4 weeks each year using RatBots as part of our curriculum in my classroom. It allow students to improve their understanding of working with methods and objects, use iteration and conditional logic, work with 2-D arrays and really apply what they're learning to an interesting challenge. If you want more details on how I structure my use of this in the classroom please email me.