Monty and Morgion 020: The Longest Day

25Oct02 (Monthenor): This comic is pretty good summary of what we did in Mechmania this year. From left to right: Monty, Nekkid (with crazy physicist hair), Alphi (Linux mastah -- kept my Linux 'skillz' from deleting all our code that we've ever written anywhere), and the ponytailed named because he was the UIUC coder for the Mechmania contest. Not "Head Coder". Not "Project Leader". "Coder". Except for the nuclear blast radii (funny story, too, see my update), he did everything. So even if half the stuff didn't work in time, that's still 3.5 hells of a lot of stuff that did work, and it's all him.

I think you should all go visit this guy and say "Thank you for not suing Monty over the use of your mushroom cloud." Plus, the animation is just cool. The picture of the actual 0'0' comes from courtesy of the crew of the USS TaxDollarsAtWork.

Oh man...I just rocked back in my desk chair and caught a peek of the sandwich cookies sitting on my tower. Which of course caused an intense craving for Doritos. It's time to gain 10 pounds, baby! Woohoo! Speaking of, Nekkid: I think I stole your Hostess cupcakes...which of course you stole from the ACM buffet, so I'm not sure if or where the rules of findus keepus apply. They haven't covered that in any Law and Order I've seen.

Anyway, on with part 2 of the UIUC report...


This is what Mechmania looked like on the night of 18Oct02, before we actually started coding.

There are two phases to Global Thermonuclear War: the Building Phase and the Blow Shit Up Phase. During the Building Phase, each team buys a base or weapons and basically gets to put everything together. Since some structures depend on other structures and weapons need certain stuff to be built, we anticipate at least three Build Phases before "Go Time". Since you don't go back to Build Phase after a BSU Phase, we anticipate everyone will figure out the same thing we did and the game will devolve into a massive bomber battle. To use the lingo: "Stand and Punch". Since it's nigh impossible to shoot down bombers with other bombers, whoever plans the best offensive spread wins.

Score is kept via absolute population of your "nation" between the Blue (USA) and Red (USSR) teams. Actual real population data was available to determine juicy targets. So it seemed like everybody's AI was going to be reeeeeal similar. A few simple calculations gave us the most and biggest Gravity Bombs we could load on our bombers, and that's how much damage we could do. Our AI was practically done.

Now you know as much as we did.

-- 19Oct02-21Oct02 THE LONGEST DAY --

0800: We are up, showered, and ready to code. Natch, we forgot to set our clocks to "ACM Time".

0830ish: Ok, so when an ACM member gives you a time that they will do something/be somewhere, you should probably add at least ten minutes to that. If they are also from Seim, you add another five. We're finally let into the lab to start working on our uber-cool strategeric bomber rush. We open up the test client to take a look...and discover that all your bases can be built on the first turn. This takes the game from "Stand and Punch, Repeat" to "Stand and Punch Once". Apparently, when the program says buildings "depend" on each other, that means you must put one line of code before another. Our bomber rush is down the crapper as Nekkid feverishly works out new damage/dollar ratios for all the weapons. Alphi investigates the structure of our code environment while I code up the bomber rush just for fun.

From here on out, time means nothing. All I can promise is that all of this happened in approximately chronological order.

Once we weaseled some hard numbers out of Sisyphus, we could accurately calculate the optimum weapon loadout, which is one large base with the maximum number of silos/missiles/warheads. We end up with 21 missiles, 20 of which have the maximum 5 warheads of 25 megatons, and one of which has a mere 10MT and 1MT warheads. (I think...I was never very clear on this, and it changed several times throughout the night, but Nekkid gave me numbers and they went straight into the code). This was codenamed "Greedy Penguin". I make a sexy sexy function that returns the 20 juiciest targets according to the map, and we rest for a moment.

Normally there's a time crunch for the AI coders, but this year we can relax since the server-side stuff isn't working yet. So while our client sits unused, we had time to pick apart other pieces of the game. The feasibility of submarines was calculated and dismissed. We checked our email. Twiddled thumbs...

Pizza came. We were told that we wouldn't get pizza without our official Mechmania name badges. Mine had disappeared in the hotel room at some point last night, and for all I knew it was halfway to Mexico by now. One of the ACM members, Badgegiver, wrote me up a quick "authorized" nametag. The pizza people didn't even card me.

Nekkid is very concerned about how big these blasts are going to be. After all, we don't want to overlap our bombs and try to kill dead people, right? So we track down Badgegiver, the blast radii coder, and get some numbers from him. He took his data right off some math site about the radii of atomic explosions, and scaled it straight up for the larger bombs we could use.

Nekkid runs numbers like a mad physicist and comes up with a shockingly large figure. He scratches his head and runs it again. Same seems that the largest warhead (500MT), which only the bomber could carry, and which costs a quarter of our budget, would have a radius of around 9,800 miles!! This is why we don't make 500MT bombs.

Bombers quickly become more attractive for our strategy. If we wanted to intercept incoming missiles, we could plant one bomber over the Arctic Ocean and drop one bomb, and most of the incomings would disappear ("Angry Penguin"). Alternatively, we could just abandon our own populace to die and wipe out their entire half of the planet ("Dirty Penguin").
Map lifted from

Nekkid gives Badgegiver the info, and his eyes bug out. He tells Sisyphus, and Sisyphus' eyes bug out as much as they are able after being awake for over 72 hours straight. The blast radii are quickly scaled down to much more sane numbers, and bombers once again suck.

By this point, we still haven't received a server in any kind of working state. Sisyphus has announced that Mobile Launchers are already cut and will not work. Fortunately, they cost too much anyway so nobody cared. Bombers and missiles still have a hard time, shall we say, getting it up.

All night, our missiles have tended towards a 5-degree-radius circle around 0'0', which we originally thought was the North Pole but is actually just off the Ivory Coast in Africa. If there's one thing that Toho has taught me over the years, it's that irradiating ocean that much is b-a-d BAD (see sidebar).

More twiddling and optomizing. If we only get one Punch, it's going to be a doozy.

We hear from Sisyphus that the population map is actually a 3 gigabyte png image file, where the darkness of a pixel represents the population density at that pixel. Searching this file is understandably slow-ass. On top of that, the searching isn't even working at this point. I jump onto the web and start finding coordinates of largest US and USSR cities to hard code into our AI.

Somewhere in all of this, it's become Sunday. It's damned hard to find GPS coords on Russian cities, I tell ya what, but in the end we have 20 reasonably perfect cities for each side. Almost immediately afterwards we find out that Sisyphus got the population maps working. I write up a sexy function that will take the coords we have and search around them for something better to blow up, which unfortunately moves our Los Angeles ground zero off of home plate at Dodgers Stadium. Satellite imagery is cool. And Glothar, if we knew which building is yours, you'd be a glowing pile of dust right now.

Nekkid has come up with a few blast patterns that will cover differing amounts of terrain. We opt for a plus-shaped spread that puts everything near the dense target, but not overlapping.

So here it is, 9ish on Sunday morning, and all the teams have either given up in frustration or are playing games to pass the time. Sisyphus is still feverishly pounding away at stubborn code, and every now and then makes an announcement. Missiles begin to fly. Bombers are cut for lack of time (phew!). Missiles, wonder of wonders, begin to actually explode. We still get no casualty figures, but our team is certain of our hard-coded local maxima.

1300 20Oct02: Supposedly contest time. Pushed back to 1400.

1400: Contest begins. When we tested our clients against the wimpy little test client, we had no problem blowing it to hell. When two teams begin to fill the air with missiles, it's the server that gets blown to hell. The normal contest battle is quickly scrapped in favor of "highest kills against the test client". "Stand and Punch Once" has now become "Stand and Punch Once Against a Punching Bag". Server code fixes are being thrown in literally as we play. Two hours pass, and we finally have some numbers we can use to sort of maybe score teams with. Of course, by this point most of the teams had to friggin' leave. Happy Campers (the UIUC team) in particular left with sour looks after their first three battles seg-faulted and their test client score was less than the Fan3r F3w. I think they ended up in third.


1st) Fan3r F3w, 177282 points: used the "Moscow Gambit". Apparently the population database wasn't being updated properly, so people who "died" were still alive. So obviously the best strategy would be to pick their densest city and pound it with everything. We're kicking ourselves for not trying this, but it's not like we had a working test server. They were nice about it, so I can't really hold it against them.

2nd) The Dirty Bits, 92610 points: woohoo! We think this is a near-optimal casualty rate for an updating population database, but we won't know until and unless they get everything working.

3rd) Happy Campers, 44982 points: hell if I know. We don't really like them. I'd like to know what cities they were aiming at, though.

Honorable Mention) Shadowfax, 31752: 4th place doesn't get any prizes, but they were also the only other client that I saw actually DO stuff. Plus they were cool guys. Plus they had the balls to use the sub-optimal submarine launches!

Everyone else was having seg-faults in their clients, and at this time it's unclear whose fault that was. If ACM ever gets around to finishing the game and re-testing, we'll know more.

1700ish: Okay, so we start driving back to Fargo. This puts our ETA at around 0400. Once again the UIUC gods hate us and send massive fog/snow flurries from mid-Wisconsin all the way home. Not fun to drive in, or to watch. I'm back in my apartment by 0530 and proceed to sleep through Monday. The End.

Wow...after all that typing, I feel like taking another day-long siesta. However, I must forge onward, for tonight is (ta-da!) Steak and Shrimp Night!

26Oct02 (Monthenor): UPDATE!! The final standings are:

Fan3r F3w - 176400
Dirty Bits - 91728
DDT - 84672
Happy Campers - 44100
Shadowfax - 30870
(All others either disqualified or totally whiffed)