Our Process

Before I tell you about the boring stuff Tim and I did, I need to give a big thanks to the unsung heroes of this tale. Dana is mentioned below, but she did so much it doesn't do her justice. Her every effort was to provide us with a relaxing work environment. Without her, we would have eventually ended up in the hospital for something stupid like forgetting to eat and our ants would have surely suffered.

Tina, Tim's wife, isn't mentioned, but she also played a key role. She kept Tim's visiting family busy enough that he could slip away for a few days. She too deserves our thanks.

Tim and I worked together using typical a pairs programming setup. I did the coding and spent a lot of my time thinking my way through this or that subroutine. Tim watched over my shoulder, providing suggestions and asking questions. Really though, he was thinking about the bigger picture most of the time. I would finish implementing and testing a change and say, "What's next?" Tim knew the answer.

I've never used this kind of strategy before, but I felt like it worked well. Tim thought maybe he should have spent a little more time at the keyboard.

Simply because I was the code monkey, our code is all in what I know best, Perl.

Friday

Early AM
James wakes to find e-mail down. Prepares himself for a long weekend.
11 AM
James downloads task and sends it to the printer.
12 PM
Tim arrives with McDonalds in hand. We eat and read. Early impressions are good. Tim and I are Carnage Heart fans and the problem reminded us of that game. We're also a rare breed of programmer that doesn't get into the heavy math problems.
1 PM
We discuss basic ant strategy. Marking out our base sounds like a good place to start. Lots of ideas tossed around, some we would even use eventually.
2:30 PM
Work begins on simulator. James codes while Tim combs the spec for details and clarifications.
3 PM
Tim hunts for colored markers and prints hex paper. He sets to work on strategies, leaving a trail of hex drawings in every room he passes through.
5:30 PM
James' wife, Dana, returns home and fixes the boys a nice Zesty Italian: Hamburger Helper dinner. Well fed coders work better, I say.
10:00 PM
We finally finish debugging and verify our dump out to 1,199 turns. We obsess over proving the entire dump for a little too long then decide we're close enough. We switch to Perl's native rand() routine for massive speed boost.
11:00 PM
We call the working simulator a good day's work and head for bed. Coders work better when well rested too, I think.

Saturday

8 AM
James adds niceties to the simulator to ease testing. Ant TV is the main one. Basically just an ASCII map, it proved invaluable throughout the process. A simple tourney script is developed.
9:15 AM
Tim arrives and we begin discussing what we need out of ant development tools, over Dana-provided breakfast. This doesn't go well. We way over think the tools and can't easily solve the complex issues we are creating.
11 AM
Defeated there, we decide to start building an ant manually and just see what we end up needing. This idea proves golden and in minutes we have a one feature, relative line numbers, compiler and are making progress. We teach ants to mark base and create guards. Code starts to grow beyond what our simple tool can handle and we realize we need a better tool. Tim wants named goto added to the compiler.
1:45 PM
Tim has to take niece to the airport. James quickly implements requested feature then takes advantage of break. James relaxes and plays a game of Cribbage with Dana. Leaves tourney script running in background, testing our super dumb ants against ant from spec.
5 PM
Tim returns and work resumes. Tournament finishes up and we have scored points by killing ants (still not looking for food). Nice.
5:30 PM
Get highways working using new compiler feature. When highway pop up on screen, we fall in love. We work all weekend to improve their range which pays off. We're both happy with the compiler now. It doesn't change again, though it remains absurdly simple.
6 PM
Dana serves new Chicken Parmesan recipe complete with Summer Sunset smoothies. It's excellent and the troops are restored.
9:30 PM
Ants that are getting smarter all the time hit first major bug, causing huge bottlenecks on map. We roll up our sleeves and get to work.
10:00 PM
Bug fixed. Ant performance improves. Gathering about 100 food now. We call it a night. We discuss working on different ants tomorrow. Tournaments are left running over night...

Sunday

9 AM
Tim arrives and we make the final few changes to the simulator to aid in testing. Tourney scores strong. We're now whipping random ants. We decide to keep working together on an ant we know is working.
9:30 AM
Dana gets us going with waffles.
10 AM
Implementing the delivery ant exposes numerous flaws in our pathfinding approach. Fixing one reveals another. This cycle goes on and on, making for a tough stretch of work, but the end result is a much stronger ant. Gathering about 160 food now on our test map of choice.
4 PM
Finally through the dark tunnel of fixes, we decide to start testing ant on all maps playing both sides. The result is excellent. We've been using our worse case as the primary test. Our ant is scoring between 250 and 350 food on all other maps. We learn that our algorithm is very dependant on placement, but don't have a good fix in mind.
5:30 PM
We try to find a reliable plan for roads to food, but can't put our finger on a good answer.
6 PM
Dana to the Rescue with great pizza!
6:30 PM
We abandoned food roads and concentrate on polishing what we have. We make tons of small but solid improvements. Discussion on the list makes us realize our simulator should probably be faster as we have to wait about 10 minutes for a full game test.
9:30 PM
We finish a string of great refinements and realize we've reached a good stopping point. We have the strongest ant we've had yet and no good plans for the other expansions we have dreamed up. We decide to not risk breaking what is clearly working. We begin bundling up a submission, adding documentation and other finishing touches.
10:30 PM
We send in our best effort with Dana as a witness, twelve and a half hours early, and go to bed satisfied ant overlords.

Files

Below are links to our tools. We kept things simple, but were always moving forward. Even now I'm impressed at how little code we wrote and how much we did with it.

Contact Team Road Crew

If you would like to contact our team, you are welcome to mail James.