Slashdot Mirror


Tic-Tac-Toe-Playing LEGO Robot

David Primo writes "TechEBlog has an interesting article on a Tic-Tac-Toe-playing LEGO robot named WOPR — created by Bryan Bonahoom. It uses built-in sensors and a custom program to challenge humans. Video included. From the article: 'The NXT display also enables the inclusion of instructions to the user on resetting the robot. This allowed WOPR to run unattended.'"

61 comments

  1. Old news by Bob+Cat+-+NYMPHS · · Score: 5, Informative

    Charles Babbage designed one of these.

    http://www.adit.co.uk/html/noughts_and_crosses.htm l

    1. Re:Old news by camperdave · · Score: 1

      Maybe so, but he didn't make it out of Lego.

      --
      When our name is on the back of your car, we're behind you all the way!
    2. Re:Old news by AlgorithMan · · Score: 1

      are you f****ing nuts!? do you know who charles babbage was?
      he didn't build it out of lego, because lego wasn't invented for 140 years!
      he built the damn thing using twine, sticks and gears!

      --
      The MAFIAA is a bunch of mindless jerks who will be the first up against the wall when the revolution comes
    3. Re:Old news by AlgorithMan · · Score: 1

      now THAT's one impressive information I didn't know so far. thank you

      --
      The MAFIAA is a bunch of mindless jerks who will be the first up against the wall when the revolution comes
    4. Re:Old news by sven2000 · · Score: 1

      do you have a link or reference to this machine?

    5. Re:Old news by AlgorithMan · · Score: 1

      http://en.wikipedia.org/wiki/Charles_Babbage
      http://www-03.ibm.com/ibm/history/exhibits/attic2/ images/182.jpg
      I'm not sure if this is twine... anyways charles babbage is saied to be the inventor of the computer (lady ada byron was his assistant, she programmed his machine. the programming language "ada" is named after her) I'm not sure if his machine was turing-complete though

      his machine of course didn't play tic-tac-toe on a real board, but the fact that his machine computed the solution is still very impressive, since not even electricity was really invented...

      --
      The MAFIAA is a bunch of mindless jerks who will be the first up against the wall when the revolution comes
    6. Re:Old news by sven2000 · · Score: 1

      I've been doing some reading. It looks like Babbage only had the idea of building a tic tac toe machine to raise money: 'I imagined that the machine might consist of the figures of two children playing against each other, accompanied by a lamb and a cock. That the child who won the game might clap his hands whilst the cock was crowing, after which, that the child who was beaten might cry and wring his hands whilst the lamb began bleating'. [http://www.hrc.wmin.ac.uk/theory-babbagesdancer3. html] Then he never built it, because the victorians lost interest in automata and he thought he would not make money with it. The image in the link is a trial part (small piece) of the analytical engine. The machine was (would have been) much more capable than just being able to play a game of tic tac tac toe. Tic tac toe is easily programmable, even with simple elements like relays or just mechanical switches and lights if you force a player into particular moves. The all purpose analytical engine (not to confuse with the difference engine, which is a machine for tabulating polynomial functions) would be realy impressive. For example the way Babbage used his "anticipatory carriage" which could add all carries at once. This is something electronic circuits can't do. It was never built. His son put something together that looks a bit like the mill, but was never intended to run together with program or memory.

    7. Re:Old news by Anonymous Coward · · Score: 0

      It's called humour. Learn to recognize it. You're life will be a lot richer.

  2. tic-tac-toe is so 1983 by legoburner · · Score: 4, Funny

    Joshua: Greetings, Professor Falken.
    Stephen Falken: Hello, Joshua.
    Joshua: A strange game. The only winning move is not to play. How about a nice game of chess?

    1. Re:tic-tac-toe is so 1983 by svunt · · Score: 2, Informative

      Um, I think the guy realised that when he called the robot WOPR Would you like to play a game?

    2. Re:tic-tac-toe is so 1983 by BGraves · · Score: 2, Funny

      Now that would be impressive. A lego robot that could get bored by Tic-Tac-Toe and learn to play chess.

    3. Re:tic-tac-toe is so 1983 by Rich+Klein · · Score: 1

      What was the backdoor password? Jeremy?

      --
      -Rich
    4. Re:tic-tac-toe is so 1983 by tedgyz · · Score: 1
      What was the backdoor password? Jeremy?

      Joshua
      --
      "No matter where you go, there you are." -- Buckaroo Banzai
    5. Re:tic-tac-toe is so 1983 by Rich+Klein · · Score: 1

      Ah. I should've picked that up from the parent post. Thank you!

      --
      -Rich
    6. Re:tic-tac-toe is so 1983 by tedgyz · · Score: 1

      Yeah, I was gonna point that out, but was feeling nice this morning.

      --
      "No matter where you go, there you are." -- Buckaroo Banzai
    7. Re:tic-tac-toe is so 1983 by tumbleweedsi · · Score: 1

      Joshua

      --
      Be nice, sponsor me: http://jailbreak.ragabonds.org.uk
  3. WOPR? by ndogg · · Score: 4, Funny

    I wonder if I can reprogram it to play a nice game of Global Thermo-Nuclear War.

    --
    // file: mice.h
    #include "frickin_lasers.h"
    1. Re:WOPR? by thedletterman · · Score: 1

      You need the optional 103A modem attachment for that,

      --
      Any fool can criticise, condemn, and complain, and most fools do. - Benjamin Franklin
  4. Could have won by Anonymous Coward · · Score: 0

    What a terrible tic-tac-toe algorithm-- the robot could have forced a win, but chose the wrong move!

    1. Re:Could have won by Anonymous Coward · · Score: 0

      The robot did not make a wrong move. Your analytical capabilities are weak. The robot played and blocked in a textbook manner for tictactoe strategy. You should look up a tictactoe algorithm on the internet before making further cowardly comments ;)

  5. Tic-tac-toe by Zouden · · Score: 3, Funny

    How appropriate that the demonstration video ends in a draw...

    --
    "A week in the lab saves an hour in the library"
    1. Re:Tic-tac-toe by Zebadias · · Score: 1

      It could have won the game though so not such a good player?

    2. Re:Tic-tac-toe by apathy+maybe · · Score: 1

      You do of course know that any good player does not play this game because it all ways ends in a draw against another good player. A bigger board (e.g. 4*4) would be more interesting and harder to program for.

      But there are only a limited number of positions in the 3*3 game, easy to program anything (including small children) to either draw or win.

      --
      I wank in the shower.
  6. The robot missed by Augusto · · Score: 2, Interesting

    Seems like it need to be tweaked so that it "drops" it's own pieces closer to the "board", as you can see at the end that one of the pieces misses it's spot.

    Pretty neat, would have liked to see if the robot can actually win, if he can start (and the human's first move is not the center spot)

    --

    - sigs are for wimps.
    1. Re:The robot missed by Anonymous Coward · · Score: 0

      The robot also could have won the game, but made the wrong move resulting in a tie.

    2. Re:The robot missed by AmberBlackCat · · Score: 1

      I think he should try it with a matrix bigger than 3x3. Maybe set it to still only have to get three in a row but have a lot more space to do it.

    3. Re:The robot missed by Anonymous Coward · · Score: 0

      The robot did not make a wrong move. Your analytical capabilities are weak. The robot played and blocked in a textbook manner for tictactoe strategy. You should look up a tictactoe algorithm on the internet before making further cowardly comments ;)

  7. The only way by Kell+Bengal · · Score: 0, Redundant

    The only way to win is not to play

    --
    Scientists point out problems, engineers fix them
    altslashdot.org: The future of slashdot.
  8. They have computers that can beat people at chess by The+Real+Toad+King · · Score: 1

    But this robot can't win at Tic-Tac-Toe? Guess it's just more proof for how silly the game is. Why not teach it to play checkers or Connect Four? Also, can it run Linux?

  9. In a really SMART robot... by Anonymous Coward · · Score: 0

    True AI would engage your mind on the deeper meaning of Tic-Tac-Toe.

    AI has been solved.

    Technological Singularity is near.

    1. Re:In a really SMART robot... by nebbian · · Score: 2, Insightful

      So in other words, AI was solved on the first of April, 2005?

      And that didn't ring any bells?

  10. Strategy by not-admin · · Score: 2, Insightful

    In a game of Tic-Tac-Toe, the only way to defeat an opponent who knows how to play the game is to hope he misses something or to hide your moves from him. On a 3x3 board, it's easy for a microprocessor to be programmed with all possible countermoves.

    Most tic-tac-toe games end in draws, even human-human ones, for that reason.

    1. Re:Strategy by Anonymous Coward · · Score: 0

      Yeah. That was kind of the point of the whole movie.
      Well, that and "nuclear war is bad" or somesuch.

    2. Re:Strategy by pudro · · Score: 0

      The only way I can guarantee a win is when I go first and my opponent does not go for one of the corners with his first move. This might not be obvious, but I can guarantee I will win after just these two moves (mine and my opponents) when this happens.

      --
      Freedom is assumed. Then they try to take it away. The degree to which you resist is the degree to which you are free.
    3. Re:Strategy by MyLongNickName · · Score: 1

      Brilliant! Can you post a guide on wikihow? I think the rest of use would be interested in hearing your keen insights into this fascinating game.

      --
      See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    4. Re:Strategy by Anonymous Coward · · Score: 0

      You must have a PhD or something.

      I cant believe the strategy is so simple.

      Damn. ive been playing that game sooooo long and never won yet!

      Thanks!

    5. Re:Strategy by Anonymous Coward · · Score: 0

      You are SOOOOOO wrong....You CANNOT GUARANTEE a win if the opponent plays in the center square. In fact, the correct move if your opponent went first and took a corner IS TO TAKE THE CENTER SQUARE.

      Your knowledge of tictactoe strategy is underwhelming and incorrect.

  11. Lego? Pfft. by multipartmixed · · Score: 4, Informative

    A bunch of MIT students created a tic-tac-toe playing computer a LONG time ago, out of *Tinker Toys*.

    I know it was a long time ago, because:
    a) I saw it in the Boston Computer Museum in 1991 and it had been "broken for years"
    b) Nobody plays with Tinkey Toys anymore... And hasn't since about 1975.

    Ah, here's a neat article from Sci Am in 1989 (probably the one I read which caused me to seek it out in 1991): http://www.rci.rutgers.edu/~cfs/472_html/Intro/Tin kertoyComputer/TinkerToy.html

    For the impatient, there is a photo on the last page.

    --

    Do daemons dream of electric sleep()?
    1. Re:Lego? Pfft. by MushMouth · · Score: 1

      That was Danny Hillis, who went on to found "Thinking Machines", which spawned WAIS, the first real internet search engine. Now Hillis' big thing is the Clock of the Long Now

  12. A tic tac toe playing robot? by Anonymous Coward · · Score: 0

    It sounds like someone's telling us a WOPR.

  13. More early 80s tinkering by texaport · · Score: 1
    Samuel Johnson remarked "(It) is like a dog's walking on his hinder legs. It is not done well; but you are surprised to find it done at all."

    I remember a 1980 or 1981 tv news story from the University of Illinois where a robot "solved" Rubik's Cube -- early on in the phenomena -- in just over 15 minutes.

    The press paid attention to the WHO and the WHEN rather than the WHAT and HOW of the story. Color recognition from the camera and the mechanics were the real issue:
    The computer used had actually solved each puzzle in the first ten seconds while onlookers watched the mechanical contraption in suspense for the next quarter hour.

    1. Re:More early 80s tinkering by HellYeahAutomaton · · Score: 1

      Well, show me a dog walking on its hind legs and solving a Rubik's cube in under 15 seconds and I might be slightly more impressed.

  14. That's good but... by guardiangod · · Score: 1

    what happenes when you put two robotic Tic-Tac-Toe-Playing LEGO robots together?

    1. Re:That's good but... by Anonymous Coward · · Score: 0

      tic-tac-toe-playing lego robot babies

    2. Re:That's good but... by AlgorithMan · · Score: 1

      simple - IF the AI isn't complete crap than there will never be a winner... always draw... might remember you to the movie "wargames"... ^^

      --
      The MAFIAA is a bunch of mindless jerks who will be the first up against the wall when the revolution comes
  15. Re:They have computers that can beat people at che by jonwil · · Score: 1

    Once lego releases the full SDK and such (i.e. complete details to write your own firmware and download to the NXT), I wouldnt be surprised if someone ports soemthing that could be called "linux" to it...
    Or failing that, one of the BSD variants (hey, if BSD can run on a toaster, it could probobly run on a NXT brick)

  16. Minimax Algorithm by cciRRus · · Score: 1

    I was taught to code the AI of a tic-tac-toe game using the Minimax Algorithm when I was in school. This is a simple yet good example of creating artificial intelligence, which I believe many programming beginners can adopt and make their very first AI enabled game.

    In this story, the game is played with a real board. That is the hard part.

    --
    w00t
    1. Re:Minimax Algorithm by AlgorithMan · · Score: 1

      and that isn't even new - as someone else pointed out: this has been done with lego mindstorm for connect four... same problem, but needs a more complex AI

      --
      The MAFIAA is a bunch of mindless jerks who will be the first up against the wall when the revolution comes
  17. I see a wave of robots by smchris · · Score: 1

    at 2007 science fairs 4H competitions everywhere.

    This shouldn't be too daunting. I seem to remember BASIC programs for tic-tac-toe in '80s training manuals. Tie in the response to pickup and placement. The various options for input is where the challenge lies.

  18. Lego Robot by bigbananaslug · · Score: 1

    The software behind the Lego NXT is the same software behind much embedded computing design: LabView by National Instruments (http://www.ni.com). At the recent NI Week User Group Meeting in Austin, they announced a new toolkit for Mindstorm NXT that will be released in December, which will allow Labview users to work with the robots directly and do many more powerful things with them. This is a very worthy endeavor, since National Instruments is putting much of the profit back into the Mindstorm Consortium...an educational foundation devoted to growing the numbers of children interested in science, engineering and math. Walt Boyes Editor in Chief Control www.controlglobal.com

  19. tic tac toe vs. connect 4? by Main+Gauche · · Score: 2, Informative

    Haven't folks already programmed LEGO bots to play connect four? Some can even beat kids who play against them.

    OTOH tic tac toe has almost no complexity, so what's the big deal?

  20. Re:They have computers that can beat people at che by sven2000 · · Score: 1

    It is in fact much easier to design a robot that will always win than designing one that will occasionally win. I'm somewhat surprised to see the many people lecture about the simplicity of the game, but not knowing a thing about it.

  21. yeah by Anonymous Coward · · Score: 0

    I've seen a chicken in chinatown do the same!

  22. big deal by AlgorithMan · · Score: 1

    some image recognition, an AI that is VERY simple and the output through drawing... big deal

    a word on the AI: lesson 1 in artificial intelligence courses are minmax algorithms and since tic-tac-toe is a game with a VERY small game-graph (less than 20000 nodes) it is easy to calculate the best move even by brute-force (a 40 MHz CPU does this in about 1 second) so this is a story that is REALLY REALLY REALLY not worth telling

    slownewsday i'd say... let's see the news about IE7 RC1... THERE will be some funny comments =)

    --
    The MAFIAA is a bunch of mindless jerks who will be the first up against the wall when the revolution comes
  23. Re:They have computers that can beat people at che by hdw · · Score: 1
    --
    Executive Pope (small) Kallisti Engineering
  24. Awesome by Jacek+Poplawski · · Score: 1

    This robot is awesome, do you know that it's build just with standard Lego Mindstorms NXT for $250? And comments are really boring.

  25. Ah, but... by andrewdk · · Score: 1

    Can you play tic tac toe with it over the 'net?

    In a similar fasion that you can drive my LEGO Mindstorms NXT robot over the 'net with live camera?

    http://turbogfx.homelinux.org/legocam ;)

  26. Brickfest by JustJon · · Score: 1

    I was at Brickfest and played with this robot in person. It was actually a very cool system he had set up. The game also had 3 levels of play.

  27. When I was a kid... by (C)0N0(R) · · Score: 1

    I got beat at t-t-t by a chicken at a petting zoo (Bushkill Falls, Poconos PA.) Every time. I never played it again.

    --
    The light at the end of the tunnel is a train.