Slashdot Mirror


2002 ICFP Programming Contest

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.

24 of 215 comments (clear)

  1. Solution! by Bingo+Foo · · Score: 4, Funny

    10 PRINT "I WIN!"

    --
    taken! (by Davidleeroth) Thanks Bingo Foo!
    1. Re:Solution! by Anonvmous+Coward · · Score: 4, Funny
      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? :)
    2. Re:Solution! by mskfisher · · Score: 3, Informative

      In C and C++, the line "#include 'filename'" tells the compiler to act like the contents of 'filename' are inserted at that location.

      Since Unix treats all devices as files (keyboard, CDROM, hard drive, etc) /dev/tty refers to the keyboard (teletype). You can therefore type anything you want into the file at compile time.

      It works in Windows/DOS, too, with the filename 'con', i.e., #include "con" .

      --
      0x0D 0x0A
  2. Robots drown... by MosesJones · · Score: 4, Funny

    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.

    --
    An Eye for an Eye will make the whole world blind - Gandhi
  3. Do Not Trust the Pusher Robot! by Anonymous Coward · · Score: 4, Funny

    Shoving is the answer, please stand near the stairs

  4. Great idea! by Cutriss · · Score: 5, Funny

    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!

    --
    "Mod, mod, mod...and another troll bites the dust."
  5. missing keys... by McCart42 · · Score: 4, Funny
    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?
    --
    "I may be quite wrong." - Socrates
  6. one based array? by [amorphis] · · Score: 4, Funny

    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?

    1. Re:one based array? by coyul · · Score: 4, Informative

      What kind of programming challenge uses a one-based array?

      Actually, in this case it's a great idea. The game world is bounded by walls, so you can put the walls in the 0 index (and the width+1 index) of your array and not have to explicitly test for the array bounds. Treat them like any other wall.

  7. Fifth Programming Contest by Caractacus+Potts · · Score: 5, Funny


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

  8. Re:Very cool task this year by richieb · · Score: 3, Insightful
    What's wrong with Eiffel? I mean once you get past the $$$ issue of getting it...

    What's wrong with GNU SmallEiffel?

    --
    ...richie - It is a good day to code.
  9. Programming Languages by Anonymous Coward · · Score: 5, Funny
    From: http://icfpcontest.cse.ogi.edu/machine.html
    Software
    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)
    <snip>
    * PostScript (ghostscript-6.52)
    --
    Mad, mad props to the first team to enter a working submission written exclusively in PostScript.

  10. Re:C++ vs. SML for language by joto · · Score: 4, Informative
    Someone recently told me that SML would be a much better programming language

    Yes, people often do that. But what they often neglect to tell you, is that it depends upon the task at hand. Still, SML is a nice language, but I wouldn't use it for everything (neither would I use C++ for everything).

    If you like functional programming, like static checking (there are no ways around SML's typesystem, you are really, really safe), like strictness (as opposed to lazy functional languages), and like to be able to do some imperative hacking for the last bit of performance, then SML may be for you. If you are into compilers, theorem-provers, computer algebra or anything similar, then SML is definitely for you.

    For tasks that are very low-level (i.e. require lot's of bit-fidling), needs to run in small memory-space, needs access to lot's of C or C++ libraries, etc, C++ is definitely more suited.

    though it has no/little support for variables

    Yes, that's the whole point of functional programming. But SML allows you to declare ref-cells which behave just like variables in normal languages. The downside is that using them makes your code incredibly ugly (something most SML'ers think is good, because it encourages good functional programming style).

    A good implementation of SML would run with more or less the same speed as C++, and could also run the same algorithms (since it allows you to use imperative constructs), but it would be better if you used functional algorithms except when you really need to tune for the last clock-cycles. Unfortunately, the "standard" implementation, smlnj, runs more like at half speed of g++. There is another dialect of ML, called Ocaml, which has much more impressive native-code compilers. It is also somewhat more geared towards other programming-styles then the functional one (i.e it supports object-oriented programming really well).

    I just red the contest problems; It seems as though it can be easily done in C++ -- anyone have insight on this?

    Yes, to avoid being blamed for being biased towards functional programming, the ICFP doesn't usually have problems that are much better suited for functional languages. And there has certainly been contestants using C++ before. The main reason C++ may not fare too well in this contest, is probably because (1) usually the biggest C++ gurus are busy doing other things, while the biggest Ocaml, SML, Haskell, etc, gurus are competing, and (2) Functional languages are often more suitable for rapid prototyping than C++, and development speed is certainly an important ingredient in this competition. But it is definitely not impossible that either C++ or Perl comes out a winner some year.

  11. just to make sure noone is confused by the parent by Theodore+Logan · · Score: 3, Informative
    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.
    --

    "If you think education is expensive, try ignorance" - Derek Bok

  12. UPS Vs. FedEx by silverhalide · · Score: 4, Funny
    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!

  13. Anyone remember the old school robot games? by wackybrit · · Score: 3, Interesting

    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?

  14. There will be.... by cp4 · · Score: 5, Informative

    From the FAQ:

    Q1: Will a test server be available?
    A: Yes, stay tuned...

  15. Re:Complete Protocol? by Violet+Null · · Score: 3, Informative

    I think that the protocol needs to be updated a little. How do we know when the end of the list of robots is reached?

    It's all sent on one line, so the newline character marks the end of the list. See the examples.

  16. Discrimination against Java by Anonymous Coward · · Score: 4, Funny
    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?

  17. Re:Very cool task this year by SteelX · · Score: 3, Funny

    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."

  18. Re:C++ vs. SML for language by cpeterso · · Score: 4, Insightful


    the ICFP doesn't usually have problems that are much better suited for functional languages.

    That is definitely not true. The tasks are specifically chosen to highlight the unique strengths of functional programming languages, especially compared to imperative languages like C++. This robot problem is a heuristic optimization problem whose solution would require analyzing large trees of possible moves. To do this in C++, you would need to write lots of code that many functional programming languages provide for free. Don't forget Philip Greenspun's Tenth Rule of Programming: "any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp."

  19. It's RoboRally by deblau · · Score: 3, Informative

    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.

    --
    This post expresses my opinion, not that of my employer. And yes, IAAL.
  20. Team play? by tap · · Score: 3, Interesting
    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.

  21. List of contests? by DEBEDb · · Score: 3, Insightful

    Speaking of which, does anyone run
    a (regularly updated) list of contests
    that are coming up? Like recent (more
    or less) Google challenge, etc.

    --

    Considered harmful.