Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Games Entertainment

Tetris AI System 208

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.
This discussion has been archived. No new comments can be posted.

Tetris AI System

Comments Filter:
  • But can it play DooM?
    • 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? :)
  • Oh but... (Score:5, Interesting)

    by RPoet ( 20693 ) on Tuesday January 28, 2003 @02:05PM (#5176111) Journal
    I thought Tetris was NP-hard [slashdot.org] ;)
    • Re:Oh but... (Score:2, Interesting)

      by Atrahasis ( 556602 )
      Just because there is no ideal solution does not mean there is no way an AI-agent can do it.
    • Re:Oh but... (Score:5, Insightful)

      by KoolDude ( 614134 ) on Tuesday January 28, 2003 @02:15PM (#5176194)

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

    • by Some Var ( 644138 )
      Is anyone else reading "NP-Hard" as "No problem hard"?
      Confuses me everytime, maybe i've been abusing irc too much.. ;)
    • by ArthurDent ( 11309 ) <meaninglessvanity @ g m a i l.com> on Tuesday January 28, 2003 @02:28PM (#5176286) Homepage Journal
      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!
      • by jandrese ( 485 ) <kensama@vt.edu> on Tuesday January 28, 2003 @03:09PM (#5176547) Homepage Journal
        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 [umn.edu] that explains why.
        • Not impossible... (Score:5, Insightful)

          by ArthurDent ( 11309 ) <meaninglessvanity @ g m a i l.com> on Tuesday January 28, 2003 @03:39PM (#5176723) Homepage Journal
          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
          • by trybywrench ( 584843 ) on Tuesday January 28, 2003 @04:21PM (#5176994)
            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'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
              • 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 [aip.org].

          • 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.
          • "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.
  • by gokubi ( 413425 ) on Tuesday January 28, 2003 @02:09PM (#5176135) Homepage
    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.
  • Wow! (Score:5, Funny)

    by The_Rippa ( 181699 ) on Tuesday January 28, 2003 @02:09PM (#5176139)
    Now THAT's some serious nerding...too bad a feat like this does nothing to impress the ladies
    • Re:Wow! (Score:4, Funny)

      by Bonker ( 243350 ) on Tuesday January 28, 2003 @02:12PM (#5176157)
      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.
      • 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?
        • 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.
    • by 6 ( 22657 )
      I'm female and I'm impressed :)
      • cool, wanna go out sometime?
      • Has your site been slashdotted by guys looking for pics yet? :)
      • 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? (-;
    • Re:Wow! (Score:5, Funny)

      by Kenja ( 541830 ) on Tuesday January 28, 2003 @02:26PM (#5176273)
      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 [obsoleteco...museum.org] in my bedroom. Girls always left somewhat disappointed.
  • by ShawnDoc ( 572959 ) on Tuesday January 28, 2003 @02:10PM (#5176145) Homepage
    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.
  • 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?
  • by Anonymous Coward on Tuesday January 28, 2003 @02:12PM (#5176164)
    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.

  • by Indras ( 515472 ) on Tuesday January 28, 2003 @02:12PM (#5176169)
    Someone get this guy a Desktop Cleanup Wizard! [colinfahey.com]. And I thought I had too many icons on my desktop...
  • by m4g02 ( 541882 )
    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.
  • amazing (Score:3, Interesting)

    by Boromir son of Faram ( 645464 ) on Tuesday January 28, 2003 @02:14PM (#5176177) Homepage
    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.
    • Re:amazing (Score:4, Interesting)

      by BitHive ( 578094 ) on Tuesday January 28, 2003 @02:33PM (#5176314) Homepage
      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".
  • by indigogorge.net ( 535856 ) on Tuesday January 28, 2003 @02:14PM (#5176183)
    "Holy Crap!!! You mean I don't ever have to think again! Sweeeet!!"
  • by klang ( 27062 ) on Tuesday January 28, 2003 @02:17PM (#5176206)
  • by burgburgburg ( 574866 ) <splisken06@nospAm.email.com> on Tuesday January 28, 2003 @02:19PM (#5176212)
    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.

  • man... (Score:1, Insightful)

    by Diclophis ( 203740 )
    that site is a true hack, with a complete analysis of tetris and its clone... good job
  • ... 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 [starnix.org] - Featuring BSD, Linux, OS X, Solaris, & More

  • ...whether it can win even if the freaking long piece doesn't come at the right time ;)
    • 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
  • Robotic (Score:4, Interesting)

    by Rosonowski ( 250492 ) <rosonowskiNO@SPAMgmail.com> on Tuesday January 28, 2003 @02:23PM (#5176252)
    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.
    • 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 ;)
  • POV Tetris (Score:3, Funny)

    by handy_vandal ( 606174 ) on Tuesday January 28, 2003 @02:23PM (#5176255) Homepage Journal
    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 ...."
  • AI? (Score:2, Insightful)

    by tarnin ( 639523 )
    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.
    • Re:AI? (Score:2, Interesting)

      by BillFarber ( 641417 )
      >> 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.
    • Re:AI? (Score:2, Insightful)

      by KoolDude ( 614134 )

      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.
    • Re:AI? (Score:4, Informative)

      by Xzzy ( 111297 ) <sether@@@tru7h...org> on Tuesday January 28, 2003 @02:57PM (#5176482) Homepage
      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".
  • by natslovR ( 530503 ) on Tuesday January 28, 2003 @02:27PM (#5176279)
    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.

    • 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.
      • 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.
        • 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.
  • by EnlightenmentFan ( 617608 ) on Tuesday January 28, 2003 @02:29PM (#5176294) Homepage Journal
    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!

  • The begining... (Score:4, Interesting)

    by Washizu ( 220337 ) <{bengarvey} {at} {comcast.net}> on Tuesday January 28, 2003 @02:30PM (#5176299) Homepage
    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.

    • by Stroman Rebar ( 567206 ) on Tuesday January 28, 2003 @02:47PM (#5176416) Homepage
      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

  • by AnonymousCowheard ( 239159 ) on Tuesday January 28, 2003 @02:35PM (#5176343) Homepage
    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?
    • by lirkbald ( 119477 ) on Tuesday January 28, 2003 @05:14PM (#5177287)
      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.
  • Classic Slashdot (Score:4, Insightful)

    by vasqzr ( 619165 ) <vasqzr@nosPAM.netscape.net> on Tuesday January 28, 2003 @02:36PM (#5176352)

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

  • by vasqzr ( 619165 ) <vasqzr@nosPAM.netscape.net> on Tuesday January 28, 2003 @02:40PM (#5176380)

    We actually need them in this article!!

  • by Conspiracy_Of_Doves ( 236787 ) on Tuesday January 28, 2003 @02:49PM (#5176425)
    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.
    • 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).
  • You've probably always wanted a system that reads a Tetris game via a webcam

    Yes.
  • by mshiltonj ( 220311 ) <mshiltonj&gmail,com> on Tuesday January 28, 2003 @02:53PM (#5176447) Homepage Journal
    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.
  • ... In Soviet Russia! =)

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

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

    hmm...
    • 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!!
  • Chess Playing Robot (Score:2, Informative)

    by Anonymous Coward
    A few years ago, I worked as an intern at Center for AI and Robotics (Cair) [cair.res.in], 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.

    • 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 [profquotes.com]
  • 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.

  • by unfortunateson ( 527551 ) on Tuesday January 28, 2003 @03:28PM (#5176660) Journal
    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?
    • Problem is... (Score:4, Informative)

      by mrjah ( 574093 ) on Tuesday January 28, 2003 @05:29PM (#5177416)
      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!
  • by telstar ( 236404 ) on Tuesday January 28, 2003 @03:43PM (#5176751)
    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.
  • by blair1q ( 305137 ) on Tuesday January 28, 2003 @04:24PM (#5177006) Journal
    What's with all the rubber bands on the relay board?
  • 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--
  • 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.

  • 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!
  • by leoboiko ( 462141 ) <leoboiko@NOSpaM.gmail.com> on Tuesday January 28, 2003 @05:25PM (#5177383) Homepage
    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.
  • 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. :)
    • 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 [thinkgeek.com] 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!

  • 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 ;-)

  • by Flakeloaf ( 321975 ) on Tuesday January 28, 2003 @10:26PM (#5179186) Homepage
    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 [photoisland.com].

  • Geez, do you think this guy has enough desktop icons [colinfahey.com]? Clearly he spends too much time on his hobbies!

If it wasn't for Newton, we wouldn't have to eat bruised apples.

Working...