2017 MASLAB Competition Rules

A Cambridge garbage collection showdown

The year is 2146, and the city of Cambridge is a wasteland. Its residents have left their trash and recycling unsorted and strewn them throughout the streets of the city.

Thankfully, two garbage collection startups, MIT Recycling Inc. and Harvard Trash Corp are vying to see who can clean their side of the city best. For MIT and Harvard, the goal is to collect as much recycling or trash, organize them in stacks, and return as much as possible to their Headquarters.

Meanwhile, the folks at Novartis Megacorp, with their ever-mysterious presence in Cambridge, have sorted their waste, but have hidden it in high-tech dispensers in the city. Any team that finds and activates their dispenser will be well on their way to waste their competition.

01/31/17 Update


  1. Most cubes displaced
  2. Weight of robot

01/29/17 Update

Previosuly the color of the dispenser buttons was not labeled in the map file. Now the field will be laid out so the color of the buttons can be deduced:

  • Wall or Dispenser, initial X, initial Y, final X, final Y
    • (W|D),x1,y1,x2,y2
    • x1,y1 mark the green side of the dispenser, x2,y2 mark the red side of the dispenser

01/19/17 Update

Previously the rules on stacks said:

Must be same color (no opposing color above or below)

We're revising this so that if a stack is made of your team's color starting on the ground but has the opposing color cube on top or in the middle, the cubes of your color under the opposing color still count as a stack.

Example: For the green team, a stack of


will now count as a stack of two.

01/18/17 Update

  • On cube posession: Your robot posesses a cube if the cube stays with the robot when the robot is lifted vertically.
  • On the Novartis dispensers:
    • The entire dispenser will be painted yellow with the exception of the buttons and the servos that release the cubes.
    • The dispenser buttons will light up after they are pressed to indicate release of the cubes
  • On the map file: Contrary to the originally posted rules, we've decided to include the starting heading of the robot in the map file in addition to the starting position.
    • The heading is one of N, E, S, W (cardinal directions in the map file's coordinate system) and indicates where the front of the robot will be pointed initially. In competition the robot will be placed by the staff visually (expect up to 5 degrees of error)
    • The front of the robot should be clearly indicated on the robot before the competition starts and not modified over the course of the competition.
    • The map file specification below has been updated with the format of the heading, and the java client for generating map files has been updated accordingly.
  • On the headquarters regions: The HQ region will be at least 4 square feet (1 square unit in map file units)


  • 2 points: Possession of any block on your robot
  • N2 points: A stack of size N of your color, outside your headquarters
  • (N+1)2 points: A stack of size N of your color, inside your headquarters
  • -1 points: Each opposing color cube inside your headquarters
  • Penalty: Each Novartis cube of the opposing color dispensed onto your side of the field will cancel the highest scoring cube of your color.


  1. Most cubes displaced
  2. Weight of robot

The Cubes

  • Trash cubes are painted red, recycling cubes are painted green
  • Cubes are 2 inches to a side with a 1 inch through hole centered on each face



  • N >= 1 (stacks of 1 are worth 1 point)
  • Each cube can only count for one stack
  • Must start on the ground
  • Must be same color
  • Must not rely on robot for support (can rely on walls)
  • Must not be within 1 in of robot

The Field


  • The field is partitioned into two halves, one for the Harvard team and one for the MIT team
  • Each half is fenced off by straight, rigid wall segments whose corners all lie on a square (24" x 24") grid.
  • All angles between walls are multiples of 45 degrees.

The walls

  • All walls are 6 inches tall with 2 inch blue tape at the top edge.

The floor

  • The floor is constructed from 1 square foot puzzle-style black foam tiles.

The Headquarters

  • The boundaries of the headquarters in each half are demarcated by 2 inch purple tape on the floor tiles, as well as purple tape instead of blue tape on the top wall edge.
  • The region boundaries follow the same rules as described in the geometry section above (straight lines, corners on the grid, 45 degree multiple corners)
  • The headquarters for each half must be the same area.
Note: ignore the purple platform, that was last year's rules

Starting Stacks

  • Each side of the field will start with 4 stacks of 3 cubes.
  • Each starting stack will alternate in color.
  • 6 red cubes and 6 green cubes total per side.
  • The stacks will be within 6" of grid points in the field's 24"x24" grid (see Field geometry and map file section).
  • The stacks won't start in a headquarter region.

Novartis Dispensers

  • The Novartis dispensers will be located on a dividing wall between the two halves of the field.
  • One dispenser will hold 6 green cubes, the other will hold 6 red cubes.
  • Pressing the button for each dispenser will dispense the cubes on top to the side of the button.
  • More details regarding the dimensions of the dispensors will be released shortly.
Note: Pretend the corners are all on grid points and the corner angles are multiples of 45 degrees.

Your Robot

  • No touching the other robots.
  • No intentionally moving the field.
  • No moving outside its half of the map.
  • No major self-sourced parts (minor things or structural things are usually ok).
  • Other than that, nearly anything goes! Ask the staff if you have specific questions.


  • Each round is 3 minutes long.
  • Teams should be prepared to play as either MIT or Harvard.
  • Robot starting location will be on a grid point in the field's 24"x24" grid (see Field Geometry). Starting direction will be a cardinal direction
  • Tournament format will tentatively be double elimination. The championship and bronze matches will be best 2 out of 3.

Map File

For each field setup in competition, competitors will be given a map file describing the field geometry, headquarters, starting stack locations, and dispenser locations.

Available game elements

  • Wall (W)
  • Dispenser (D)
  • Red Cube (R)
  • Green Cube (G)
  • Stack of Cubes (S)
  • Home Base (H)
  • Start Location (L)

Element attribute data

  • Wall or Dispenser, initial X, initial Y, final X, final Y
    • (W|D),x1,y1,x2,y2
    • x1,y1 mark the green side of the dispenser, x2y2 mark the red side of the dispenser
  • Stack, x, y, type bottom, type middle, type top
    • S,x,y,(R|G),(R|G),(R|G)
  • Headquarters, number of points, polygon x 1, polygon y 1, ...
    • H,N,x1,y1,x2,y2,...,xn,yn
  • Start Location, x, y, heading
    • L,x,y,(N|S|E|W)

Format Spec

  • The map format only dictates YOUR half of the map.
  • All inputs are given as a Character type, then a bunch of integer attribute data.
  • Any integer coordinates have a conversion factor to reality of 2ft. That is, a line of length 1 in the map-format world is actually a wall of length 2ft in the real world.

Note: stack locations will only be accurate to within 6 inches, so don't rely on them for localization. The walls / platform, however, will be significantly more reliable. Note: walls in the map format language will never span more than 1 unit on x and y. That is, wall lengths in the map format will only be 1 or sqrt(2).



Map Editor:

A java map editor is available here which allows you to graphically draw out maps and print the map files for them

Competition Day:

On the day of the competition, we will give you the map files for BOTH SIDES of the field. They will be labeled mit_map.txt and harvard_map.txt. Since we give you the map on competition day, we can't prevent anyone from running crazy precomputations and baking solutions before their run. So... We will simply allow that instead of trying to prevent it. Be sure that your robot code can easily choose "red mode" or "green mode."


  1. There will be no negative coordinates. All values are non-negative integers (0, 1, 2, 3,...)
  2. Referring to the image below, you'll see a square grid. The CENTERS of those grid elements are all you should care about.


Clarification: This example is from two years ago, so the stacks and middle dispensers are slightly different. This year, there will only be four starting stacks and they will be guaranteed to alternate in color. The middle dispensers will probably only span 2 2ft lengths combined, not three as depicted.