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.
My sister opened a computer store in Hawaii. She sells C shells down by the seashore.
Unlimited Bragging Rights (Score:1)
Very cool task this year (Score:1)
One of the classes at my university last year had to write a simulation like this using Eiffel. Ick!
Re:Very cool task this year (Score:1)
Re:Very cool task this year (Score:1)
Eiffel (Score:2)
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?
Re:Eiffel (Score:1)
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
Re:Eiffel (Score:2)
The fact that functions and procedures are strictly separated means that something like(in Ruby):
class Stack
def initialize(*arr)
@array * arr
end
def pop
@array.pop # implicit return
end
end
bar = Foo.new("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.
Re:Eiffel (Score:2)
Cool. Finally other IDE's caught to Eiffel. With ISE's IDE I could all these things in 1994.
Re:Very cool task this year (Score:3, Insightful)
What's wrong with GNU SmallEiffel [loria.fr]?
Re:Very cool task this year (Score:3, Funny)
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)
Re:Solution! (Score:4, Funny)
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?
Re:Solution! (Score:2)
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.
Re:Solution! (Score:2, Funny)
1 ?"10:30"
Commodore64's rock.
Re:Solution! (Score:3, Informative)
Since Unix treats all devices as files (keyboard, CDROM, hard drive, etc)
It works in Windows/DOS, too, with the filename 'con', i.e., #include "con" .
Robots drown... (Score:4, Funny)
Re:Robots drown... (Score:1)
Re:Robots drown... (Score:1)
FUN!! (Score:1, Funny)
Do Not Trust the Pusher Robot! (Score:4, Funny)
Great idea! (Score:5, Funny)
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!
missing keys... (Score:4, Funny)
Haha, give this guy the $10,000 (Score:1)
Re:missing keys... (Score:2)
There's gotta be a way to mix the Move and Pick commands to Rocket Jump...
one based array? (Score:4, Funny)
What kind of programming challenge uses a one-based array?
Re:one based array? (Score:1)
Re:one based array? (Score:1)
Re:one based array? (Score:1)
Re:one based array? (Score:2)
Re:one based array? (Score:1)
Re:one based array? (Score:1)
BTW, it was a joke. Your hostility is appreciated though.
Re:one based array? (Score:2)
Re:one based array? (Score:1)
</obligatory>
But seriously...
HAHA! YOU KNOW VB!!
Re:one based array? (Score:2)
Re:one based array? (Score:2, Funny)
Amateur (Score:2, Interesting)
"The edges of the world behave as if there were walls beyond them."
A common trick to implement this is to allocate a [width+2][height+2] array, and store the wall character at x=0,width+1, y=0,height+1. This is faster than testing if (x,y) is off limits each time.
Re:one based array? (Score:1)
Re:one based array? (Score:4, Informative)
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.
Re:one based array? (Score:1)
Thanks.
Re:one based array? (Score:2)
Silly programmer! The 0 ordinates are for the walls next to the west and south side (see the rules)...
Fifth Programming Contest (Score:5, Funny)
Man, I've been practicing all year using FORTH. Rats!
Re:Fifth Programming Contest (Score:2)
SomeThing Awful (Score:1)
UNF UNF UNF
Ambiguous rules (Score:1)
Re:Ambiguous rules (Score:1, Informative)
My question is... could I train one of them carnival chickens to play and submit him?
Re:Ambiguous rules (Score:1)
Re:Ambiguous rules (Score:1)
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.
Re:Ambiguous rules (Score:1)
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.
Re:Ambiguous rules (Score:2)
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.
They forgot the most important button... (Score:1)
Pretty neat.. (Score:1)
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.
looks interesting, but... (Score:2, Insightful)
Nathan
Re:looks interesting, but... (Score:1)
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. :)
Re:looks interesting, but... (Score:1)
Cheers!
Re:looks interesting, but... (Score:1)
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)
Q1: Will a test server be available?
A: Yes, stay tuned...
Re:looks interesting, but... (Score:2)
This looks like a fun one (Score:2, Interesting)
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.
Re:This looks like a fun one (Score:2)
Q1: Will a test server be available?
A: Yes, stay tuned...
Programming Languages (Score:5, Funny)
Mad, mad props to the first team to enter a working submission written exclusively in PostScript.
just to make sure noone is confused by the parent (Score:3, Informative)
Re:just to make sure noone is confused by the pare (Score:2)
Re:just to make sure noone is confused by the pare (Score:2)
Not everybody deem it necessary to be rude and sarcastic as soon as someone tries to be helpful.
Not everybody have small penises.
But then again, there are those who fit into all of those cathegories, and I'll try to take you into account the next time I post. I apologize for any inconvenience my arrogance and narrowmindedness may have caused.
Re:just to make sure noone is confused by the pare (Score:2)
Heathens.
Re:just to make sure noone is confused by the pare (Score:2)
--
Re:Programming Languages (Score:2, Interesting)
Re:Programming Languages (Score:2)
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?
Use the right tool for the job (Score:2)
Re:Programming Languages (Score:2)
The language is defined by a standards body in a series of RFCs:
Money? (Score:1)
Re:Money? (Score:1)
Re:Money? (Score:1)
-FF
Re:Money? (Score:2, Funny)
Somebody's going to have a field day with this comment...
Dropped packages (Score:1)
You can also drop packages reliably with the shorter command, "UPS".
If you are bored & looking for something to co (Score:2)
Interactive? (Score:2)
I have a feeling that it would be a whole lot easier to win that way...
Re:Interactive? (Score:2)
UPS Vs. FedEx (Score:4, Funny)
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!
Anyone remember the old school robot games? (Score:3, Interesting)
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?
Re:Anyone remember the old school robot games? (Score:2, Informative)
Mindrover (Score:2)
Re:Anyone remember the old school robot games? (Score:2)
Back in the day, there were quite a few options for COREWORE-like games/contests on BBS DOS CD archives, like Simtel.
Discrimination against Java (Score:4, Funny)
How are the Java folks supposed to write anything more than a "Hello World" program with so few resources?
Ambiguities and other valuable considerations (Score:2, Interesting)
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)
Team play? (Score:3, Interesting)
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.
Truckin at Xerox PARC, 1983 (Score:2, Informative)
Sure been a lot of progress in the last 20 years...
List of contests? (Score:3, Insightful)
a (regularly updated) list of contests
that are coming up? Like recent (more
or less) Google challenge, etc.
The organisers seem to like Haskell (Score:2, Informative)
The downloadable test server appears to be written in Haskell and compiled with GHC [haskell.org]:
Language ehhh? (Score:2, Interesting)
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"
Re:Language/Envirmonment (Score:2)
As far as language, there doesn't seem to be any requirement.
Re:Language/Envirmonment (Score:1)
* 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)
PLUS binaries
Re:C++ vs. SML for language (Score:4, Informative)
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.
Re:C++ vs. SML for language (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."
Re:C++ vs. SML for language (Score:2)
Re:Why weren't we notified in advance? (Score:2)
You mean notified like in this Slashdot article [slashdot.org] posted two days ago?
Re:Why weren't we notified in advance? (Score:2)
Re:Why weren't we notified in advance? (Score:2)
Now for an off-topic question that I can't help asking: did you bang your head against the wall, and in that case for how long, when you realized that you'd have gotten #111111 had you been just a little bit quicker?
Re:Why weren't we notified in advance? (Score:2)
Hehehe, no, I didn't bang my head against the wall at all, I think my id is cool enough and just as easy to remember as #111111 just because it's so close. The only thing I might have regreted is not signing up for an id much sooner and gotten a 5 digit id since I had been a regular slashdot reader for almost a year before signing up for an id so if I hadn't waited that long I could have got a coveted 5 digit id <sigh>.
Re:Complete Protocol? (Score:3, Informative)
It's all sent on one line, so the newline character marks the end of the list. See the examples.