
  ICFP Programming Contest 2002 Entry

    Submitted by     Jeremy Day (aka Jerome)
    A robot named    Johanna


Moved by passions that defy understanding, I've written an entry. 

I don't really know any functional programming languages, 
but I do know C.  I can write C code in my sleep, as I did 
in this case.

My robot is named Johanna.  It gets very angry sometimes.  
The angrier it gets, the more random it becomes.  It's named
after a woman I once knew who was like it in that way.


My excuse is that I started four hours late.

If I'd started a few days earlier I could have found someone
else to join my lonely team, which would have helped.  All code
was written by me, mostly late at night.  I spent most of the
weekend on it, so I hope it works.

The code is less clean than normal for me, but could be fixed up 
fairly easily if this were a continuing project, so I'm happy 
with it.

I didn't have time to properly solve the travelling-salesman
analogue that I suspect might be useful, so I just hacked
together a mess of heuristics which might have some chance of
working.  Nothing too fancy.

My robot tends to stay a few moves away from water and walls
even if nobody else is around.  It's sort of a side-effect of
what I intended as a way of choosing the least-dangerous path
to a destination (I might have assumed too many robots per square 
inch).  I'm leaving it that way since it seems unlikely that 
anyone else will do it, and being different might give Johanna 
an advantage, as it did her namesake.


Good luck, Johanna.


INTERFACE:

Johanna has a text-mode display using such remarkable character 
graphics as 'X' and '+' to represent the world.  I wasted at least
an hour on it while thinking of other things.  It's very pretty, 
I think, despite its minor flaws.  

  X -- Johanna
  Y -- some other robot
  + -- current destination
  o -- package
  ? -- possible package

  . -- open space
  ~ -- water
  @ -- base
  # -- wall

Unlike her namesake, Johanna is not interactive on the tty.


AUTHOR: Jerome

I've been coding for many years, in UNIX and C for the last ten.
I'm twenty-some years of age, gainfully employed, and living in the 
Canadian province of Quebec, near Ottawa.  My first language 
was BASIC on a C= Pet, but I've tried to forget most of the bad 
habits I learned there.

Jerome 
jsday@achilles.net

