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

19 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!

  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?

  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.

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

  9. 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?

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

  11. 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
  12. 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

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