| Tobin Fricke's Lab Notebook ( @ 2009-06-28 03:01:00 |
| Entry tags: | classical mechanics, icfp, programming contest |
rocket science

This year's ICFP programming contest involves planning an optimal sequence of rocket burns to cause an orbiting spacecraft to visit a collection of other orbiting spacecraft. It's a cool problem—orbital mechanics is quite unfamiliar!
Fortunately, the contest contains three warm-up problems. The simplest is to just move from one circular orbit to another, which can be accomplished via the Hofmann transfer orbit (as suggested by the contest specification). The next requires that you meet up with another orbiting spacecraft in circular orbit. I've solved those two. The final warm-up problem is to leave one elliptical orbit to rendezvous with a spacecraft in another elliptical orbit.
The final problem that these warm-up problems lead to is to find an optimal procedure for visiting a collection of other spacecraft in various orbits—here's where the clever searching and optimization will come in.
As an added twist, the individual problems come packaged as binaries for a virtual machine that you have to implement. Unlike prior years, this virtual machine is quite simple. In fact, it has no branching instructions whatsoever, so it's hard to even call it a virtual machine. You could translate it directly into C, for example.
I think my approach is quite slick: I implemented the virtual machine in C, but then wrote a Matlab (.mex) interface to it, so I can implement the rest of my solutions in Matlab, employing all of Matlab's mathematics and visualization and interactiveness while still coupled to this physics engine implemented in the virtual machine.
However, I think it's time for one-man team "tensor" to get some sleep. (-:
EDIT: 24 hours into the contest, they added a moon!