Slashdot Mirror


Gridwars Parallel Programming Challenge

Peter_Pork writes "New Scientist has an article about GridWars, a challenging new game that runs on large clusters of computers. Programs fight each other for supremacy in terms of the number of processors they control, and the main point of the contest is to develop better parallel algorithms. It seems a nice idea: have fun while you improve the state-of-the-art in cluster computing. The result of the last contest was somewhat of an upset, since a craftsmanly Russian program defeated a sophisticated genetic algorithm from NASA."

32 of 176 comments (clear)

  1. A strange game. by mrpuffypants · · Score: 4, Funny

    The only winning move is not to play. How about a nice game of chess?

    I couldn't resist!

    1. Re:A strange game. by LiquidCoooled · · Score: 2, Funny

      and just how would YOU stand up to a piece of frozen waterlogged foam thrown at you at thousands of miles per hour?

      --
      liqbase :: faster than paper
    2. Re:A strange game. by Timesprout · · Score: 2, Funny

      Personally I would stand in a sort of ducked position

      --
      Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
      What truth?
      There is no dupe
  2. OMG by The+Bungi · · Score: 5, Funny

    An article where SOVIET RUSSIA *and* beowulf jokes are on topic. What's next? A Natalie Portman interview?

    1. Re:OMG by Jellybob · · Score: 2, Funny

      Yeah... it'll be about here newly bought Russian beowulf.

      And it'll be posted twice, with the evil bit set on the dupe.

  3. I might be good at this by Anonymous Coward · · Score: 5, Funny

    I've often been told my programs require more cpu, allocate more memory, and take more time than any other coder on the team. If I can scale up my special skillz to more than one processor at a time, I might have a chance here.

    1. Re:I might be good at this by bobbozzo · · Score: 2, Funny

      So quit using VB!

      --
      Nothing to see here; Move along.
  4. Next article prediction by LordOfYourPants · · Score: 3, Funny

    Scientific American has an article about Hellmouth, a challenging new game created by Junis that runs on large clusters of computers. Sponsorship from SCO looks to be confirmed and celebrities such as Natalie Portman promoting grits are in tow.

    Sadly, the death of Stephen King during the game's promotion at E3 and LinuxWorld (where no one showed up) put a damper on things, while in Soviet Russia the people controlled YOU.

  5. Everything old is new again. by Mordant · · Score: 4, Informative

    Anyone remember Core Wars?

    1. Re:Everything old is new again. by jonathan_ingram · · Score: 3, Informative

      Yep. In fact, there's a really nice interactive corewars server here.

    2. Re:Everything old is new again. by rabidcow · · Score: 3, Informative
      It gets better.

      There was a game based on core wars called "CoreLife", which was 2 dimensional:


      CoreLife: The Linear Thinkers Nightmare. By Brent Adams
      Copyright (c) 1993.

      CoreLife is a training program designed to improve the skills used in a
      multitasked environment. It is, however, just a game. (don't blame me if
      it can't do your taxes)
      The CORE is a simulated 2 dimensional parallel processing computer with
      language and addressing modes similiar to conventional assembled code. The
      programs in memory compete for system resources (namely space), while
      conserving energy. This is accomplished by accumulating space as fast as
      possible while minimizing the number of logical threads. (parallel paths)
      Conflicts for space (ie. moving a new command into an opponents territory)
      are resolved using a dice roll based on the strength of the opponents.
      STRENGTH = (AREA accumulated)/(Number of logical threads)
      Programs are considered dead if net area ever falls below zero. The
      winner is the last program that survives.
    3. Re: Everything old is new again. by gidds · · Score: 2, Interesting

      There was even a version for the BBC Micro called RAM WARS! (In The Micro User magazine - listing and full article (PDF) both online). Ah, that brings back memories...

      --

      Ceterum censeo subscriptionem esse delendam.

    4. Re:Everything old is new again. by Insurgent2 · · Score: 3, Interesting

      Another nice modern variant on the coreware there is found at IBM called RoboCode.
      You write Java robots that battle each other by controlling movement, gun turret and radar turret. A great way to learn Java, be mentally stimulated and is entertaining to watch.

  6. Close but not quite by loadquo · · Score: 4, Informative
    since a craftsmanly Russian program defeated a sophisticated genetic algorithm from NASA.

    It should not read like that it should be.

    since a craftsmanly Russian program defeated a sophisticated program created by a genetic algorithm from NASA.

    See (from NS):
    "The final battle saw Wenig's program - created using genetic algorithms - take on a program designed by a computing student from Moscow State University."

    A subtle, but important difference. Now if the prgrams were actually evolving in the Gridwars game that would be interesting, as it would be similar(ish) to my project.

    *Dreams of a day they put an edit queue on slashdot*

  7. Gridwars, the next Rogue-alike by smarthippy · · Score: 4, Funny

    Rogue: oh no! a 'C' is chasing my @! majick missle! majick missle! arghhll...

  8. experience by Tablizer · · Score: 2, Funny

    The result of the last contest was somewhat of an upset, since a craftsmanly Russian program defeated a sophisticated genetic algorithm from NASA.

    Perhaps their virus writing skills give them an edge

  9. Craftmanship versus sofistication? by WegianWarrior · · Score: 4, Insightful

    ...a craftsmanly Russian program defeated a sophisticated genetic algorithm from NASA.

    This is not the first time something craftmanslike can beat something sofisticated. Even thought the following examples are strictly hardware, the general idea is the same.

    Take, for instace the T34 vs the Tiger. The Tiger was one of the most sofisticated - if not the most sofisticated - tanks in production at the time, but were drowned by hordes of the more craftmanlike and easily manufactured T34.

    The battle between a simple, craftmanlike approach and sofistication was once again seen in the early sixties, in the race to get a man into space. The russians fielded the Vostok, a design born more out of solid craftmanship than anything else. It's very simplicity was a strenght, allowing it to undertake missions up to five days long, while the american attemt at a longdurationflight in the highly sofisicated Mercury lasted just under a day and a half, leaving Gordon Cooper in a virtualy dead capsule (having to eyeball his attitude thru the windown and manualy fire the retros). Granted, one reason the US had to go for sofisication is that their rockets simply couldn't lift as much as russian rockets... but whereas derivatives of the Vostok still flies (as unmanned recoverable satelites), the line that breed the Mercury is dead.

    Sofistication is well and good, but many times a less sofisticated but better crafted designs / programs can outperform it. Sofistication for it's own sake is usually not worth the tradeoffs.

    --
    Everything in the world is controlled by a small, evil group to which, unfortunately, no one you know belongs.
    1. Re:Craftmanship versus sofistication? by vadim_t · · Score: 3, Interesting

      Sounds rather typical for russian stuff. I used to live there 12 years ago. Most things, like household items like irons and mixers weren't very pretty, but they were definitely were solid and lasted years and years. Some were even left from the previous generation.

      I also remember seeing a magazine explaining the construction of an electric razor, and being able to buy all the components it was made of in a shop. Now unfortunately things seem to have "modernized" though, and all the crap that is produced now is becoming common there.

      It's even kind of sad. If previously it was possible to have something working for 10 years without failing, now we have to replace things like mixers and vacuum cleaners very often.

    2. Re:Craftmanship versus sofistication? by ameoba · · Score: 2, Interesting

      Considering the paralllels already drawn between this and Corewars, it's no suprise that GA-derived programs don't work. For most things, GA-derived algos are seldom the best or most cost-effective way of developing a solution, but numerous people have tried using GAs to develop CW code, and they've not been able to build anything more successful than a variant of hand-crafted programs (and generally do far worse).

      --
      my sig's at the bottom of the page.
    3. Re:Craftmanship versus sofistication? by Annamite · · Score: 2

      I respectfully disagree.

      I used to use lot of Russian-made appliances and hold-house items like you mention. But the quality is crap to the level of quality faked from Hong Kong. Almost anything household items made by Russian was of very low quality compare to stuffs Made in Japan and U.S.A. And that was then, a little bit of 14 years since I have moved to the US.

      The funny thing is that now even with a "Made in the U.S.A." label, it does not mean it is of high quality. Many American companies, having to compete with cheap labor and cheaper materials elsewhere in the world, begin to produce cheap products. Cheap in price, and cheap in quality as well ...

      Ah-shucks.

      Anyway, on the topic:

      About sophistication, I think the word is used by the article's author. The degree of sophistication of an algorithm or strategy should be judge on its ability to achieve it goal in the prescribed time. Entire goal! Which means winning eventually.

      Made by a team of well-funded scientists, or a well-schooled person, a powerful country, does not necessarily mean it is sophisticated. Especially if it is crap by said criteria.

      What fun is it if your side won many of the battles but dead and lost the whole war?

      What is the sophistication if you are dead before your opponents are?

      The same outcome that best described this scenario is repeating many times in The World Pokers Series ... it is a great exercise your mind and ballz :-). Check it out.

      I believe that the team from NASA should study the code/algorithm from the Russian. And learn from it. And it might prove that their knowledge of how natural selection workings is wrong. or their knowjdge is fine, but wrong application/method/rate/whatever.

      This is the whole point of the contest, isn't it?

      And hopefully pay that guy a shitload of money. Please. (-:

  10. Content information by agentZ · · Score: 2, Informative

    Much more information is available at the GridWars II official site.

  11. Deja vu? by WegianWarrior · · Score: 2, Funny

    ...the ultimate way to debug their programs - let them compete against other programs in a gladiator-style tournament.

    Dont that sound awfully familiar?

    --
    Everything in the world is controlled by a small, evil group to which, unfortunately, no one you know belongs.
  12. Re:My brain hurts! by DoorFrame · · Score: 3, Funny

    You could program them to fight each other for possession of individuals neurons in your brain, then post the joke that's able to hold onto the most territory in your head.

    Sound good?

  13. Re:Pens versus Pencils by Q+Who · · Score: 5, Informative

    NASA decided that the astronauts needed a writing utensil to take notes during space missions. NASA spend a large amount of money to develop the zero G ballpoint pen.

    This is an urban legend.

  14. or one GA vs another? by Chris+Burke · · Score: 3, Insightful

    i don't necessarily view it as craft vs sophistication. the sophisticated thing was the genetic algorithm, not the resulting program. that GA was competing in the contest with another GA -- the one that produced the Russian programmer. that second GA could be considered vastly more sophisticated than the first. it produced a general purpose intelligence that could defeat the first GA at what it was specifically designed to do.
    go nature! :D

    --

    The enemies of Democracy are
  15. bad programming by Traa · · Score: 3, Informative
    Part of the challange is that at each step the programms only get a certain amount of time to do their computations before having to make a move.

    Quicky check at the NASA program and I find a switch statement of 2049 (2^11) parts. It is broken up in switch blocks of 64.
    if (situation<64){switch(situation){
    case 0:tdir=5;break;case 1:tdir=1;break;
    case 2:tdir=1;break;case 3:tdir=5;break;
    case 4:tdir=2;break;case 5:tdir=4;break;
    case 6:tdir=6;break;case 7:tdir=2;break;
    ...
    }}else if (situation<128){switch(situation){
    case 64:tdir=1;break;case 65:tdir=2;
    ...
    This is sad coding on so many different levels. I am not sure how to express my feelings about it.
    First let's look at a straight forward way of how to do this....the lookup-table.
    //create a big easy to access lookup table
    static unsigned char nTable[2048] =
    {
    5, 1, 1, 5, .....
    };

    //range check your index
    if (situation<0 || situation >= 2048)
    {
    situation = 0;
    //print some debug error message
    }

    tdir = nTable[situation];
    It is fast (speed is an issue).
    Takes up less space (programming space can be an issue).
    Easier to read (debugging tricky programs is hard enough without the obfuscation).
    And should have been part of your basic programming education.

    And this is state of the art coming out of NASA?
    I'm impressed our shuttles go UP in the first place (ja, ja...low blow...just kidding ofcourse).

    Really, if I see this kind of coding I cringe. Then talk to the person. Then make sure they learn from their mistakes and don't do it again, or they can find themselves a job outside of my team.
    1. Re:bad programming by jonhuang · · Score: 3, Interesting

      Wasn't the NASA program created by a genetic algorithm? It's bad style yes, but fairly decent for an automated programmer.

    2. Re:bad programming by cpeterso · · Score: 4, Interesting


      People are noting that NASA's program was created using genetic algorithms, but there is nothing preventing the use a data table to store the genetically evolving data. In fact, that might be a much better host because the evolving data is located in a single section of data.

      Anyways, the table lookup is NOT necessarily faster than huge switch statement. The table lookup requires the data table to be loaded. If the table is large and has poor reference locality, then your program could end up thrashing the processor cache. The switch statement(s), however, can compute the jumps without loading stuff from the data segment (and flooding the processor cache).

      And Linus Torvalds seems to agree with me: http://www.ussg.iu.edu/hypermail/linux/kernel/0304 .3/1367.html


      >
      > gcc 3.4 will have a __builtin_ctz function which can be used for this.
      > It will emit special instructions on CPUs that support it (i386, Alpha
      > EV67), and use a lookup table on others, which is very boring, but
      > also faster.

      Classic mistake. Lookup tables are only faster in benchmarks, they are
      almost always slower in real life. You only need to miss in the cache
      _once_ on the lookup to lose all the time you won on the previous one
      hundred calls.

      "Small and simple" is almost always better than the alternatives. I
      suspect that's one reason why older versions of gcc often generate code
      that actually runs faster than newer versions: the newer versions _look_
      like they do a better job, but..

      Linus

  16. Russia won the cold war? by geeklawyer · · Score: 2, Funny

    Oh right the
    col^Hde war.
    phew.

    --
    -he who laughs last, is a bit slow.
    journal
  17. Programming parallell algorithms are difficult.... by Homology · · Score: 3, Informative
    and fun ways of exploring new programming paradigms are welcomed by all, I gather. Multi-threaded programming is easier, better understood, but still hard.

    Multi-threaded applications are less common that one might think. Even those GUI applications that would benefit alot from improved responsivness due to multi-treading avoids it, due to greatly increased complexity.

    When the Gang of Four came out with their Design Pattern book, it was a great hit, and very usefull indeed. But design pattern for multi-threaded programming is not that well-know. But some are published, as the link below shows :

    http://www.cs.wustl.edu/~schmidt/patterns-ace.ht ml

  18. Of course the human won. by damien_kane · · Score: 2, Interesting

    We, as humans, cannot create anything to do comething better than we can (providing we have the same tools).
    This is why AI is not more intellignet than humans, why we haven't found a fast way to factor products of large primes with computers, and why humans can still beat computers at chess.
    Computers are good ate one thing. Doing mundane calculations over and over again ad.infinitum. They do this very fast. They cannot, however, compute something that (with enough time) could not be calculated by a human. We code (create/invent) based on what we know. We know how to calculate the path of a rocket, factoring in initial acceleration, wind, etc... so we can make a computer do it really fast.
    We know how to play chess... so we can make a computer do it really fast.
    We know how to calculate interest, so we can make a computer do it very fast. We do not know how to make cold fusion work, therefore we cannot get a computer to figure it out for us.

    Until someone figures out a way to teach any human to beat every other human every time, we cannot develop a computer that is 'smarter' that we are.

  19. They'll all remember this as how SkyNet started!!! by ReallyQuietGuy · · Score: 2, Funny

    They've got to stop it now!