Slashdot Mirror


Tetris AI System

You've probably always wanted a system that reads a Tetris game via a webcam, decides the optimum move, and then inputs the commands to make that move, right? Well, now your prayers are answered.

208 comments

  1. Gaming AI's by Neuroelectronic · · Score: 1

    But can it play DooM?

    1. Re:Gaming AI's by Neuroelectronic · · Score: 2, Funny

      If someone did create a doom playing AI via webcam, what would stop someone from straping it to a moble platform w/ a gun and letting it lose in the streets to shoot down anything that moves? :)

    2. Re:Gaming AI's by Anonymous Coward · · Score: 3, Funny

      The laws of Physics?

    3. Re:Gaming AI's by aoeuhtns · · Score: 1
      moble platform w/ a gun and letting it lose in the streets

      Are you referring to windowsCE?

  2. Oh but... by RPoet · · Score: 4, Interesting

    I thought Tetris was NP-hard ;)

    --
    "Oppression and harassment is a small price to pay to live in the land of the free." -- Montgomery Burns.
    1. Re:Oh but... by Atrahasis · · Score: 2, Interesting

      Just because there is no ideal solution does not mean there is no way an AI-agent can do it.

    2. Re:Oh but... by KoolDude · · Score: 5, Insightful


      Being NP-hard means there are no existing polynomial-time algorithms to find the *optimal* solution. That doesn't mean it is impossible to write a program that can find *good* solutions. Moreover, NP-Hard problems get really impossible for higher instances. For small instances of NP-Hard problems, brute force search is still feasible.

      Another point is that the article you mentioned discusses a restricted version of Tetris.

      --
      getSexySig(); /* returns sexy signature */
    3. Re:Oh but... by Some+Var · · Score: 2, Funny

      Is anyone else reading "NP-Hard" as "No problem hard"?
      Confuses me everytime, maybe i've been abusing irc too much.. ;)

    4. Re:Oh but... by vandel405 · · Score: 1

      This is not a troll, but fact. Maybe the tetris seach is something trivial like n^1.0001 with normal games of n 10000, but still - the post says "decides the optimum move." Jon Hess

    5. Re:Oh but... by Anonymous Coward · · Score: 0

      Moreover, NP-Hard problems get really impossible for higher instances.

      Yeah, because impossible just isn't hard enough, is it? =)

    6. Re:Oh but... by langed · · Score: 1
      Speaking of being hard--I think they did it the hard way. At my university, we have an Artificial Intelligence class and in almost all student projects, there is merely one computer. Seems that the project was complicated unnecessarily by the webcam-recognition phase. I mean, why two computers? Seems to me that a single computer could do the job--but they might need to use an open-source version (tetris for terminals, anyone?) in order to get the program to pass the entire playing field out, in order to interact with it. I mean, why go to the expense of an extra computer and a webcam, when you could run both programs on the same machine?

      Just seems a little extra work there, that's all..

    7. Re:Oh but... by stevey · · Score: 1
      Moreover, NP-Hard problems get really impossible for higher instances

      I'm assuming the people who say Tetris is NP-hard are assuming a truely random distribution of falling pieces..?

      The amount of games I've lost because I didn't get a single 'long straight' piece is unbeliably hard. I know the computer is cheating me from my tetris's (tetri?)!

      Not that I'm bitter .. or anything ;)

    8. Re:Oh but... by Minna+Kirai · · Score: 1

      Actually, those people assume no randomness- their "Preview" box shows the entire list of all future pieces that will fall.

      (They don't play normal tetris... they also tend to assume that some sides of the pit are unbounded)

    9. Re:Oh but... by Minna+Kirai · · Score: 3, Interesting

      Most all school projects are "extra work", since students can rarely forge new ground that hasn't been investigated before. Instead, they learn to correctly duplicate known experiments, to get up to SOTA before following their own ideas.

      In this case, the machine-vision problem of recognizing blocks with a camera (which inserts distortion and uncertainty to the image) is an interesting challenge on its own.

      While viewing a computer screen is easier than most MV problems (the target is self-illuminated, so variable lightsource angles are less of a problem), it could have useful future applications. Especially if someday we're beset by hardened DRM computers that don't allow you to interact programatically- mouse input and LCD output only!
      Then the practice of watching a screen with the camera of your PDA might become the only way to take controlled files off those machines.

      (Watch the "Ghost in the Shell" movie for bizarre examples of this)

    10. Re:Oh but... by Anonymous Coward · · Score: 1, Informative

      Singular:

      Nom: Tetris
      Gen: Tetris
      Dat: Tetri
      Acc: Tetrem
      Abl: Tetre

      Plural:

      Nom: Tetres
      Gen: Tetrum
      Dat: Tetribus
      Acc: Tetres
      Abl: Tetribus

      So you could go for:

      "cheating me from my tetres"

    11. Re:Oh but... by Anonymous Coward · · Score: 0


      n^1.0001 is in P, so it's not NP-hard.

      On the other hand, 1.0001^n would be NP-hard.

    12. Re:Oh but... by travd · · Score: 1
      Actually, in the "Tetris is NP-Hard" article, the authors specifically mention that normal tetris, like the one this AI plays, is not NP-Hard and "could be solved by a simple dynamic programming algorithm", although they do not elaborate further on such an algorithm.

      The authors prove only that the difficulty of tetris does not scale in a polynomial fashion (so long as P!=NP) with the size of the board, really not a useful result, since the size of the board is fixed, in practice.

      In summary, Tetris as we know it, and as it is played by this AI, is not NP-Hard.

    13. Re:Oh but... by sangdrax · · Score: 1

      quite true!

      the NP-hardness and NP-completeness is only defined when you modify the game rules:

      * all pieces and their order are known in advance
      * only a limited number of pieces will fall .. but those rules ain't the ones of your normal Tetris game, in which you only know the next piece and can expect an infinite number of pieces.

      So if you write a computer program to play "normal" Tetris, you aren't bothered by those findings since they apply to a game with different rules.

      The thing you have to worry about is statistics (where to drop this piece to have the highest chance of winning). And assuming all forms of pieces have a constant chance of appearing, the computer program can probibly aim for some standard structures which have maximum chance.

      It still might be NP-hard to do the best move given all the statistics, I don't know. But that doesn't mean it's hard to approximate.. NP-hard doesn't mean hopeless :)

    14. Re:Oh but... by Anonymous Coward · · Score: 0

      Well... tetris isn't hard to play, it might be hard to solve (i'm not a mathemetician so i can't tell you for sure) but i am a programer. Not a very good one (i'm still in college) but i did write my own little tetris agent.

      I used a very simple algorithim, not really even using any advanced AI techniques, but it plays fairly well. Actually i can't tell you about how good it is, because it plays so well it now takes several hours to play through a single game (even with no graphics). From the best i can estimate, it plays at least 200,000 lines a good majority of the time. I've recorded a game over 600,000 lines, and that wasn't even the max, i had to stop it. That's probably more lines in one game than most tetris players even come close to in a lifetime. If anyone's interested i can put a link to the .exe to try it out.

  3. Holy Shit! by Limburgher · · Score: 0, Funny

    If they overcame the Clumsy-Ass Thumbs problem, this thing'll kick all our asses at 2-player! :)

    --

    You are not the customer.

  4. The New 4th law... by gokubi · · Score: 5, Funny

    1. A robot may not injure a human being, or, through inaction, allow a human being to come to harm.

    2. A robot must obey the orders given it by human beings except where such orders would conflict with the First Law.

    3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.

    4. A robot must never place the long skinny ones horizontally, unless it leads to a long skinny vertical hole so 4 rows can be cleared at once the next time a long skinny one comes around.

    --
    I'm much funnier now that I'm a subscriber.
    1. Re:The New 4th law... by GuyMannDude · · Score: 4, Funny

      I thought Directive 4 was that any attempt to arrest a senior officer of OCP Corporation would result in immediate shutdown!

      GMD

    2. Re:The New 4th law... by CSG_SurferDude · · Score: 2, Funny

      Oh geeezzzz, get real...

      That sort of stuff only happens in the movies.

    3. Re:The New 4th law... by Anonymous Coward · · Score: 0

      "A robot must never place the long skinny ones horizontally, unless it leads to a long skinny vertical hole so 4 rows can be cleared at once the next time a long skinny one comes around."

      What is "rows" and why would robots be interested in sex??
      Or, wait, you mean...

    4. Re:The New 4th law... by paulcammish · · Score: 1
      I thought Directive 4 was...

      Shhhh! Thats classified!

    5. Re:The New 4th law... by daveinthesky · · Score: 1

      actually.. there already was a 4th law.

      4) A robot may not injure humanity, or, through inaction, allow humanity to come to harm.

      it should be no surprise who wanted that one in there.

    6. Re:The New 4th law... by saforrest · · Score: 1

      4) A robot may not injure humanity, or, through inaction, allow humanity to come to harm.

      Err, wasn't that actually the Zeroth Law?

  5. Wow! by The_Rippa · · Score: 5, Funny

    Now THAT's some serious nerding...too bad a feat like this does nothing to impress the ladies

    1. Re:Wow! by Bonker · · Score: 4, Funny

      No, to impress the ladies with an app like this, you need something that can optimally play The Sims so that you can arrange any given soap-opera scenario to your liking.

      --
      The next Slashdot story will be ready soon, but subscribers can beat the rush and slashdot the links early!
    2. Re:Wow! by 6 · · Score: 1

      I'm female and I'm impressed :)

    3. Re:Wow! by The_Rippa · · Score: 1

      cool, wanna go out sometime?

    4. Re:Wow! by Kenja · · Score: 5, Funny

      I don't know. Being able to use a computer to get the right long piece into the right slot could be useful. However it could end up like my old boost of having a big Wang in my bedroom. Girls always left somewhat disappointed.

      --

      "Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
    5. Re:Wow! by Anonymous Coward · · Score: 0

      Dude, did you check out her website? I don't think you want to go out with her... Unless you're really that big a loser. Oh wait, this is /.... Sure go have a great time.

    6. Re:Wow! by jgerman · · Score: 1

      To be honest that's a pretty interesting project. I probably wouldn't go the whole camera route, more likely write code that controlled the mouse, though I wouldn't know how to "see" the game. I imagine there's some way to get a dump of the current dispay. Not being a Windows guy I wouldn't know. Anyone have any ideas?

      --
      I'm the big fish in the big pond bitch.
    7. Re:Wow! by Anonymous Coward · · Score: 0

      Ehm...maybe you should keep your clever thoughts to yourself. Her page is down anyway.

    8. Re:Wow! by Cruciform · · Score: 1

      Has your site been slashdotted by guys looking for pics yet? :)

    9. Re:Wow! by egreB · · Score: 1

      Why are there so few of you!? Where are you? Where do you go?

      I mean, if I were the one that made something like this, I'd be proud as few, and get a lot of recognition from my (male) geek-friends. But would it attract the girls? *sigh* It sure ain't easy. ..you wouldn't happen to be norwegian? (-;

    10. Re:Wow! by Anonymous Coward · · Score: 0

      I thought for a minute you said you had a big Wank in your bedroom, and no wonder the girls weren't impressed.

      Still, it would fit in with a story about a computer that plays with itself.

    11. Re:Wow! by Anonymous Coward · · Score: 0

      Not true. I'm impressed.

  6. A really useful tool... by ShawnDoc · · Score: 4, Funny

    Now if they would just adapt this to playing Solitare, I'd never have to come to work again! The computer could do my "job" for me.

    1. Re:A really useful tool... by Anonymous Coward · · Score: 2, Funny
    2. Re:A really useful tool... by spuke4000 · · Score: 1

      I think to do my job it would have to incorporate logic to generate random slashdot posts...

      --
      This post cannot be rebroadcast without the express written constent of Major League Baseball.
    3. Re:A really useful tool... by EvanED · · Score: 1

      That was my favorite commercial, I think because of the Office Space reference.

    4. Re:A really useful tool... by Anonymous Coward · · Score: 0

      Silly, I want to adapt it to do my *work* for me, so I can play the games... :)

  7. I know, I know by RimmerExperience · · Score: 1

    Sure would be easier to write an AI for an Open Source Tetris implementation.

    But if it's not ridiculously convoluted, converted to analog and back to digital data along the way, and (relatively) expensive, it's not fun, right?

  8. Great For Super Geeks by Anonymous Coward · · Score: 4, Funny
    This is great for the /.er who not only cant find a girlfriend and therefore is home playing tetris all Saturday night, but also cant find a friend to play tetris with. Just plug in your computerized friend and you will have fun all night long.


    That is until he beats you 27 times in a row and you throw your controller at his camera-head and cause him to crash.

  9. Tetris Setup Photo by Indras · · Score: 4, Funny

    Someone get this guy a Desktop Cleanup Wizard!. And I thought I had too many icons on my desktop...

    --
    The speed of time is one second per second.
  10. Damn cheaters by m4g02 · · Score: 2, Funny

    The future is facing us now!, i dont think i could take an AIRCUH (AI remote controlled undetectable hack) for Counter Strike, life wont have a meaning anymore, damn hax0rs.

    --
    Sigs are for morons... Wait a minute...
  11. amazing by Boromir+son+of+Faram · · Score: 3, Interesting

    This could be generalized into a system that completely replaces a computer user in any context, not just Tetris. Someone's already mentioned a Doom player, but you could do the same thing with Ebay auctions (the Ultimate Sniper?) or tedious reformatting in a word process, data entry.

    It's all just recognizing an on-screen situation and responding to it with key presses and mouse movements. Best of all, it doesn't rely on application developers to build scripting into their programs. It's a universal, platform-independent macro system.

    My people could put such a power to heroic use.

    --

    Boromir, son of Faramir, King of Gondor and Minas Tirith
    1. Re:amazing by BitHive · · Score: 3, Interesting

      A Doom-playing version of this system would probably require AI-complete machine vision, and sniping on eBay (not to mention document reformatting and data entry) is better accomplished with, say, a Perl script. While this is a cool little project, the piece detection has a pretty narrow range of operation wrt to contrast and flicker, and in no way is extensible enough to be a "universal, playform-independent macro system".

    2. Re:amazing by delirium28 · · Score: 1
      It definitely could be used for more than just computing applications. Imagine expanding this to work with robotics, so that adjustments can be made on the fly. There are quite literally thousands of possibilities here...

      LOCUTUS OF BORG: "We will raise the quality of life for all species."

      --
      Who is John Galt?
    3. Re:amazing by skillet-thief · · Score: 1

      The fact that one might suppose that there could be some kind of benefit from passing any kind of information from a screen, to a camera, into a second computer, even word-processing task, suggests the need for some kind of computerized, inter-process, inter-platform lingua-franca . Obviously video output is almost universal -- so why not use it? But wouldn't it be a lot simpler to use ASCII text and perl scripts, like someone already suggested?

      What I'm saying is that this suggests the need, but I am pretty damn sure that going through video -- and the atmosphere, for crissakes! -- is not the solution, except in a gaming context, possibly.

      --

      Congratulations! Now we are the Evil Empire

    4. Re:amazing by tmortn · · Score: 1

      OH I don't know.... its not extensible enough to be a doom macro machine but it could easily be enough to macro a MMORPG skill convincingly enough. Course there are easier ways to do that... but this one could do it without a local program interface running in the background. You could probably also make it a travel ai which knew how to tell where it was and travel to where you want to go while you take a bath with programed responses to msg's recieved ( IE you are attacked by X **initiate combat escpae sequence Z** move to loc ) Text recognition would be a bizatch though.

      --
      I don't ask you to be me. I only ask you not expect me to be you.
    5. Re:amazing by russellh · · Score: 1
      It's all just recognizing an on-screen situation and responding to it with key presses and mouse movements.

      that's all any computer user ever does.

      --
      must... stay... awake...
    6. Re:amazing by Anonymous Coward · · Score: 0

      What about using this type of AI in warehouse situations? I work in a grocery warehouse, assembling orders to be shipped to supermarkets. Not a really hard job, but some of the orders I've seen built (an order being an arrangement of various products placed on a skid) are WAY unstable, and just look horrible. The only info we get is that the order will be X cube. Now, if something like this was developed that took the cube of each product, and built a "virtual skid" and told the assembler where to put it for maximum space use, and stability, then that would take all the guess work out of it, and make a better (more compact) skid. This could have the potential of less damages to products, and therefore saving the company money (sure it's only a couple bucks here and there that gets damaged, but still, it adds up)

      As for the software itself being able to play tetris, I say bring it on...because of this job, i've become a tetris master....tetris is now my bitch.

      Zro

    7. Re:amazing by Grab · · Score: 1

      Macros for MUDs have been around for *ages*. I guess the only thing stopping MMORPGs from getting macros is that the games companies concerned own the code to their MMORPGs and aren't generally keen on anyone else knowing the hooks into it.

      Grab.

    8. Re:amazing by tmortn · · Score: 1

      Da and there are several for MMORPG but they have become more and more annoying in that the games try to keep you from accessing stuff in the background or running programs in the back ground.... a few EULA's now go so far as to say you cannont decode the pakets being sent to your computer/network whether you do anything with the information or not. Stuff like that. No biggie, generally childs play to get around but technically places you in violation of the EULA. ( Somethign I find perposterous but thats another beef )

      On the AI front however it would be an interesting project to enable a remote machine with no more input/insight into the game than a person to create action routines, and somewhat more widley applicable than Tetris. Of course you could bypass alot of pain in the ass visual recogintion routines by routing the txt msg's ascociated with MMORPG's but you would already have to be fairly sophisticated with recognising enemies etc... sort of like sniping bots. However when you get down to it MMORPG/MUDS are much more set peice action reaction games like tetris than say quake which is more fluid and freeform.

      What would be really interesting here is if he created a feedback learning system where he could expose it tetris clones and the computer could figure out how to play by the results of its actions. What say the recognition algorythim could be abstacted enough that a change in grid size and piece shapes wouldn't bother but determin if it simply is processing a previously unseen grid/shape that is valid or if it is malfunctioning.. if its a new shape it places it in its memory and evaluates where it would go ( ie make its own placement rules regarding the new shape based on what it already does. ) IF its a new grid it recalculates to allow for the extra space.

      Aagain the routines would have to be abstracted to the point the computer could define its parameters itself but say withen a loose guideline of rules.. IE Tetris is about falling blocks to be fit together in a seamless horizontal row to make them disapear and thus not fill up the grid and continue the game.

      --
      I don't ask you to be me. I only ask you not expect me to be you.
  12. cool but.... by tadheckaman · · Score: 0, Redundant

    it would be about 30 times faster to make the code IN the game, instead of using a webcam and relays and stuff... but still, a very cool project indeed.

    --
    My potato gun was confiscated by the United Nations. They said I wasn't allowed to have weapons of mash destruction.
  13. As my Favorite Family Guy Character would Say by indigogorge.net · · Score: 4, Funny

    "Holy Crap!!! You mean I don't ever have to think again! Sweeeet!!"

  14. Penny Arcade movie suggestion by klang · · Score: 5, Funny
  15. It's like you're inside my head ... by burgburgburg · · Score: 3, Funny
    Reading my very thoughts on how much I wanted a Tetris AI system.

    Of course, you're also telling me to pick up a halibut and run through the workplace smacking coworkers upside the head as way of instructing them in Esperanto. I think I'll try and ignore those instructions, this time.

  16. man... by Diclophis · · Score: 1, Insightful

    that site is a true hack, with a complete analysis of tetris and its clone... good job

  17. Sure, his project's impressive by Amsterdam+Vallon · · Score: 3, Funny

    ... but, quite frankly, I'm more impressed that his page with 1.22MB of data sent per hit is still loading fine after an old-fashioned Slashdotting!

    *nix.org - Featuring BSD, Linux, OS X, Solaris, & More

    --

    Reply or e-mail; don't vaguely moderate. Ex-O'Reilly/MIT employee, now a full-time Google employee.
  18. But the point is... by KoolDude · · Score: 2, Funny


    ...whether it can win even if the freaking long piece doesn't come at the right time ;)

    --
    getSexySig(); /* returns sexy signature */
    1. Re:But the point is... by Neuroelectronic · · Score: 1

      My tetris game is like zen. Never "expect" or "need" a piece. You should build your tetris to accomidate all pieces, including the long one. never let your long piece row become more then 6 units deep, you can always take lines off the top using an L or a Z, that is if you havn't "walled" it off.

      Plays to Much Tetris

  19. Robotic by Rosonowski · · Score: 3, Interesting

    I've seen a lot of people commenting on how this would be easier if it all stayed digital, but upon seeing the diagram he had, the first thing that came to mind was pattern recognition, perhaps in use for robots.

    This is the kind of thing that people spend a lot of money on, and even if it is kind of crude, visual sensors combined with logic that works is a Good Thing(tm) indeed.

    --
    01101001 01100001 01101101 01101110 01101111 01110100 01100001 01101100 01100001 01110111 01111001 01100101 01110010
    1. Re:Robotic by JohnFluxx · · Score: 1

      Except he paid waaaay too much.

      Why didn't he just buy a keyboard, and wire the left,right,up,down keys to the parallel port?
      Whole thing would have cost, ooh, about $10 including the keyboard.

      Btw, I did this with some remote control cars and a remote control panther ;)

    2. Re:Robotic by yomegaman · · Score: 1

      Wouldn't he still need the video camera to capture the screen? Or are you talking about a "Tommy" simulator? :-)

      --
      ...wearing a skin-tight topless leather jumpsuit, with cutaway buttocks and transparent crotch panel.
  20. POV Tetris by handy_vandal · · Score: 2, Funny

    What I want is a multiplayer Tetris where I view the game from the tile's point of view. "You are looking down a deep chute, falling towards an irregular field of colored squares ...."

    --
    -kgj
    1. Re:POV Tetris by ptrangerv8 · · Score: 4, Funny

      your light has gone out...
      if you move downward any fartheryou will be eaten by a grue
      you were eaten by a grue, please try again.
      (yes, mod me down, but it's still damn funny!)
      ;beer;

    2. Re:POV Tetris by Anonymous Coward · · Score: 1, Funny

      Or how about the classic adventure....

      Suddenly you find yourself deep within the bowels of the hideious Tetris fortress, looking up you see what looks like blocks of stone falling on top of you, to the left you see a switch

      > flick switch

      High up a block of muti-colored rock gyrates itself in a counterclockwise. It still appears you will kill yourself it you do not do something in a hurry.

      > fuck

      Paitence my young friend, this kind of language can not be tolerated in fortress Tetris.

      > fuck you asshole

      In Soviet Russia assholes fuck you

      > turn switch

      The block that was deemed to crush you in one mighty blow, turns sideways and fits into part of the floor saving your life and the lives of the many pixies in your backpack.

      > open backpack

      You open the backpack and find naked pixie girls staring innocently at you, at 19 inches, they look incredibly underage, also from the corner of your eye, you could spot just one more block making its way towards you.

      > take pixie

      You take a sexy pixie in your hand and fondle her button.

      > Undress pixie ... ...
      Player gets squashed by a block of Tetris.

      > Undress pixie

      You are dead, would you like to summon a dety

      > Undress pixie

      You cant do anything but restart this game.

      > Fuck you

      Forking program rm -fr ~

    3. Re:POV Tetris by Anonymous Coward · · Score: 0

      Pretty funny man.. apart from the minor sp it's cool.

    4. Re:POV Tetris by Anonymous Coward · · Score: 0

      Your point of view doesn't move, but all the other requirements are met by 3D Tetris (MacOS)

  21. My Tetris Gnome plans finally come to fruition... by EvilAlien · · Score: 0, Funny
    Stage 1:
    Tetris visual perception and AI decision making

    ...

    Stage 3:
    PROFIT!

    --
    perl -e 'print $i=pack(c5, (41*2), sqrt(7056), (unpack(c,H)-2), oct(115), 10)'
  22. AI? by tarnin · · Score: 2, Insightful

    I dont think so. Just a lot of caculations. Its not like its trying to guess what move a human is going to do next then place a piece. This is nothing more than caculating the best possible placement of an object from a limited set of objects. Card counters do this thing all the time and so do machines. Why this even made any type of news outside of it being mildly unique befuddles me.

    Mod me to troll of you like but this is not AI.

    1. Re:AI? by BillFarber · · Score: 2, Interesting

      >> Just a lot of caculations Thus far, that is all AI. In fact, the vast majority of AI today is simply some variation of a search tree looking for the best choice.

    2. Re:AI? by KoolDude · · Score: 2, Insightful


      Its not like its trying to guess what move a human is going to do next then place a piece.

      Your view suggests that playing two-player games like Chess is the only application of AI. Although this is the most popular application of AI, it also has various applications in problem solving, belief networks, fuzzy control, theorem proving and lots more.

      I dont think so. Just a lot of caculations.

      Actually every application of AI is just a lot of calculations. Even when a human plays, the neural networks inside the brain does just a lot of calculations based on wieghts to make the move.

      --
      getSexySig(); /* returns sexy signature */
    3. Re:AI? by Xzzy · · Score: 3, Informative

      There's two types of AI, practical AI, and a sentient type (or one that pretends to be sentient I guess).

      "Practical" AI is having a piece of machinery that has been programmed to take a limited set of input, perform some action, then repeat to infinity. The robots that manufacture cars do this, and this tetris bot does this.

      "Sentient" AI is probably more what you're talking about. It handles language processing, making inferences, stuff like that.

      It is intelligent in that it can do a task without human interaction, so yes it qualifies as "AI".

    4. Re:AI? by Anonymous Coward · · Score: 0

      You Sir....are a party pooper!

    5. Re:AI? by tarnin · · Score: 1

      So by your idea of AI, most OS's are AI then? They figure out where to thread a process, allocate a certain amout of memory for it and run it so its not infringing on other programs. It does all this without us telling it to.

      The issue here is I think that the term AI has become way to generic. It's being attached to anything that runs on its own doing some kind of function. The heart of what AI is/was/should be, I think, is the ability for it to actually perform some kind of random action or reaction to something random and have it correct.

      IMO, I dont even feel that machines like Deep Thought are AI, just huge programs with massive ammouts of caculations with every move stored ever trying to figure out the best move.

      Yes my view is pretty narrow and I should probably take off the blinders and look to the sides but its my opinion.

    6. Re:AI? by Anonymous Coward · · Score: 0

      The issue here is I think that the term AI has become way to generic.

      So you finally admit you're the issue... ;)

    7. Re:AI? by sholden · · Score: 2, Interesting

      AI is merely working on a problem that has no known solution (in reasonable time). As soon as the problem becomes 'easy' and solved it's no longer AI and becomes a mere algorithm...

      So once natural language processing becomes 'easy' it won't be AI any more, but will be just another algorithm.

      At least that's what my AI lecturer used to claim :)

  23. Next generation of cheats by natslovR · · Score: 3, Interesting
    Once secure computing hits town, this will be the next generation of cheats.

    It may be cute seeing a second computer play Tetris now, but so was the first time someone had a bot improve their aiming in Quake.

    I've read speculation before that equipment like this would probably eventually be used to cheat on systems like Xbox Live - It's a bit too soon for that, but in the years to come this could very well be the way cheating is done.

    1. Re:Next generation of cheats by unicron · · Score: 1

      How much further do you feel cheating can advance? In Counter-Strike, you can get cheats that will auto-aim on someone's head and fire for you. I really don't see what you would want more than that.

      Not to get too far off-topic, but cheating in a game like Counter-Strike is only cool for about an hour or so. For one, everyone on their is so paranoid of cheaters that odds are you will get called on it, and immediately your victory will be written off. On top of that, it get's boring fast. Why even play? Just don't load the game, assume you won, and play something else. Games like this really have no purpose in cheating. The REAL good application for this would be to make a program that auto-controls an MMORPG character. Imagine getting it to the point where the script would run your guy into a field, locate a similar leveled mob, fight and kill it, loot the corpse, and go sit back down. Add some code so it could handle unwated mob adds, PKing, etc. You could have your guy level while at work and use your time for raids and other more fun game things. That's something I'd be damn interested in.

      --
      Finally, math books without any of that base 6 crap in them.
    2. Re:Next generation of cheats by Kryptoff · · Score: 1

      ...someone had a bot improve their aiming in Quake.

      You mean that there are bots for that? Could you give me a link? May I qoute you on that? I always lose at FPSs, but I can now have a reasonable doubt that the others are cheating... :-)

    3. Re:Next generation of cheats by natslovR · · Score: 1
      That's why I said it will be a problem once we have secure computing. Cheats are as good as they need to be. But once we have the promised secure computing platform the cheats, which these days are seperate programs running along side or interfering with the actual game, won't be able to interfere with the game so will be useless.

      Cheats will then have to run on a second computer and interface back with the original computer over the normal controls, like this project does. That way any guarantee of non-interferance that a secure computing platform provides for a game is overridden.

    4. Re:Next generation of cheats by Enrico+Pulatzo · · Score: 0

      I'd like a Neo-mode. One where you can dodge bullets yet at the same time not jerk around too much.

    5. Re:Next generation of cheats by anon*127.0.0.1 · · Score: 1

      Not to assist you in getting too far off topic... but the percieved "cool" factor in cheating at a game like CS is inversely proportional to your skill at said game. If you're a good player, cheating becomes boring quickly. If you suck, cheating is great, it's the only way you can compete, and you can't imagine playing without it.

      Besides, I've found that you'll be accused of cheating whether you're actually doing it or not. Some people just can't accept the fact that others can play the game better then they can.

      --
      I am NOT a man!
      I am a free number!
    6. Re:Next generation of cheats by Xerithane · · Score: 2, Funny

      How much further do you feel cheating can advance? In Counter-Strike, you can get cheats that will auto-aim on someone's head and fire for you. I really don't see what you would want more than that.


      Best Counter Strike scene I've witnessed was somebody going idle to go eat. He tells everyone he is going away but forgets to turn his aimbot off. For a half hour he was completely idle and managed to get about 25 kills.

      --
      Dacels Jewelers can't be trusted.
    7. Re:Next generation of cheats by happylight · · Score: 1

      You sound just like my best friend who just can't understand the concept of cheating on a game. "It's a game!! If you cheat to win then where's the fun?" Well to me half the fun is trying to cheat, reverse engineering the game, figuring out the format of the save file, etc, etc. I'm sure the guy who did the Tetris AI had a lot of fun doing it. The second half though... is just looking down to the fools who still keeping shooting at me. "Idiots, I AM GOD!!!!"

    8. Re:Next generation of cheats by unicron · · Score: 1

      I remember playing dust, and one guy had the deagle running through the bottom tunnel. Someone dropped down from the CT side, the deagle guy spun and at least 150 yards away put a single deagle round in the ct's nogging.

      The server went apeshit with calls of cheating, and it was obvious as day he had, but damn funny none-the-less.

      --
      Finally, math books without any of that base 6 crap in them.
    9. Re:Next generation of cheats by Black_Logic · · Score: 1

      I don't know about that, it seems like even for the hardcore cheaters, a proxy system like this wouldn't be any fun. With aimbots and the like, there is still a modicum of interactivity.

      Even johnny-cheats-a-lot will ask, "why bother?"

      --
      Ansi's and stupid tricks!
  24. Re:amazing (off-topic) by jea6 · · Score: 0, Offtopic

    I'm no expert, but re: your sig, I think Boromir was son of the Denethor II, Steward of Gondor. Faramir was Boromir's brother. Neither Boromir, Faramir, nor Denethor were ever Kings of Gondor. Just an observation.

    --

    sarchasm: The gulf between the author of sarcastic wit and the person who doesn't get it.
  25. They didn't SOLVE it... by ArthurDent · · Score: 4, Informative

    There's a difference between being able to play well and solve the game. If you read the article, the machine was able to complete about 600 rows per game. (Which is pretty damn impressive!)

    I'm not really sure how you'd use Tetris to prove P=NP, but it probably has something to do with making an AI that could play forever and never lose, and further be able to prove that you could never lose, which is probably even harder than making the AI!

    1. Re:They didn't SOLVE it... by jandrese · · Score: 3, Insightful

      Actually, I think Tetris has been proven to be impossible to win (where "win" is defined as being able to play forever). There's a research paper that explains why.

      --

      I read the internet for the articles.
  26. Benefactor of mankind--thank you! by EnlightenmentFan · · Score: 3, Funny
    Now I can set up computer #1 to play an infinite, obsessive game of Tetris on computer #2, leaving me free at last to sit down at computer #3 and get some work done. The $200 for webcam and other hardware is cheap for an invention like this, with the revolutionary potential of the wheel, or fire, or even pizza delivery.

    Thank you! Thank you! Thank you!

    --
    Making trouble today for a better tomorrow...
    1. Re:Benefactor of mankind--thank you! by skillet-thief · · Score: 2, Funny

      No, you forgot that on computer #3 there is /. Computer #4 is reading, modding and replying via webcam #2, you are working on computer #5!

      --

      Congratulations! Now we are the Evil Empire

    2. Re:Benefactor of mankind--thank you! by infront314 · · Score: 1

      In fact, this comment was written by an AI program developed in Perl. (Just kidding, Larry.)

    3. Re:Benefactor of mankind--thank you! by stevey · · Score: 1

      Sheesh - computers one, two, three, and four are all in a beowulf cluster.

      ... kids today!

  27. I have one... by Anonymous Coward · · Score: 0

    I have one of those, it's called my friend DJ!

  28. The begining... by Washizu · · Score: 3, Interesting

    People here have already speculated about the possibilites of an ebay sniping, Doom playing machine. Think about the Man vs AI possibilities. Imagine playing your favorite FPS (Quake, Unreal, Counter Strike, Battlefield 1942) and being hunted by a squad of these machines. Unlike in game bots, they're subject to the same limitations you are (lag, poor visibility on screen, the strength of their hardware). If you have to ditch them, run into a cave or turn out the lights. Given an equal interface the struggle between a thinking man and a thinking machine would be a lot more interesting.

    --
    OddManIn: A Game of guns and game theory.
  29. Artificial Intelligence by AnonymousCowheard · · Score: 3, Interesting

    There is no such thing as modern AI. To be accurate, AI is the ability to learn; not the pre-set ability to react in an environment it was programmed for. For this "Tetris AI System" to be considered "AI", it would need to adapt to more than just Tetris; such as Duke Nukem3D.

    Whoever wrote the artificial intelligence algorithms for 3DRealms' Duke Nukem3D multiplayer-mode "Fake Duke" deserves more recognition than anyone.

    Those of you, like me, that were stranded to play by yourself and had no internetwork-ed access to deathmatch with others, know what I am talking about in Duke Nukem3D. How it worked was the game simulated a multiplayer game and was pre-set to "spawn" fake players. The AI system was in effect actually more "unforgiving" than say Unreal Tournament or Quake3. The "Fake Duke" was intelligent to hunt you down based on line-of-sight and quite naturally if he had to run through a laser beam or a lava pit he'll do it all while keeping his "+" (cross-hairs) painted on the center of your forehead. The AI was limited and I think a more accurate project for AI would be to actually host an AI service that offered network-accessed primitives for supreme entropy to contribute to a work of data; such centralized AI system would allow gamers as well as scientific computing to benefit from a verry good entropy pool of numbers as well as improve the funfactor of gaming.

    Instead of this, we have many skilled people having to roll-their-own; not implying they are effectivly wasint their time/resources, yet let's keep our eyes on the prize on what a real system of "sharing" (distributed) can do for the many simulations upon computers that can benefit by a shared resource (thinking AI and entropy) as well as contribute to a centralized AI generator. I know SETI would benefit from such a noble cause, rather having to role-their-own client (software) and have their client (software) wastfully "leech" idle resources of computers around the world. It comes to that conclusion of efficiency, in a sense. Perhaps distributed computing across the internet is a real plan that would benefit from being re-thought. Don't let me fool you: Microsoft is attempting this feat; maybe someone has already started working on this! Doh! Someone recognize the inherent corruption that can ensue if a corrupt organization was holding licenses for your obligation to use their distributed resources as being a client for an applications service provider!

    Am I the only one to confirm these truths or forever does everyone hold their peace?

    --

    But I'm sure you already Gnu that.
    1. Re:Artificial Intelligence by lirkbald · · Score: 4, Funny

      The AI was limited and I think a more accurate project for AI would be to actually host an AI service that offered network-accessed primitives for supreme entropy to contribute to a work of data; such centralized AI system would allow gamers as well as scientific computing to benefit from a verry good entropy pool of numbers as well as improve the funfactor of gaming.

      Y'know, I read through that several times, and I still don't know what it says. I'm pretty sure the poster didn't either.

    2. Re:Artificial Intelligence by Anonymous Coward · · Score: 0

      Can someone please mod the parent DOWN? I spent a good 10 minutes trying to figure out why the hell it was +4 insightful. First he claims AI isn't AI unless it can adapt to every situation thrown at it, and after that it just stops making any sense whatsoever.

      Another great job by the moderators. I think it was the bit of totally unrelated Microsoft bashing got him the insightful points.

    3. Re:Artificial Intelligence by daeley · · Score: 1

      Y'know, I read through that several times, and I still don't know what it says.

      That's because it was done by a /. posting AI System and all the bugs aren't worked out yet.

      --
      I watched C-beams glitter in the dark near the Tannhauser gate.
  30. Great news! by Anonymous Coward · · Score: 1, Insightful

    Now if you really want to play tetris, but can't be bothered, here's your system!

    Why though??!??!?!?!?!

    Tetris is about using your brain to figure out everything... Is this "Tetris for dummies" ?

  31. Classic Slashdot by vasqzr · · Score: 4, Insightful


    Great post.

    No Microsoft bashing, no debates about IP, distributions, no whining.

    Serious, hard-core, geek shit.

    Geek takes computer, does something incredible, writes up an wonderful web page, perfect.

    1. Re:Classic Slashdot by Blimey85 · · Score: 1
      I was pretty surprised when I saw this post. First truly interesting article in a while.

      I'd like to try this and see if I can get mine to do more than 600 lines. Maybe we could get a competition going to see who can build the best tetri-bot and what things make it work better/worse or are just fun.

      It's a nice change from the computerized chess stuff we keep hearing about. Until I'm able to beat the chess game I have on even the easiest setting, I don't want to hear about bigger and better chess computers. But I'm pretty good at Tetris... so this is cool.

      --
      How is it that one careless match can start a forest fire, but it takes a whole box to start a campfire?
    2. Re:Classic Slashdot by Anonymous Coward · · Score: 0

      The problems of chess and tetris are only loosely related in that both are games. The algorithms employed are entirely different. Writing an optimal tetris AI is actually remarkably "simple." The game branches too fast for serious look-ahead, so it's the position evaluation algorithm that really matters. The methods of evaluating a position are already fairly standard, as well. The author makes a brief mention of automating a testing process to balance the weights involved; I believe a neural network could do this quite efficiently and produce a fairly "optimal" AI.

    3. Re:Classic Slashdot by Anonymous Coward · · Score: 0

      There was no whining, until you showed up.

  32. Nerds! by jfengel · · Score: 1

    Nerds!

    Nerds nerds nerds!!! /me kisses his karma goodbye

  33. Pretty soon... by Mourgos · · Score: 1

    ...people will boast about how many days their AI has been playing without loosing, instead of their box's uptime.

  34. Where are the IN SOVIET RUSSIA posts? by vasqzr · · Score: 3, Funny


    We actually need them in this article!!

    1. Re:Where are the IN SOVIET RUSSIA posts? by Nick+Harkin · · Score: 0, Offtopic

      lol, never fear, they're there a couple of posts above......

      seriously tho, apart from the challenge of coding something like this, and the possiblitly of branching it into different systems, i don't really see any point in this, tetris is meant to be played by humans, theres no entertainment in watching a machine play, is there?

  35. Bunch of insensitive clothes by Anonymous Coward · · Score: 0

    You slashdotters posted ZERO comments when the business partner of the creator of tetris died.

    1. Re:Bunch of insensitive clothes by Anonymous Coward · · Score: 0

      Didn't post any comments when the guy down the road from the creator of tetris died, either.

  36. Take it a step further by Stroman+Rebar · · Score: 5, Funny
    Don't just stop with squads of computers hunting people over the net in FPS games. We can shrink them down put them in indestructible exoskeletons with nuclear batteries to hunt down actual people! Then we can wrap in fake skin and send them back in time to... uh...

    Never mind. It may not be that great of an idea

  37. Geom Cube by yerricde · · Score: 4, Informative

    "You are looking down a deep chute, falling towards an irregular field of colored squares ...."

    Is 3D Block for NES, 3D Tetris for Virtual Boy, or Geom Cube for PS1 close enough to what you want?

    --
    Will I retire or break 10K?
  38. I am not as impressed... by Conspiracy_Of_Doves · · Score: 4, Interesting

    I am not as impressed with the AI's ability to make decisions about what to do in the game as I am with its ability to dicern the shapes and locations of the pieces on the screen! Now THAT is cool.

    1. Re:I am not as impressed... by MarcoAtWork · · Score: 1

      it doesn't have to do that, really: since you start from an empty screen you just need to know what's the next piece that's coming down: in fact, as you can notice in the screenshots, the 'white squares' the system uses to recognize the shapes are in the location where the new piece appears.

      Having a 'generic' solution that could be activated 'mid-game' would surely be much more complicated.

      It'd also be interesting to know if there's anything done (maybe at a lower priority) to check that the situation on the 'slave' machine is the same in terms of pieces down (I'm thinking of, say, a keystroke not registering).

      Also this 'visual' tetris should be, IMHO, handicapped the same way a player is in terms of knowing exactly where a piece will drop: it does happen to everybody sooner or later to press the 'drop' key and immediately go *&%&)!)$@! because the piece was really one column left/right of where you thought it was (obviously whether it's left or right depends from which side would be the worst possible case scenario, Murphy's law applies to tetris as usual).

      --
      -- the cake is a lie
  39. Stuff that matters by Biomechanoid · · Score: 2, Funny

    You've probably always wanted a system that reads a Tetris game via a webcam

    Yes.

  40. Only a couple more steps. by mshiltonj · · Score: 5, Funny

    Very, very impressive.

    If I may humbly suggest a few design improvements as you continue to develop the item:

    1) Remove the electrical connections, and have it physically press the keys of the keyboard with a robotic arm of some sort.

    2) Make it mobile, so it could, for instance, go in search of a tetris game, if it gets bored.

    3) If it sees a tetris game being played, but doesn't have access to the keyboard, it can verbally (with synthesis) tell the player what to do. "left! left! rotate! rotate! drop!"

    4) Trash talking. "I can't believe you dropped that there! What are you -- a carbon-based unit? go back to playing pong, you binary digit."

    4) Global Thermonuclear War.

  41. They Play Tetris... by LordYUK · · Score: 1

    ... In Soviet Russia! =)

    or is it, in Soviet Russia, Tetris plays you?

    no, the KGB playes you in Soviet Russia...

    hmm...

    --
    This is my sig. Its pathetic.
    1. Re:They Play Tetris... by panaceaa · · Score: 1

      IN SOVIET RUSSIA, systems that game via a webcam have probably always wanted YOU to read a Tetris game and to decide the optimum move, then input the commands to make that move! Well, now prayers answer YOU!!

  42. My AI Coursework is Solitare! by Anonymous Coward · · Score: 0

    Prolog solution to find if any give pack of cards is solvable - but I thought that this, too, was NP-Hard... grrr

    I can well imagine a Prof. giving us some of his research to solve ... 1000 monkies writing Shakespeare etc. - He wishes!

  43. Re:Wow! -- DOH! by jgerman · · Score: 1

    Don't know why it didn't occur to me at the time but you could just do screen caps and write your recognition software based on that. Question is can you screen cap and make decisions fast enough.

    --
    I'm the big fish in the big pond bitch.
  44. Right On by handy_vandal · · Score: 1

    Yup, that's what I have in mind!

    --
    -kgj
    1. Re:Right On by Anonymous Coward · · Score: 0

      Block Out rocked my Sega Genesis.

      Block Out

  45. Chess Playing Robot by Anonymous Coward · · Score: 2, Informative
    A few years ago, I worked as an intern at Center for AI and Robotics (Cair), Bangalore, India. There was a fellow intern who was working on a chess playing robot. This was a robotic interface between a regular chess software running on a computer and a good old chess board. so you sit there with the chess board and play against the computer that uses robotic arm and image recognition (through a camera) to make its moves against you. cool, a'int it? this was 4-5 years ago.

    unfortunately, their website sucks badly. May be they need some help building one. That was a really fabulous place to work at, with scores of smart people.

    1. Re:Chess Playing Robot by Jason1729 · · Score: 1

      I had a computer chess board that moved its own pieces in the mid-80's. The board was a consumer unit and not that expensive either.

      It used magnets under the board to drag the pieces. What was cool was watching a knight move where it had to move another piece out of the way and then back.

      Jason
      ProfQuotes

    2. Re:Chess Playing Robot by Anonymous Coward · · Score: 0

      I hear they're working on a planning system for dowry murder, the #2 cause of female deaths in Bangalore.

    3. Re:Chess Playing Robot by Anonymous Coward · · Score: 0

      and the dogs bark away as the elephant strolls down the street...

  46. Re:fr!st post by Anonymous Coward · · Score: 0

    Please tell me more. It was an interesting post.

  47. Read the slashbox!!! by BMazurek · · Score: 1
    Being NP-hard means there are no existing polynomial-time algorithms to find the *optimal* solution.

    If you read the slashbox, it says:

    decides the optimum move

    Therefore, he original poster is precisely correct. Good attempt to discredit, though.

    1. Re:Read the slashbox!!! by Erasmus+Darwin · · Score: 0, Offtopic
      Try reading the end of the post you're responding to. At first, he's only commenting on a computer science fact, that there are no polynomial time optimal solutions for NP-Hard problems. However, he mentions that it's possible to brute force NP-Hard problems for small cases and he also mentions that the Tetris game use is restricted.

      Or, to sum it up, NP-Hard isn't hard (even for an optimal solution) if N is small.

    2. Re:Read the slashbox!!! by Falkkin · · Score: 1
      If you read the article, you'd find out that it doesn't really decide the optimum move, or even anything close to the optimum move.

      In fact, his formula for determining how to place a piece just looks like this:

      f32_Merit = (10.0f)*(float)(i32_RowsEliminated);
      f32_Merit += (-1.0f)*(float)(TempBoard.TotalOccupiedCells());
      f32_Merit += (-7.0f)*(float)(TempBoard.TotalShadowedHoles());
      f32_Merit += (-1.0f)*(float)(TempBoard.PileHeightWeightedCells( ));
      f32_Merit += (-1.5f)*(float)(TempBoard.SumOfWellHeights());

      Do this for all the possible combinations of where-to-place-the-current-piece, and take the one with the highest merit.

      The author admits that

      With this approach, the choice of metrics and relative weights is critical. Even slight weight changes can lead to profound differences in performance. I didn't spend a lot of time developing the metrics and weights for my application -- but I stumbled upon some metrics and weights that perform well. I have considered writing a function to explore the 5-dimensional "weight-space" for my five metrics above, playing hundreds of games for various combinations of weights in a search for the best weight combination for overall average performance.
      Which means, basically, he's not doing any traditional AI techniques (like using neural networks or genetic algorithms) to optimize this formula in any way.

      There's no way this player plays "optimally", in any sense of the word, regardless of what /. editors put in the story to hype it. :)

  48. The really amazing part... by ilsie · · Score: 1
    is that his page is not slashdotted yet, even with a 4 meg .avi download link.

    Seriously though, this makes me want to get back to the good ol' days of making cool projects for EE classes.

  49. Re:amazing (off-topic) by Anonymous Coward · · Score: 0

    The parent might be off-topic, but how can the /. crowd take someone with such a sig seriously?

  50. Only human by Forgotten · · Score: 1

    Ah, the spastic utterings of a former tetris champ, angry at having spent hundreds of youthful hours becoming good at something only to be made redundant.
    Note "two-handed home row" mapping of game controls, once thought to be optimal (oh! the irony). This one was good. For a human.
    Go with our sympathies, brave filler of lines.

    1. Re:Only human by frankthechicken · · Score: 1

      Only the former champ because of this guy

      Some people just have way too much time at work

  51. it's all lies by Anonymous Coward · · Score: 0
    I'm surprised some conspiracy theorist hasn't pointed out that the Mac Classic that inspired this project in the spring of 89 (see the final section of the article) didn't come out until October of 90.



    ok, ok, so he probably just forgot that it was a Plus or an SE...

  52. All in all a great webiste but... by UserGoogol · · Score: 2, Insightful
    A cool website, certainly, and a neat little invention. (Little practical purpose, but its classic Nerd/Geek/Hacking stuff.)

    But one part sounded a bit wrong to me. I may be wrong myself, but...

    They were interested in developing and selling addictive computer games.
    I don't know if thats accurate. I mean, Pajitnov (and the other guy) was in the Soviet Union,[1] after all. I don't know if "selling" computer games would have been so easy. I thought it went that the game was written and then handed around the "Computer Center of the Russian Academy of Sciences." Then it got past the Iron Curtain, and then was distributed as freeware for a while until big companies (Microsoft, Nintendo) realized that they could make big bucks releasing a legal version of the game.

    --
    [1] In SOVIET RUSSIA, Robot controls Tetris! [2]

    [2] Shut up. It was revalent. Now, if I had said the Simpsons quote: "In Soviet Russia, stage for actors only!" It would not have been.

    --
    "Never attribute to malice that which can be adequately explained by stupidity." -- Hanlon's Razor
    1. Re:All in all a great webiste but... by Anonymous Coward · · Score: 0

      The key part is selling addictive games - to Americans.

  53. Recognition is key... to card counting by unfortunateson · · Score: 3, Interesting

    If this robot can respond to Tetris' higher levels at reasonable speed, then the next project ought to be a glasses-mounted camera with bluetooth to an iPod-camoflaged CPU that can count cards at Blackjack.

    A wide-angle lens ought to be able to pick up the whole table. Watching cards being laid down is relatively easy -- surely no harder than seeing pieces fall down the screen. Then just ID the cards, keep a running total, and put a piezo buzzer in the glasses' arms to let you know when to bet big and when to get the heck out of there.

    Maybe a camera in the rear also, to spot pit bosses?

    --
    Design for Use, not Construction!
  54. Will it ever end? by Tablizer · · Score: 1


    First I lose my programming job to some starving dweeb in India.

    Now my "filler" brick-laying job is being replaced by a web-cam.

    Even McD's is having financial troubles and closing stores.

    Well at least that janitorial job at Sadam's Presidential Palace is still open....

  55. How delightfully useless... by Enrico+Pulatzo · · Score: 1

    yet I'm so jealous.

  56. Not impossible... by ArthurDent · · Score: 4, Insightful

    That arguement doesn't *prove* that it's impossible, because that arguement hinges on there being a long series of only S and Z pieces. The only way you could prove that that issue would always cause a loss is if you could prove that an impossible to place series _necessarily must_ occur. Unfortunately, because the piece order is by definition random, you can only say that it is very likely that an impossible to place piece order would occur eventually, not that it must occurr. Therefore, a perfect game of Tetris could be played (based on this problem alone; there may be others), but success is not entirely based on the skill of the player!

    That's a very interesting result to say the least! Well I guess it's interesting if you're a math geek like myself at least......

    Ben

    1. Re:Not impossible... by trybywrench · · Score: 3, Insightful

      Unfortunately, because the piece order is by definition random..

      Given the fact that all digital devices are deterministic finite state atomotons and random behavior is non deterministic, given a set of states the probability of a state transition is equal for all states, isn't it impossible for a digital device to act randomly? I know computers can generate random *enough* numbers but by what measure?

      --
      I came to the datacenter drunk with a fake ID, don't you want to be just like me?
    2. Re:Not impossible... by Anonymous Coward · · Score: 0

      ...but depending on how the 'random' pieces are generated you could prove the game one way or the other. Since all Tetris games at this point are run on finite machines, if you had details of the inner workings of the game you could likely come up with a solution by integrating the random number algorithim into your equation. I mean for all you know the programmer has coded in a counter measure against such an occurance!

      (Yet another case of over-simplified mathmatics being used to over-analyze reality. :)

    3. Re:Not impossible... by egreB · · Score: 1

      I'm sure you're right if it mattered just computer-generated random numbers. But IIRC, Linux, for example, relies on user interactions for random numbers. This includes log-ins and keyboard events. It's difficult to predict what the user might do at what time, so these numbers are truly random. That is, the definition "truly random" isn't clear. If you knew the posistion of every particle in the universe, as well as all physic laws and plotted this into a computer, would you be able to figure out the future by fast-forwarding? (This, of course, beside the fact that it's not logically practical to have a computer that contains references to the rest of the universe - the computer would
      a) be able to contain references to itself
      b) Take at least the same amount of mass that the universe contains to store the informatinon - hence a little logical problem)

      But since we're probably talking about pure computer (mathematical) devices, this don't apply.. (-8

    4. Re:Not impossible... by jandrese · · Score: 1

      Actually the longer a series is, the more likely you are to have a long series of S or Z pieces. In fact once you start looking at "long enough" sequences you are almost guarenteed to have a long string of S or Z pieces, assuming your random number generator is truly random.

      You can never play a non-losing game because the "win" is open-ended. Even if you play for a million years and never loose, you still havn't had the never-loose game. In an infinatly long game, the probabiliy of encountering the S or Z sequence is 1.

      --

      I read the internet for the articles.
    5. Re: Not impossible... by Black+Parrot · · Score: 1


      > The only way you could prove that that issue would always cause a loss is if you could prove that an impossible to place series _necessarily must_ occur. Unfortunately, because the piece order is by definition random, you can only say that it is very likely that an impossible to place piece order would occur eventually, not that it must occurr.

      If the sequence were genuinely random, then over infinite time every possible finite sequence must occur.

      An infinite number of times each, for that matter.

      --
      Sheesh, evil *and* a jerk. -- Jade
    6. Re:Not impossible... by dracken · · Score: 1

      "The only way you could prove that that issue would always cause a loss is if you could prove that an impossible to place series _necessarily must_ occur"

      See that is the difference between conventional thinking and mathematical algorithm analysis. Consider an algorithm A that sorts numbers. Let us assume it can correctly sort all possible permutations of the numbers except one. Mathematically the algorithm is wrong. By extension, if no algorithm in the world can sort a particular permutation correctly, we can claim that an algorithm for sorting does not exist. Similarly here. If there exists a condition where you cant play indefinitely, no algorithm exists to play indefinitely.

    7. Re:Not impossible... by anonymous+loser · · Score: 1
      If you knew the posistion of every particle in the universe, as well as all physic laws and plotted this into a computer, would you be able to figure out the future by fast-forwarding?

      Not according to Heisenberg.

  57. Everything leads to pr0n... by telstar · · Score: 2, Funny

    The same guy is now retrofitting his contraption by pointing his webcam at his wife, and having Leisure Suit Larry's AI instruct him how to seduce her.
    Fortunately, for the gene pool, he's finding that this problem has no solution, but mostly due to personal limitations.

  58. Flexibility of vision by Anonymous Coward · · Score: 0

    This is a really cool (and must've been fun) project! Very impressive!

    One really cool thing would be if the program were capable of looking at the entire screen (not just the middle of the top two rows) and identify the falling object as well as identify the stacked area and shape it needs to conform the falling piece to (instead of relying on it's flawless memory.)

  59. holy icons batman by Anonymous Coward · · Score: 0

    near the end of the page there's a shot of the camera looking at his tetris game. when looking at it the wallpaper caught my eye, so i immediately wondered where i can get my own like that. upon closer inspection, i realized there was no wallpaper at all, but THE ENTIRE DESKTOP WAS COVERED IN ICONS!

    no, not half the screen, not just the borders, not even an obnoxiously gross amount, but the whole screen! what could drive a person so mad? hasn't anyone ever shown this guy what a 'folder' is?

    maybe he flunked too many classes, he never figured out how to write an algorithm to make desktops. holy icons batman, my eye wanders.

  60. What? No duct tape? by blair1q · · Score: 2, Funny

    What's with all the rubber bands on the relay board?

  61. tetrinet by Anonymous Coward · · Score: 0

    All he needs to do now is to hook it up to a tetrinet session.

  62. uh...overengineered. by hfastedge · · Score: 1

    I've been searching for a way to be able to have screen movies in linux. Not just screen shots.

    Such a way would make this engineers team much easier.

    But I think that given the simple nature of this tetris game, that you could have actually relied on the "import" (part of imagemagick) command to accomplish this.

    So...tetris dorks--

    --

    -- -- --

    Help my mini cause: My journal

  63. Computers playing computer games... by xv4n · · Score: 1

    ...don't you see it! then Skynetbecomes self-aware!

  64. I want more ! by bockman · · Score: 1
    I want a scriptable gamer engine, that I can program to reach all the high score I'm unable to reach with my eyes and fingers. In all the games that I care of.

    I don't care about the webcam: it can directly read memory video, or take snapshots of windows and then parse the pixel matrix. But I want good pattern recognition, possibly learning by examples, automatic control over mouse keybord and a way to define/intercept game events.And of course a programming language to glue all toghether.

    --
    Ciao

    ----

    FB

  65. Re:My Tetris Gnome plans finally come to fruition. by nlh · · Score: 2, Funny

    Ah, but you see THIS time, there's an answer!

    Stage 2: Play tetris for money

    I hear they have a very harsh anti-cheating policy there (i.e. they'll freeze all the money in your account and ban you if they even suspect you of cheating) but hey, it's still tetris for money.

    nlh

  66. (*I did not actually observe the infinity case.) by delphi125 · · Score: 1

    I have. That original DOS Tetris used different coloured spaces. I played it on a Hercules monitor. I wrote a TSR to intercept int 10 and replace spaces with characters. I cheated. I put an extra delay in to every one too. P.S. I lied this time too. But hey, -32K isn't too bad!

  67. Tetris AI Madness by leoboiko · · Score: 3, Funny

    When I saw the title, I thought they finally revealed that Tetris has a massively advanced and evil AI designed to frustrate the player. It analyses your gameplay and knows exactly what pieces you want and don't want...

    Even my tinfoil hat can't stop it from reading my mind.

    --
    Prescriptive grammar:linguistics :: alchemy:chemistry. Stop being a nazi and learn some science.
    1. Re:Tetris AI Madness by Anonymous Coward · · Score: 1, Interesting

      There was a rather malevolent tetris variant out there a few years back called Birdris-- instead of randomly selecting a piece, it would analyze your current stack and give you the worst possible piece-- sadly, I haven't been able to find it in years.

      I seem to recall that the record score was 12 lines.

  68. Problem is... by mrjah · · Score: 4, Informative

    The problem isn't so much how to count cards -- it's how to count them without letting your betting patterns get noticed. Presumably you're spending money and time on a card-counting hardware/software system with the intention of using it semi-regularly, so this is an important consideration if you want to win more than a few dollars here and there without getting attention from the eyes above and the eyes on the floor.

    Let's say you're using a well-established counting method like hi-lo, or something like it of your own devising. Given that this is Slashdot, the latter is probably more likely, regardless of whether or not it's actually any better.

    So whatever your system is, you have a hot shoe at this table. Your computer is buzzing your arm or shocking your ass or whatever it does to get your attention, and you want to abruptly drop a set of big bets to cash in on the improved but fleeting odds your computer has identified. You're going to get some unwanted attention if over the course of a few hours you "randomly" drop a big pile of chips in the center of the table a bunch of times. Particularly when you keep jerking up from the table as if you've been shocked in the ass.

    That is, unless your system has some method of wager management that lets you blend in while reacting quickly to good odds. That seems pretty tough.

    Maybe the computer could establish what appears to the casual observer/dealer as an idiotic, repeating pattern of wager quantities, thereby identifying you to all around as a grade-A moron and eliminating alarm when you change your betting quantities abruptly. Many easily recognized patterns would suffice. By changing these patterns in only moderate ways, it could be possible to eke out smaller but still positive expected returns than in elementary, obvious-to-keen-eyes card counting. You'd have to stick around the tables for a long time, though, to take advantage of a razor-thin advantage.

    Oh, wait, that's how I do it. Albeit without computer assistance or the anal probe. So I guess I shouldn't have posted this.

    Anyway, good luck building the glasses!

  69. OT: Record attempt in cluttered desktop by xmda · · Score: 1
    The record attempt in "Cluttered Desktop Competition 2003" was almost more interesting than the project itself:

    record attempt

    :)

  70. Those damn skinny pieces by Hershmire · · Score: 4, Insightful

    If you watch the video linked on the site, you'll notice that the computer has the tendency to leave a long empty row on the side(s), just like pretty much every human player I've encountered. Seems like that temptation transgresses all boundaries. ...

    Damn skinny pieces. Always my downfall.

    --
    if(!toilet_paper) roll.replace(new roll); //Stupid roommates.
  71. It's amazing by dirtsurfer · · Score: 1

    how far someone will go to cheat at tetrinet

  72. You misunderstood...I kindly explain. by AnonymousCowheard · · Score: 1


    I agree that some of my comment was received as being vague. I understand it is vague and would've only been received as being vague had you not actually understood my concept. And so I explain:

    Programmers are all trying to re-invent a form of (pseudo) artificial intelligence that is oultined specifically for their application. The idea I propose(d) is for a distributed artificial intelligence network for all software to interact upon via data links. I agree I may yet not be understandable at this point, so I continue...

    Rather than build an AI specifically for your software, programmers *should* plan on builing their software to interact with a general AI that is not application-specific in its implementation. To understand this, you must have experience with programming and look at "AI" as a network-oriented service. AI, as a service that can be re-enterant to other applications as well as contribute to its own entropy to improve (think of it as learning) its operation.

    Now, you are either a 1) naturally-born sentient individual human being (like me), 2) a gorilla that was taught chinese or sign language and will sooner-or-later ask me for a bannana, or 3) a simulated sentient human being capable of responding to abstracted stimulus through the FORM layout on slashdot's forums.

    What are you and can you be a re-usable software interface (cloned) to interact with other human beings as a distributed application service? Are you planning on being maried to Alice(Bot)? I thought so...

    --

    But I'm sure you already Gnu that.
  73. Anyone tried a programmable game controller? by Falkkin · · Score: 2, Interesting

    I've been pondering creating a programmable video game controller for a while now. Basically, what I want is a computer program running on a PC that can control a video game console as a standard joystick. I'm envisioning a daemon that runs and just sends the appropriate button-pressed command out whenever it receives data packets. This could be used both for AI/Vision-type situations like this, or as a simple programmable pad (you could, for example, write a program that outputs a certain string of button-presses whenever a keyboard key is pressed; useful for fighting games.)

    My roommate already has (basically) a universal arcade stick that he made himself -- has interfaces for connecting to PCs, Sega Dreamcast, Playstation, PS2, Nintendo 64, etc. I figure all I need is a way of controlling the device by basically pressing switches.

    My problem is that I don't know any way of doing this cheaply (the piece of hardware used by the guy in this story is over $100). I was thinking of maybe using the parallel port, which has 8 data lines, but that's not enough lines for newer systems and I'm not sure it would work anyways.

    Does anyone have any ideas on how this might be achieved? It's kinda coincidental that this article popped up today since I just thought about this for the first time in months earlier today. :)

    1. Re:Anyone tried a programmable game controller? by Chris+Canfield · · Score: 2, Interesting
      There are lots of ways that you could make a computer-controlled controller... Not all of them cheap. You could, for example, dedicate a section of the screen to I/O, and use a series of photogates to open / close the bridge across the controller pads. You don't get analog sensitivity, but it works. I was sketching out ideas for ways of recording to standard audio tape, using pitch in and pitch out filters for the line... or a simple big-ass array of tape decks connected together by common buttons. This would allow for playback of controller imputs, which would be a boon to testing.

      However, I'm not so sure that simple playback of keyboard combinations would be good for anything but leveling. The dedicated programmable pads in vogue several years back were quite gimmocky, and was less responsive than was acceptable for fighting games at the time. Since then, fighters have gotten significantly faster, and even more picky about timing issues. It's easier just to imput the gamepad commands yourself.

      This is not to say that programmable controllers don't have their place... a programmable controller took my Castlevania: SOTN character to level 92 in just under a week. Programmable controllers continue to exist, and can had for a reasonable amount of money.

      But the problem with visual recognition on modern 3d games is staggering... MIT has entire departments devoted to similar topics. You might be able to do it if you could convince the game to output stereoscopic images, (there was an article recently on a stereoscopic voxel technology), but a subsection of this sort of problem is what you would write your doctorate on. If you can get your hands on the base textures for the game, and redo the graphics engine to give depth and object clues along color lines, you could do it. But not as it stands, and not to a remote box.

      But a little controller hacking is always fun. Good luck!

      --
      This Sig is a mnemonic device designed to allow you to recognize this author in the future.
    2. Re:Anyone tried a programmable game controller? by Falkkin · · Score: 1

      > There are lots of ways that you could make a computer-controlled
      > controller... Not all of them cheap. You could, for example, dedicate
      > a section of the screen to I/O, and use a series of photogates to open
      > / close the bridge across the controller pads. You don't get analog
      > sensitivity, but it works. I was sketching out ideas for ways of
      > recording to standard audio tape, using pitch in and pitch out filters
      > for the line... or a simple big-ass array of tape decks connected
      > together by common buttons. This would allow for playback of
      > controller imputs, which would be a boon to testing.

      The tape idea is pretty cool. I don't really need or want analog
      sensitivity; in general I hate analog joysticks anyways. All I really
      want is some sort of hardware device that has 12-16 switches that I
      can flip programmatically.

      > However, I'm not so sure that simple playback of keyboard combinations
      > would be good for anything but leveling. The dedicated programmable
      > pads in vogue several years back were quite gimmocky, and was less
      > responsive than was acceptable for fighting games at the time. Since
      > then, fighters have gotten significantly faster, and even more picky
      > about timing issues. It's easier just to imput the gamepad commands
      > yourself.

      I'm not sure about that. My roommate plays street fighter a lot
      (i.e. has been to dozens of tournamenets in the couple years I've
      known him) and does know people who have programmable pads that are at
      least fairly useful.

      > This is not to say that programmable controllers don't have their
      > place... a programmable controller took my Castlevania: SOTN character
      > to level 92 in just under a week. Programmable controllers
      > [thinkgeek.com] continue to exist, and can had for a reasonable amount
      > of money.

      True, but it's not possible to do the bit *i* want to do, i.e. write
      AI players for specific games, with a standard programmable
      controller. It's mostly my roommate who would appreciate the
      fighting-game scripting idea.

      > But the problem with visual recognition on modern 3d games is
      > staggering... MIT has entire departments devoted to similar
      > topics. You might be able to do it if you could convince the game to
      > output stereoscopic images, (there was an article recently on a
      > stereoscopic voxel technology), but a subsection of this sort of
      > problem is what you would write your doctorate on. If you can get your
      > hands on the base textures for the game, and redo the graphics engine
      > to give depth and object clues along color lines, you could do it. But
      > not as it stands, and not to a remote box.

      It's not an area where I'm without expertise. I do work in a
      computer-vision lab, doing computer-vision sorts of things. I'd start
      out slow, with simpler games like Tetris Attack, which is nothing like
      tetris but infinitely superior IMHO; would be especially fun to write
      AI for this game since the AI included in the same is rather good and
      only has one or two real weaknesses at max difficulty.

      Running a game in something like an SNES emulator would also be a
      feasible idea; that way one can flip off all but the sprite layer and
      maybe another layer or two that have items of interest.

  74. Yes, but... by Anonymous Coward · · Score: 0

    ... what would happen if you moved the camera a bit while it is playing. Would that take 'I' out of 'AI'?

  75. Respect! by Fuzzums · · Score: 1

    Respect the nerds!

    I can say that, i think. I connected my tv's on/off to the rs232 of my computer.
    Why? Ths choise was simple. I had no remote on my tv, so this was a practical solition ;-)

    --
    Privacy is terrorism.
  76. Similar project in Japan... by Anonymous Coward · · Score: 0

    I saw a Japanese guy is also trying to do similar things, called VArashi, an automated solver of PuyoPuyo (tetris like puzzle game, which is very popular in Japan) in Ruby language. See http://varashi.jp/. They were doing demos in LinuxExpo right now.

  77. lol by Anonymous Coward · · Score: 0

    Hey that's not bad.

    From what I got outa that, a computer hosts a virtual entity, lets say Jerry Rice for example, and Jerry Rice can interact with its(or his, if that trait applies to software) pre-defined characteristics onto any game that accepts him as the computer/AI-player? And he(the AI::Jerry_Rice I mean) improves (its/him)self? That rocks! Maybe "You don't know jack about football" just might be a better game in the future! And soon Bo Jackson can be {hosted} and everyone knows "Bo don't know chess" and I'll teach that brute howto be a loser on chess! All the while it is a hosted virtual entity that improves itself some how. I want to play Battlefield-1942 alongside or against George Patton or Rommel! Or Doom2 against John Romero!

    ROFLMFAO!

  78. Mod parent up! by Anonymous Coward · · Score: 0

    Mod the grandparent down!

  79. Exactly by cyberlemoor · · Score: 1

    If you consider "win" to be "never lose, no matter how long you go," then you can't assume that you won't at some point run into a certain combination of pieces, because then you are winning only until you hit those pieces, not for as long as you play. No matter how long you go without hitting those pieces, there's always the chance that you will eventually hit them, which means that your strategy is not a guaranteed win. If there is no strategy that's a guaranteed non-loss (for ANY sequence of pieces, not just most of them), then the game can't be "beaten." There is nothing else to prove.

  80. Wait a minute, something doesn't look right! by Flakeloaf · · Score: 3, Interesting

    Check out the very end of the movie. With 29 seconds gone in the AVI file, there is an L-shaped piece ready to go. The AI decides to rotate it once clockwise and drop it on the far right, eliminating three lines.

    The only problem is the red square is in the way. There's no way you can drop that piece into that space and make three lines disappear. Something's fishy.

    What I'm talking about is illustrated here.

    --

    Am I the only one who heard Roxette to sing "I'm gonna get blitzed for some sex"?

    1. Re:Wait a minute, something doesn't look right! by Anonymous Coward · · Score: 0

      There's another column on the far right, completely empty. That's where the piece goes.

    2. Re:Wait a minute, something doesn't look right! by Anonymous Coward · · Score: 0

      Gah. Humbled by an AC =) Mod me down to 0.

  81. Bad RNG = AI can predict next block by mike_stay · · Score: 1

    The random number generator has 32 bits of entropy. You get the number mod 7~=2^3 so after 11 blocks or so (11*3=33), you can uniquely determine the internal state of the RNG. After that, you know every block that will drop; at that point, you no longer need significant video processing, and can devote all the processing to working out where to put the next piece.

  82. Get organized man! by hugesmile · · Score: 1

    Geez, do you think this guy has enough desktop icons? Clearly he spends too much time on his hobbies!

  83. Kio estas "Esperanto"? by jishcat · · Score: 0

    Do, vi estis la homo kun la malodora fisxo! Via skemo ne povas esti sukcesa.

  84. Tetris isn't hard by Anonymous Coward · · Score: 0

    Well... tetris isn't hard to play, it might be hard to solve (i'm not a mathemetician so i can't tell you for sure) but i am a programer. Not a very good one (i'm still in college) but i did write my own little tetris agent.

    I used a very simple algorithim, not really even using any advanced AI techniques, but it plays fairly well. Actually i can't tell you about how good it is, because it plays so well it now takes several hours to play through a single game (even with no graphics). From the best i can estimate, it plays at least 200,000 lines a good majority of the time. I've recorded a game over 600,000 lines, and that wasn't even the max, i had to stop it. That's probably more lines in one game than most tetris players even come close to in a lifetime. If anyone's interested i can put a link to the .exe to try it out.

  85. Infinite Monkeys (OT) by scharwenka · · Score: 1
    You know, your sig just reminded me of some insomnia-induced ponderings I experienced recently.

    The Infinite Monkeys factoid (An infinite number of monkeys typing randomly on typewriters would eventually produce a copy of Hamlet (at least that's how I originally heard it)) is a gross understatement.

    Given that Monkeys would take a fixed amount of time per keystroke (one second, for example), and that Hamlet is N characters long, you would get an *infinite* number of copies of Hamlet at exactly the N second mark, and an infinite number of copies again *each second* thereafter.

    But these monkeys would certainly not be limited to Hamlet... you would also get infinite copies of every edition of every thing that has ever or *could* ever be written down.

    My brain hurts.
    Stupid evil monkeys.

    1. Re:Infinite Monkeys (OT) by egreB · · Score: 1

      Nice observations. I've thought about it meself, but my brain really can't grasp this infinity-thing. These monkies (curse them) would have written all past history and all future history an INIFITE number of times each second. Bah.

      First of all, my .sig is a qoute from the Hitchhikers Guide to the Galaxy by Douglas Adams. The /. sig-limit kind of limits it, so the last words and credits to Adams doesn't show, and I haven't bothered to fix it.

      But inifity set aside, any number of monkeys could, given enough time, write both one and two copies of Hamlet. Even one monkey, with a rate at one keypress per second could do that, if you just give him some time. The hard part is finding out where Hamlet starts, and where Macbeth ends.

      But there would be some troubles in feeding the monkies. You'd have to have an awful lot of bananas.

  86. Last Post! by alpg · · Score: 0

    Keep your Eye on the Ball,
    Your Shoulder to the Wheel,
    Your Nose to the Grindstone,
    Your Feet on the Ground,
    Your Head on your Shoulders.
    Now... try to get something DONE!

    - this post brought to you by the Automated Last Post Generator...