FLL tournament application

Today I started working on this year’s update of the Ruby on Rails application that we’re using to run our Los Altos FIRST Lego League tournaments.

The code is at www.neontology.com/svn/fll and is free to all (MIT License). I’ll soon start checking in files for this year’s challenge.

The challenge is described with a small Ruby DSL. Here’s an excerpt from the start of this year’s challenge description. It was written by Tom Sartor, who is in charge of scoring at our tournament this year.

challenge do
  mission "Roof Solar Panel" do
    item :SolarPanelOnRoof, 
         "Solar Panel on roof of house?", 
         YN, "15" 
    score do |items|
      items[:SolarPanelOnRoof]*20 
    end
  end
  mission "Personal Vehicle Choice" do
    item :HydrogenCarParked, 
         "Hydrogen car at white property or houses driveway?", 
         YN, "25" 
    item :TruckRecycled, 
         "Truck at parking lot or farm?", 
         YN, "must be Y" 
    score do |items|
      items[:TruckRecycled] ? items[:HydrogenCarParked]*25 : 0
    end
  end
  ...

All of the results gathering and reporting is driven from this DSL, and Tom’s early draft for this year’s challenge looks good. But we still have some hard-coding to do. Every year there’s been a twist on scoring that’s forced us to generalize more. This year it’s a complicated “fairness bonus” for teams that use the older RCX kits. The bonus is computed on a sliding scale that looks frighteningly like a tax schedule. There’s no escape…

...but one of the fun things about using a web application to run our tournament is that we can spread the work out across multiple systems. Last year we had a laptop for entering score results and another for reviewing them. This year we’ll be running a bigger tournament and will probably add another for data entry and at least one more to display results on a projector.

If you want to try to use this for your own tournament, beware—although the challenge itself has been factored out into a tight Ruby DSL, other aspects of our tournaments, especially scheduling, are still hard-coded. So you’ll need a Rails hacker to make it work. But it seems that there’s lots of those around these days.

2 comments ↓

#1John T on 2007-10-12 at 03:57:51 America/Los_Angeles

Hi. I found this while randomly googling for Ruby and tournament resources. We’re holding our first FLL tournament this year, and this looks very interesting and possibly helpful! One big challenge is coming up with the tournament schedule – which teams play which, how often, etc.

Any info / tips on how to generate? Or do you just hand generate a schedule? We are planning on having 32 teams, with hopefully 5 rounds each.

Thanks!!

#2Tim on 2007-10-20 at 01:20:17 America/Los_Angeles

So far,we’ve been generating our schedules by hand, although another member of our local robotics board (that runs the tournament) has written some scripts that check our schedules for overlaps and other problems. Generally, we run five round tournaments, with each team competing in four of the five rounds and spending one round out for judging. In the past, it’s been like this:

round 1 3/4 of teams run matches, 1/4 out for judging
round 2
round 3
round 4
round 5 all teams run matches, judges compile results

In the recent past we’ve run smaller tournaments (12-14 teams), but this year we’re running a single tournament for 28 teams. I haven’t seen the schedule yet but will let you know when we have it.

Leave a Comment (sign in with Twitter)