?

Log in

No account? Create an account
ICFP wrap-up - Lindsey Kuper — LiveJournal [entries|archive|friends|userinfo]
Lindsey Kuper

[ website | composition.al ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

ICFP wrap-up [Jul. 14th, 2008|03:26 pm]
Lindsey Kuper
[Tags|]

I'm looking for the shortest path
to the one that you're on.
-- Uncle Tupelo, "The Long Cut"

  • Lines of PLT Scheme: 485
  • Repository commits: 52
  • Pots of coffee consumed: 4
  • Number of computers we used: 4
    • my laptop
    • Alex's laptop
    • Alex's desktop
    • and, for running the LiveCD, a spare Linux box that he had in the closet, which was of course named bombadil1
  • Our totally awesome final results on the sample maps:
    • spiral.wrld:
      • Round 1: crashed into crater; score = 41790
      • Round 2: crashed into crater; score = 43820
      • Round 3: reached home; score = 18970
      • Round 4: crashed into crater; score = 40130
      • Round 5: reached home; score = 16430
    • small-scatter.wrld:
      • Round 1: reached home; score = 26930
      • Round 2: crashed into crater; score = 49870
      • Round 3: crashed into crater; score = 38920
      • Round 4: reached home; score = 22010
      • Round 5: crashed into crater; score = 39450

And here's the README I wrote to submit with our project, which I feel captures the spirit in which we participated:

Our rover has two modes, GO-HOME and EVADE [1], which are implemented as a
stack, CURRENT-STRATEGY. The GO-HOME mode is always the bottom-most item on
the stack. On each iteration through our main loop, the ANYTHING-WORRYING?
predicate examines each of the objects in our view and lets us know if we
should be concerned about any of them. If not, we happily continue toward the
center of the map; if so, we evade the bad stuff using an extremely
sophisticated pathfinding algorithm known as "accelerate and turn left". [2]

As if there were any way in which our rover-controlling software could
possibly be improved, we've also begun to implement a system for storing map
data, so that later runs in a trial can benefit from information gathered
during earlier runs. Implementation of the remaining parts of this system are
left as an exercise for the reader.

 -- Lindsey Kuper and Alex Rudnick (Team K&R)

[1] Which are also our team's preferred two modes of social interaction.

[2] We also find this strategy to be eminently useful at track meets, unless
we're participating in the 100-meter dash or pole vault events.

In all seriousness: This was awesome. Here's what we submitted, minus the revision history. One thing I'm proud of is figuring out that we needed to use atan (although it was Alex who pointed out that we should be using two-argument atan, which is the Scheme name for atan2, apparently). Embarrassingly, even after the code was written, I had to spend a lot of time alone with pencil and paper convincing myself that simple eleventh-grade trigonometry wasn't magic. Another thing I'm proud of is the current-strategy stack, which I implemented by myself during the last couple hours of the contest after Alex went to work. I mean, the strategies themselves are dumb, but by golly, they're on a stack! And Alex did all the work that had to do with collecting and saving information on initial runs to use on later runs of the same map, but sadly, we didn't have time to do anything with that information. It was an awesome idea, though.

Since neither of us are that great at Scheme, we spent a lot of time just looking up stuff, and the PLT docs turned out to be awesome. (This article about networking with PLT Scheme was a big help on the first day, too. Thank you, Shriram Krishnamurthi!) Overall, I had a lot of fun, and can't wait to participate again next year. What we did for the contest didn't have a whole lot to do with what I've been learning from SICP, but it had everything to do with programming and working as a team. Woohoo!


  1. Most guys I know seem to have either a metaphorical or actual Linux-box-named-bombadil in their closet.
LinkReply

Comments:
[User Picture]From: keystricken
2008-07-14 09:04 pm (UTC)
Most guys I know seem to have either a metaphorical or actual Linux-box-named-bombadil in their closet.

I challenge you to prove this.
(Reply) (Thread)