Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
PHP Programming IT Technology

PHP Contest: Revenge of the Apple Eating Robots 66

Zack Coburn writes "The latest Codewalkers' PHP Coding Contest invites PHP programmers to write a script in PHP to interface with a judging library and play 'Apple Eating Robots,' a game based on the classic Unix console game called Robots. According to the contest description, the goal is 'to avoid robots, eat apples, and kill robots by forcing them to hit each other in order to get the highest score.' For judging, 'at least 100 rounds will be played. In the end, the sum of all points earned will determine the winner. In the case of a tie, the running time will be the tie-breaker.' According to an e-mail sent out to Codewalkers users, 'The PHP Coding Contest is now in its third year since inception and touts $2,000 worth of prizes. The first ten places will earn a prize, so even if you aren't the top winner, you have a chance at winning something.' Prizes for the current contest include Macromedia Studio MX, Zend Studio, PHPEd, and SourceGuardian Pro."
This discussion has been archived. No new comments can be posted.

PHP Contest: Revenge of the Apple Eating Robots

Comments Filter:
  • by netsharc ( 195805 ) on Saturday May 22, 2004 @06:13AM (#9224006)
    Heck, I know sources I can get the prize for free... offer something tangible why don't you.

    Well, name recognition would be in it too, I guess. So one might be able to get a job coding PHP. Although, the standard things PHP is used for doesn't exactly require advanced AI-beating algorithms, it's more boring and tedious representation of data -- "wow, a forum, with comments..."
  • by Anonymous Coward

    sod writing in code in assembler, its PHP from now on !!, all those big companies use it like Eba.. no Amazo.. uhm uhm well my friend uses it on his blog

  • by pedantic bore ( 740196 ) on Saturday May 22, 2004 @06:40AM (#9224058)
    I was hoping that robots would be free of original sin, but no. Well, I guess if I can't find a robot that's smart enough to vacuum my living room without getting wedged beneath the couch, I shouldn't expect to find a robot smart enough to resist forbidden fruit.

    Well, let's hope all they want is a little revenge, and not their come-uppence.

  • Speaking of which... (Score:2, Interesting)

    by Anonymous Coward
    ..are there any good free PHP debuggers yet?
  • I thought we were pro Apple! It should be avoid the robots, break down gates, and make the robots crash into each other.. I know what you're thinking... Lets the robots crash into the gates... It hard keeping the gates up, they tend to crash by themself...
  • by Anonymous Coward
    Article says it's classic UNIX game, Robots, but i have never heard of it and want to try.

    Where can i get sources? Where is Robots homepage?
    How interesting is it?
  • by Anonymous Coward on Saturday May 22, 2004 @07:08AM (#9224095)
    1 month free hosting from TheHostingCompany.us. (Platinum Package)

    How exactly is this a prize? What are you going to do, cancel with your current ISP, transfer your website over to this place, wait a month, sign back up with your original ISP again, and transfer back?

    One year's hosting, that would be a prize. One month? That's not a prize--that's a burden (and, obviously, just a promotional gimmick).

    I hereby announce my own set of prizes for the 11th through the 20th place contestants. Each person placing 11th through 20th will have one free week's rent in an apartment, selected by me, on the opposite side of the country from their current residence, under the conditions that (1) they move all of their furniture in and unpack everything they own completely before the week is up, (2) they pack everything back up and move all of it back out by 5:00 PM the final day, (3) they sell their current residence to someone they don't know, and (4) they buy back their old place after the week is up.

    As an alternative, I will also permit the winners to remain in their new apartments, AS LONG AS they pay me a $1000 stipend every six weeks.

    Good luck, everybody!
    • How exactly is this a prize?

      No, it's not a great prize, but 20GB of transfer on a fast pipe could be moderately useful, even for just a month (to host an iso image or mid-sized video clip). In any case it's only one of 16 prizes, and probably a better one than a t-shirt or one year's DNS registration (though that too could be fun for goofing off purposes).

  • 1. Avoid robots

    2. Eat apples

    3. PROFIT!

  • "a game based on the classic Unix console game called Robots"

    I guess it's old-style, so... that would be old Apple ]['s they're eating?
  • Here [tinyurl.com] you can read about evolutionary computing, where teams of mobile robots with neural networks playing the Capture the flag game.
  • so I'm gonna get coding right away. Oh... But this'll cut into my /. time! Oh well... I guess the one is almost as much of a waste of time as the other.
  • *Calculates* That's less than what most developers make in a week or two. Coming up with something that'll win the top prize will probably take more than a few weeks of after-hours or programming (or during work-hours, if you're risky). Heck, those who play in those video game tournaments get more money. I'd pass.
    • For $2000, I'd take a shot. The logic can't be THAT difficult - for every frame, find the nearest 'bot. If it can't get to you in less than 2 or so turns, move. If you're cornered, teleport (if that's still part of the game, that may have been an offshoot of the original). Avoiding 'bots takes priority over killing bots, which is above getting apples. The only slightly difficult part would be to make the 'bots crash. Considering some of the programming tasks we got in second-level college C++, this ex
  • RealTimeBattle [sourceforge.net]

    OK, this idea goes way back to CoreWars. PHP or Redcode? Hmm. Not so easy to decide ... :-)

  • I run the Uberhacker [uberhacker.com] website. This site is dedicated to secure PHP programming. We are currently running a Gauntlet challenge [uberhacker.com] to see who can create the most secure scripts of a specific type. This round, the challenge is to create an Article Submition System [uberhacker.com].
  • I should get the prize already - notice the missing endquote?
    /* "height" will be between
    100 and 1000 */
    "height => 100-1000;
  • Best Use? (Score:2, Interesting)

    by Tellalian ( 451548 )
    I'm a big fan of PHP, but is this really the best usage for this language?

    This is a game, so ideally, some real-time graphical output would be nice. Yet isn't that not the nature of PHP? PHP's web-centric, so you're usually generating html. If I wanted to write a game that has to run continuously I'd write it in a general purpose programming language like python (or c++ if I was feeling masochistic ;). Python has a simple syntax and a standard GUI library, along with scores of additional modules for graphi


  • How about a contest to see who can make PHPnuke impervious to
    brazillian script kiddies [nukecops.com]? I'd put up $500 cash to see that accomplished.
  • An online version of the game can be found here: http://www.robinjohnson.f9.co.uk/robots2/robots2.h tml
  • by Otto ( 17870 ) on Saturday May 22, 2004 @05:16PM (#9226463) Homepage Journal
    Okay.. You only have 9 possible moves. So on each turn, you run through all your possible moves, one at a time. After each move you can make, you calculate what the robots will do (since this is known), and then make a choice.
    -If a move will get you killed, you eliminate it as a possibility.
    -If all moves will get you killed, you teleport and hope for the best.

    The only real choice is when you have more than one move that will keep you alive, and just a few rules can make this fairly obvious on what to do.

    -If all the robots are in line with you and there's a scrap pile between them and you, stand your ground. They'll eventually run into the scrap.
    -If a move will make robots collide, bump it up in priority a bit. Bump collisions that eliminate robots that are closer to you higher than collisions happening far away.
    -If a move will bring robots closer to each other on the same line, bump it up in priority a bit, because this sort of thing will eventually cause them to collide. Give extra priority to bringing together robots that are closer to you, because scrapheaps closer to you protect you from robots further away from you.
    -If a move will get you closer to any robots, lower it in priority a bit, because you want to keep your distance when possible. This should be less than the above priority adjustment because to bring robots together you need to have them on opposite sides of you, either vertically or horizontally.

    Once you've done that, you pick the move with the highest priority. Then it's just a matter of tweaking these priority adjustments by hand until you find one that works good.

    Apples are a null factor. The only way it states to end the game is to kill all the robots, and it says you get all the remaining apples after that anyway. So going after them is pointless with the rules as written. If getting all the apples also ends the game, then that's something else to consider as a factor, and makes it a bit more complicated.
    • The killer here is the speed of PHP - The maps they are talking about are big (905x730, 10,631 apples, 1,950 robots, but could be 1,000x1,000, 20,000 apples and 10,000 robots), and you have to play through an entire game in 60 seconds.

      An non-optimal routine I wrote takes about 4s to evaluate each move (Using something like the rules you outlined) on a 2.4Ghz P4. So it's going to take some serious optimisation to get it to the point it can play a decent number of moves.

      The first one is to play out the gam
  • functions library (Score:2, Informative)

    by StarDeath88 ( 759565 )
    Am I the only one who can't access the site at the moment? I already have a script mostly made thank you google chache) and would like to test it... Would someone mind emailing it to me/mirroring it?

"I've seen it. It's rubbish." -- Marvin the Paranoid Android

Working...