Pinewood Derby
Posted in Concepts, Java, Tech on February 13th, 2010 by Chris – 2 CommentsI received a phone call from my Mom earlier this week, posing what would seem to be a simple question: “Could you help come up with something to manage the pinewood derby at the beginning of March?”
Little did I know that it was going to become a rather taxing endeavor.
The first step has been figuring out the best way to generate heats. Given m entrants and n lanes, there must be m/n, rounded up, ‘heats’ in order to make sure everyone has raced the same number of times. Some of these heats would be less than the number of lanes, but should be set up to be not only most fair to racers, but keep the scoring as even as possible.
I started out to see if, given m entrants and n lanes, if it was possible to have a true round-robin tournament; that is, make every racer have a race against every other entrant, and have each racer have the same number of races. That would make the calculations for the winner the simplest. Unfortunately, while easy on paper, it becomes impractical in real life.
For example, say we had 8 racers on 4 lanes. In order to achieve a true round-robin state, we need to have 8C4 races, or 70 heats, in order to satisfy the above conditions. Now, in practicality, do you think it’s possible to have 8 elementary school students sit patiently enough through seventy races? I didn’t think so either.
My current goal is to make a heat generator out of some form of predictive system. Using a map of entrants to see how many times one has competed against another, the generator picks the least raced candidates, in order to keep fairness at a maximum. There are some other things to take into account for the day, like damage, re-races, and run-offs for ties, but those become part of the operation logic. The true core of this is creating the heats for each level, and keep track of the points received for those races.

