Please create an account to participate in the Slashdot moderation system


Forgot your password?
Programming IT Technology

2002 ICFP Programming Contest 216

Phil Bewig writes "The 2002 ICFP Programming Contest begins today. The programming task will be posted at 12:00 noon Pacific Time." Which should be... just about... now.
This discussion has been archived. No new comments can be posted.

2002 ICFP Programming Contest

Comments Filter:
  • Does that unclude a carte blanche to exempt all of my extremely boring required programming classes in school?
  • Now that is a very cool-sounding task.

    One of the classes at my university last year had to write a simulation like this using Eiffel. Ick!
    • What's wrong with Eiffel? I mean once you get past the $$$ issue of getting it...
      • I think I grew up on a terrible, terrible Eiffel IDE. Besides that, I found the language really unintuitive after having first programmed in C and C++. Personal preference, but god help me if I ever have to program in that language again :) (or fortran!)
        • I think I grew up on a terrible, terrible Eiffel IDE.

          I'm guessing you used the ISE Eiffel compiler. The IDE is actually quite nice and powerful, just little different than a typical C/C++ IDE. How many C++ IDE's tell you which classes descend from a particular parent, or let you see all the members in the class (including parent classes recursively).

          Besides that, I found the language really unintuitive after having first programmed in C and C++.

          I'm suprised. What did you find unintuitive? Absence of pointers?

          • Hey, right on, you guessed'er, ISE Eiffel. I think I was using some sort of crippled-ish student version, and it bothered me because it was really annoying to start new projects and handle the root files in the one I was using. This was a few years ago too, so things may have changed/improved since then.

            I don't know if I can put my finger on exactly what bothered me about the language, probably just a series of quirks and things that bothered me at the time (in all likelihood many things were interface/compiler related, too). Again, a matter of preference, probably; one of my good friends used to refer to Eiffel as the most "elegant" language he'd ever programmed in :)
            • I can guess that it was probably the fact that Eiffel is just really really strict. It forces you to program in a certain way, and in the end you get a tighter program with far less potential for run-time bugs, but getting there can be an exercise in masochism.

              The fact that functions and procedures are strictly separated means that something like(in Ruby):

              class Stack
              def initialize(*arr)
              @array * arr
              def pop
              @array.pop # implicit return

              bar ="hello", "world")
              puts bar.pop

              Would require an intermediate step of binding the last item in the array to a buffer, removing the last item in the array, then accessing the buffer to get the item.
      • What's wrong with Eiffel? I mean once you get past the $$$ issue of getting it...

        What's wrong with GNU SmallEiffel []?

    • One of the classes at my university last year had to write a simulation like this using Eiffel. Ick!

      Ugh.. I couldn't agree with you more. Writing in Eiffel is a sin. I had to do the same thing. Hmm I wonder if we attended the same university. ;)

      Here's a quote from my friend.. "They should make prisoners write Eiffel code."
  • Solution! (Score:4, Funny)

    by Bingo Foo ( 179380 ) on Friday August 30, 2002 @03:03PM (#4172073)
    10 PRINT "I WIN!"
    • by Anonvmous Coward ( 589068 ) on Friday August 30, 2002 @03:50PM (#4172473)
      10 PRINT "I WIN!"

      Heh I got a chuckle out of that. I won a Gifted Ed. programming challenge once using a similar technique. We were supposed to write a program in Basic that solved a word problem. Unfortunately, they didn't give us a whole lot of time. So I worked out the answer to the problem. My source code was like this:

      10 PRINT "10:30"

      Nobody else got the problem right, and the rules were vague enough that displaying the right answer was good enough. Heh. Pretty damn efficient coding, dont'cha think? :)
      • I was the only one that knew anything about programming in my high school BASIC class. It was taught by a 60 year old lady that had taken a single COBOL class at one point so she had more programming experience than any other teacher.

        Due to my "genius" status, I got the luxury of working on the only color monitor in the class which also happened to have a HD. Everybody else had monochrome XTs with dual 5.25" floppy drives (this was probably 1990). She wanted me to do something with graphics for a final project an I was a real smart-ass so I filled the screen with a gradient. Her challenge to me was to make the gradient go in the opposite direction. She said "good job" and gave me an A for it.
      • by jeblucas ( 560748 )
        Pretty damn efficient coding, dont'cha think
        Wouldn't this have been "tighter"?

        1 ?"10:30"

        Commodore64's rock.

  • by MosesJones ( 55544 ) on Friday August 30, 2002 @03:06PM (#4172099) Homepage
    I object to this test, this is quite simply awful that they are willing to risk Robot lives in such a callous fashion. I insist that all Robots must be fitted with inflatable life rafts to enable them to surive on the water squares. Anything else would a terrible waste of Robot life and would be ("two would be"s in a sentence, building up to the nutter finish) the same as Hitler during WWII.

    • "would a terrible waste of Robot life and would be ("two would be"s in a sentence, building up to the nutter finish)" two would be's if you count the oen in the (*);-)
    • better yet... also include waterproof casing and a retractable propeller so they can move in water, and back into other robots and use the propeller as a weapon.
  • FUN!! (Score:1, Funny)

    by I_am_Rambi ( 536614 )
    I think its time to go buy a bunch of bottles of jolt and to pull an all nighter. Lets GO!!
  • by Anonymous Coward on Friday August 30, 2002 @03:06PM (#4172104)
    Shoving is the answer, please stand near the stairs
  • Great idea! (Score:5, Funny)

    by Cutriss ( 262920 ) on Friday August 30, 2002 @03:09PM (#4172127) Homepage
    1. Enter the 2002 ICFP Programming Contest.
    2. Submit the site to Slashdot after downloading/caching all the instructions and requirements.
    3. Be the only person to actually have a copy of the directions, therefore, the only person to submit a solution at all, let alone a working one.
    4. ??? (Presumably, win the contest)
    5. Profit!
  • by McCart42 ( 207315 ) on Friday August 30, 2002 @03:10PM (#4172136) Homepage
    The player controls the robot by issuing commands.

    • The Move command moves the robot to an adjacent square, in one of the four directions north, east, south or west.
    • The Pick command is used to pick packages. Packages are initially available from home bases. Packages may not be picked up if they are too heavy, or if there are no packages available when the robot gets to execute its command (for example if it got pushed).
    • The Drop command is used to drop packages. Packages are always dropped.
    So what button is the "Strafe" command? Are there "quad" packages?
  • by [amorphis] ( 45762 ) on Friday August 30, 2002 @03:13PM (#4172161)
    Coordinates on the board are pairs of integers, ranging from (1,1) to (width, height), where (1,1) is the southwest corner of the board.

    What kind of programming challenge uses a one-based array?
  • by Caractacus Potts ( 74726 ) on Friday August 30, 2002 @03:19PM (#4172206)

    Man, I've been practicing all year using FORTH. Rats!

    • Actually, I remember a language called FIFTH that I found on a BBS probably almost 10 years ago... not the joke one another reply mentioned, even. It was based on Forth, but was OO, it claimed. Yes, there are plenty of OO systems for various Forths, big and small, but it had a bigger standard lib too.
  • Does anybody know if they inspired themself from The Pusher robots at Something Awful ???

  • Maybe I missed something, but they say that the player will be controlling the robots and then say that this will be running on their machine. It's not much of a contest to just write a client for this game that a human player runs locally, but why would they even mention a player if the contest is to write the client and robot AI to play?
    • Re:Ambiguous rules (Score:1, Informative)

      by Anonymous Coward
      Re-read the beginning ... the contest is to write a player that controls a robot. Not to write a robot.

      My question is... could I train one of them carnival chickens to play and submit him?

      • If you can get train a carnival chicken to pass and to parse strings of ASCII characters within 72 hours, you deserve to win no matter how bad a player it is.
    • The player writes a program to control the robot.

      The program talks to the server using a tcp port and a defined protocol.

      The program itself is required to run as a process on their local server, presumably to prevent "man-behind-the-curtain" cheating if the program were allowed run remotely.

    • This is ridiculous.

      If I enter, I am the programmer.

      As I understand it, the programmer writes a program that is the "player" which controls the robot. In effect, it is the entire challenge to implement the AI that will control the robot and win the game, unless implementing the rules and protocol is supposed to be daunting...

      This "player" program will run on their system, locally. Got it.

      I suppose that rather than ambiguous rules, it is a case of ambiguous terms. Programmers program players, players control robots, robots play the game. Human contestants are only the programmers. That makes sense. The personification of the player program makes it a little odd.

    • Go ahead and try, but I doubt you will be able to beat the computer programs with less than one second to think per move. (Remember, you have to think, decide where to move/pick/drop, decide the amount to bid for, and communicate that to the server, all in less than one second).

      On the other hand, the rules said CPU seconds... Waiting for I/O across the Internet isn't CPU-time, that is wall-clock-time. On the other hand, this isn't IOCCC, so the judges might try to interpret the rules sensibly.

  • ...this robot will self destruct in 10, 9, 8, 7...
  • Very cool -- wish I had the time. Once nice addition (which would really separate the men from the boys) would be to not download the entire map to the program.

    Instead, the robot would have to discover the world itself; i.e. it would only know about the contents of x number of squares around itself.

    And, of course, weapons, weapons, weapons.

  • why isn't there a reference server or a client API or something? They can't seriously expect entrants to implement the entire client from this spec without a server for debugging!

    • That's the entire point - they give you the spec, and you program to it. Whether the program you write works or not will be determined later.

      So what's the best way to make the client work? Simple - write the server also.

      Okay, mabye that's not so simple after all. :)

      • Probably a better idea to write a dummy server that reads from the keyboard and sends it to the client.

        ...However, if you do that, it'll be a violation of my IP, and I'll use the DMCA to sue you into oblivion and take home the prize myself :)

    • Part of the challenge is to write the program based purely on a spec. After all, you're merely writing and reading a relatively simple ASCII protocol from a socket -- an API is really unnecessary.

      It would be nice, however, if the server were provided for testing purposes, since parsing commands from the server and properly framing replies is really the least interesting part of the task, and a mechanism to speed up development (short of writing your own test server) would be nice. I'm sure a lot of entrants will die immediately based on the malformed-command/response = death criteria.

    • There will be.... (Score:5, Informative)

      by cp4 ( 250029 ) on Friday August 30, 2002 @04:32PM (#4172859)
      From the FAQ:

      Q1: Will a test server be available?
      A: Yes, stay tuned...
    • They explain the server, so you can implement one yourself. That's what we're doing. (Also, they plan to have a reference server available.)
  • A lot more interesting (to me) than last year's. But the problem is that you'll have to build a server to test your bot. And how will you know how good your bot is unless it competes against another one?

    For the first time, though, I think I may actually enter.

    I love that the game is played over sockets, so any language can be used that can implement sockets.

    All in all, it sounds like fun.
  • by Anonymous Coward on Friday August 30, 2002 @03:50PM (#4172476)
    From: []
    The following programming language implementations are available on the machine:

    * Assemblers (gas 2.10.91, nasm 0.98.22)
    * C, C++, chill, objective C (gcc 2.96)
    * PostScript (ghostscript-6.52)
    Mad, mad props to the first team to enter a working submission written exclusively in PostScript.

    • That is not a comprehensive list. It reads as follows:
      The following programming language implementations are available on the machine:

      Assemblers (gas 2.10.91, nasm 0.98.22)
      C, C++, chill, objective C (gcc 2.96)
      Common Lisp (CLISP 2.29; CMUCL 18d)
      Erlang (R8B-1)
      FORTRAN (g77 2.96)
      Haskell (GHC 5.04; Hugs98-Dec2001; HBC 0.9999.5b)
      Java (gcc 2.96; Jikes 1.15; Sun JDK 1.4.0)
      Lazy ML (lmlc 0.9999.5b)
      Mercury (0.10.1)
      Modula 3 (PM3 1.1.15)
      Objective Caml (3.04)
      Pascal (p2c 1.22)
      Perl (5.6.1)
      PostScript (ghostscript-6.52)
      Prolog (Gnu Prolog 1.2.1)
      Python (1.5.2 and 2.2)
      Ruby (1.6.7)
      SML (Moscow ML 2.00; SML/NJ 110.0.7)
      Scheme (Rice PLT 202; MIT Scheme 7.7.1, scsh 0.5.2, umb-scheme 3.2)
      Tcl (8.3.3 with tclx 8.3)
      Also note the following:
      Please Note that the absence of your favourite language (be it SNOBOL4, INTERCAL, or RedCode) does not mean that you cannot use it for this contest. The preferred form for submitting a program is as a precompiled executable, which you can produce by any means you want.

      If you can't supply a precompiled executable, and want to use a language which is not on the list above, let us know where to find an implementation of the language, preferably in the form of an RPM, and we will consider installing it.
    • I guess you can't do it in VB :-)
      • Well, read the language list page again. You could submit a program written in a language not on their list, provided they could easily install a compiler/interpreter/VM for the language on their RH 7.3/x86 system.

        Also, VB doesn't have functional features, to my knowledge. Perhaps VB.NET does, but not VB 6. But I'd be interesting in being corrected- how does one create an anonymous function/anon sub/lambda closure in VB?

        Of course, VB doesn't fit either of these criteria. Which begs the question- why the hell did some people think the VB comment to be interesting and not Funny?
    • And everyone knows that the right tool for a robot programming contest is Karel the Robot! Karel is the obvious choice for robot control since Karel is in fact a robot! Nevermind the fact that he is obessed with beepers and can't turn left! Karel will frag all other robot languages!
    • I've written my entry in my own language, called "ICFP":

      The language is defined by a standards body in a series of RFCs:

      1. An ICFP compiler will take any input and produce an entry which wins the currently open ICFP programming contest
      2. Feature freeze
      Right now there are no standards-compliant compilers, but, that shouldn't matter. There are no standards-compliant C++ compilers either.
  • Anyone catch how the bidding and money is important?
    • I think if 2 robots try to pick up the same package, the higher bid gets it. Higher bid might move first, too.
  • * The Drop command is used to drop packages. Packages are always dropped.

    You can also drop packages reliably with the shorter command, "UPS".

  • ...that really might solve someones problem, click here []. </shameless marketing, inc.>
  • Could I submit a client that involved making a connection to my own machine's globally-addressible IP address and then write a GUI that ran on my machine to control my robot?

    I have a feeling that it would be a whole lot easier to win that way...
  • by silverhalide ( 584408 ) on Friday August 30, 2002 @04:23PM (#4172784)
    Every package has a unique identifier, a weight and a destination. If a robot dies, its packages are lost.
    Ah, that explains what happened to all those UPS pacakges that seem to randomly disapear.

    I bet UPS is secretely sponsoring this competition so it can replace drivers with robots. The competing robots are FedEx drivers, so UPS robots can push the FedEx drivers into fatal squares. Perfect!

  • by wackybrit ( 321117 ) on Friday August 30, 2002 @04:31PM (#4172851) Homepage Journal
    Anyone remember AT Robots []? You created EXE files that called routines in the server's API and did robot style stuff. The aim of the game was simply to kill the other robots though, and to survive the longest.

    You could use any language (that produced a DOS compatible EXE), and I remember coding robots in the early 90's and having a lot of fun. Tournaments still continue for that game!

    There was another game in which you had to program a robot that was a race car and get it to go around a track that it had to learn. I forget the name of that, but I heard tournaments also take place for that too.

    Does anyone have any links to other cool programming games?
  • by Anonymous Coward on Friday August 30, 2002 @04:39PM (#4172917)
    A player should use a reasonable amount of resources. Aim for:

    * not use more than 64 MB of memory at any point in a game,
    * not consume more than 1 CPU second per move on average in a game on our 1.5GHz Pentium 4 processor.

    How are the Java folks supposed to write anything more than a "Hello World" program with so few resources?

  • by Anonymous Coward
    There's no no-op command, just pick, drop, and move. Can you no-op by picking up a package that is not there, or does it kill the robot?

    In other matters, offense seems to be remarkably underpowered. If bots aren't next to each other, the only offense would consist of sitting your bot in a strategic location knowing it can't be passed. Thus offense is only possible on maps with chokes, i.e. thin corridors with walls and water on the sides.

    Guarding the home base and packages, and other such "turtling," may be fairly powerful.

    Note: offensive and defensive considerations tend to be important only in 1 on 1. In a multi-robot free for all, playing offensive or defensive will likely lose you the game to people who simply deliver packages fast.

    As for (1,1) being the corner, I assume this is done so people can simply make (0,y) and (x,0)consist of walls, simplifying the programming.

  • It's RoboRally (Score:3, Informative)

    by deblau ( 68023 ) <> on Friday August 30, 2002 @05:38PM (#4173296) Journal
    It's RoboRally [], published by WOTC []. See here [] for an explanation of the rules, and compare to the ICFP rules here []. Personally, I think RoboRally is more fun.
  • Team play? (Score:3, Interesting)

    by tap ( 18562 ) on Friday August 30, 2002 @07:46PM (#4174062) Homepage
    Accoring to the rules, player's robots will be competing with 0 or more other robots from other contestants. What if a group of people each enter a robot, then have the robots work together.

    You could open a socket and have the other robots try to connect, then communicate that way. That might be hard, if for example the robots are running on different machines or the organizers check for open ports.

    Since all the robots have almost complete information, you don't need to communicate. Have your robot do a little dance at the beginning, left right left right up down or something, to identify it as a team member. Your robot knows what the team members are doing because it can just compute what their decisions will be. The only information you lack is the weight and destination of a package that a teammate picked up.

    You could have the robot with the lowest X & Y coordinates be the leader. The other robots stay around him so he doesn't get bumped. Or carry packages to him to deliver. Or hang next to the home bases, and when another robot moves onto them, bump them so they can't pick the package. Since it takes one turn to pick up a package, I think it would be trivial to make a robot that hanges near a base and can prevent any single other robot from ever picking the package.

  • Check out the "Truckin" [] game at Xerox PARC in 1983. Teams had just one or two days to design and implement their players that were then pitted against each other as everyone gathered around and watched. It was designed to teach a language, not test programming skills. At that is succeeded -- I lost big-time, but had a ball and learned a lot.

    Sure been a lot of progress in the last 20 years...

  • List of contests? (Score:3, Insightful)

    by DEBEDb ( 456706 ) on Saturday August 31, 2002 @12:03AM (#4175025) Homepage Journal
    Speaking of which, does anyone run
    a (regularly updated) list of contests
    that are coming up? Like recent (more
    or less) Google challenge, etc.

  • The downloadable test server appears to be written in Haskell and compiled with GHC []:

    > strings Simulator | grep GHC

    The GHC User's Guide has full details.
    RTS options may also be specified using the GHCRTS environment variable.
  • Language ehhh? (Score:2, Interesting)

    by MoogMan ( 442253 )
    First Prize ...
    Peer recognition: Finally, the contest judges agree to state at least once during the presentation of the awards that the winning team's programming language is "the programming tool of choice for discriminating hackers."

    Second Prize ...
    Peer recognition: The contest judges agree to state at least once during the presentation of the awards that the winning team's programming language is "a fine programming tool for many applications."

    Man, someone *must* do it in BRAINF*CK or even funnier... Visual Basic. You can just imagine them saying that "VB is the programming tool of choice for distriminating hackers"

I have never seen anything fill up a vacuum so fast and still suck. -- Rob Pike, on X.