Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

AI Taught How To Play Ms. Pac-Man

Posted by Zonk on Sat Jan 19, 2008 03:21 PM
from the way-better-than-i-can dept.
trogador writes with the news that researchers are working to teach AIs how to play games as an exercise in reinforced learning. Software constructs have been taught to play games like chess and checkers since the 50s, but the Department of Information Systems at Eotvos University in Hungary is working to adapt that thinking to more modern titles. Besides Ms. Pac-Man, game like Tetris and Baldur's Gate assist these programs in mapping different behaviors onto their artificial test subjects. "Szita and Lorincz chose Ms. Pac-Man for their study because the game enabled them to test a variety of teaching methods. In the original Pac-Man, released in 1979, players must eat dots, avoid being eaten by four ghosts, and score big points by eating flashing ghosts. Therefore, a player's movements depend heavily on the movements of ghosts. However, the ghosts' routes are deterministic, enabling players to find patterns and predict future movements. In Ms. Pac-Man, on the other hand, the ghosts' routes are randomized, so that players can't figure out an optimal action sequence in advance."
+ -
story

Related Stories

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • Not Really (Score:5, Funny)

    by ilikepi314 (1217898) on Saturday January 19 2008, @03:23PM (#22111506)
    It just lied that it could play Ms. Pac-Man so it could get more reward food.
  • by mastermemorex (1119537) on Saturday January 19 2008, @03:25PM (#22111532)
    live fast, eat chips, big ones are the best and avoid the gosh with ugly faces
  • by jelizondo (183861) * <jerry&elizondo-family,net> on Saturday January 19 2008, @03:25PM (#22111534) Homepage

    In Ms. Pac-Man, on the other hand, the ghosts' routes are randomized, so that players can't figure out an optimal action sequence in advance.

    I feel I'm beginning to understand ...

    Perhaps the greatest achievement of AI would be to understand female behavior

  • Bad idea (Score:5, Funny)

    by QuickFox (311231) on Saturday January 19 2008, @03:30PM (#22111572)
    As if everybody didn't already waste too much time on games, do we have to teach programs to waste time too?
  • so... (Score:5, Funny)

    by dashslotter (1093743) on Saturday January 19 2008, @03:31PM (#22111582) Homepage
    Who's Al?
  • by eyenot (102141) <eyenot@hotmail.com> on Saturday January 19 2008, @03:32PM (#22111590) Homepage
    I think most press releases re: AI are misleading. I highly doubt there is anything like "AI" behind the program they have that attempts to solve Ms.Pacman. Consider if you wrote an "AI" that started off with what you as a human starts off with: the ability to see the screen and understand what the various graphics depict or mean; how to control the pac character; what the basic goals and obstacles are; and a desire to rack up points. An "Artificial Intelligence" (AI) would be able to start with that much and build its skill level as it plays. Presumably it would quickly build a talent that can beat average humans, then most humans, then eventually all humans since it has faster reflexes and doesn't get tired (or make errors once it's learned). That, I think, would justify a press release "AI learns to play Ms.Pacman". However, scripting something that plays the game as well as you can imagine it should be played doesn't seem to be news any more than "scripters automate online game play". I only note this because the article mentioned "teaching" the "AI"; that's not very scientific, considering you're trying to see something learn, and should be maintaining scientific control over the learning process.
    • by bunratty (545641) on Saturday January 19 2008, @04:10PM (#22111920)
      AI can be as simple as basic search algorithms such as breadth-first, A*, and minimax. When you play any board game against a machine, that's AI. When you get driving directions from a computer, that's AI. It seems to reason that AI is behind a computer playing Ms. Pacman. And in this case, the computer generate playing policies on its own, so it really is learning, improving its performance based on previous experience.
        • Re: (Score:3, Insightful)

          I think you're referring to general or strong AI, which hasn't been developed yet. All we have now is weak AI, which even when it seems to demonstrate "learning", all it's really doing is running mechanical search algorithms and heuristics really, really fast.
            • by bunratty (545641) on Saturday January 19 2008, @06:01PM (#22112884)
              But that is indeed how the term has been used for decades. What you describe is taught in AI classes and is described in AI books. It's the only kind of AI we have. As such, the term isn't useless. If you want to refer to original thought by a computer, use the term "strong AI," which hasn't been invented yet.

    • AI seems to be nothing more than try random outputs and use feedback to reinforce outputs that resulted in success. It's sort of funny, my first recollection of this was in 1962 when a student in my grade school class performed this exercise for a project. A game was played repeatedly with losing moves recorded, developing a chart. Playing from the chart the game was eventually unbeatable by fellow students. The more things change the more they stay the same.

      I wro
      • If we ever achieve AI it will be with a core of code that can generate modules of code that attempt different strategies, in other words grows a brain as program code and database, not just a matrix recording true - false results from random permutation outputs.

        In that case, the future is already here. You should look into the work of John Koza [wikipedia.org] and others. Their work involves generating code, real computer generated programs, not a matrix of lookup tables. I highly recommend his books, they are eye ope

    • I only note this because the article mentioned "teaching" the "AI"; that's not very scientific, considering you're trying to see something learn, and should be maintaining scientific control over the learning process.

      All machine learning methods can be controlled, that's not the problem. The learning models either have parameters that can be retained or changed at will between runs, or they don't have parameters, which means the conditions are always the same, which saves the same purpose. The outcome ca
    • by Hado (923277) on Saturday January 19 2008, @04:49PM (#22112234)
      I feel I must comment since I am familiar with the AI used in this case: Reinforcement Learning. RL is a method of finding a mapping of states to actions in a setting where rewards can be obtained. The interesting part is that RL algorithms can learn to behave optimally when only very basic information is given. For instance, it should be enough to simply give small rewards for eating the dots and large punishments for being caught by a ghost. There are many theoretical results in the field that also hold in the case of stochastic environments (such as when the ghosts move randomly). In a sense you don't have control over the learning process, at least not in the sense that you control what exactly happens and which actions get tried. However, in the end theoretically still perfect behavior can be learned. This may take quite some time though, but fortunately good behaviors usually emerge much sooner.

      That being said, it is relatively easy to apply these techniques to games such as Ms. Pacman. Much harder problems have already been solved using RL algorithms. What seems missing in the article (though I don't know if this is also the case in the actual research) is comparisons with other RL methods than their own. Though their approach sounds promising and it's nice that they beat some human players, this is not uncommon in games for RL.
    • Re: (Score:2, Informative)

      Actually, what you describe is exactly what Reinforcement Learning (RL) is. RL can be considered a subbranch of AI. In RL, an agent starts by knowing nothing about the environment. It explores the environment by taking available actions, in this domain, the actions would be exactly the actions available to the human players. It also has a reward signal R, which is used to train the agent to do the correct thing. Completing the level will probably give a high reward, encountering a ghost will give a negative
        • this "AI" isn't really learning anything, it's just dealing with missing variables. It can't make any cognitive leaps from the human equivalent of "intuition", it can't re-apply what it's learned (though in this specific case that's probably more due to the restraints of the tiny and simplistic environment), and if I read the article correctly (nor did I read the research paper) it doesn't properly make informed decisions, and all of its actions are entirely predetermined

          That's the only AI we've ever devel

  • Average score of only 8186 (vs. 8064 by humans). Nothing really amazing here; if the AI could soundly trounce the best humans on a regular basis I might be impressed, but I can consistently score above 10000, and I'm not very good. TFA also notes that humans make better decisions on scoring points, while the AI shows some survival ability. Sounds like they need a better Ms. Pacman program.
    • Ah, but the scripts also managed to reach human-level average scores while discovering two things:

      1. you don't necessarily gain anything luring ghosts...
      2. or necessarily gain anything timing power pill consumption
  • by waveformwafflehouse (1221950) on Saturday January 19 2008, @03:51PM (#22111748) Homepage
    So now we're teaching our AI that it's a round, dot hungry trans-gender Miss-Man being chased by ghosts?
  • Oblig (Score:5, Funny)

    by MobileTatsu-NJG (946591) on Saturday January 19 2008, @03:55PM (#22111782)
    The most interesting development came when the machine suddenly stopped killing ghosts and simply displayed the message: "The only way to win is not to play!"
    • nah...

      Much more interesting was the point a few minutes ago, when the researchers watched the AI somehow manage to change the game to Missile Command, at the same time that they noticed outside a massive rocket laun

  • Now we just need one that can play WoW for my friends so they can get their lives back!
  • The new AI game playing routines can handle Ms. Pacman, Tetris, and Baldur's Gate. Can their mathematics routines find sums of integers, roots of quadratics, and proofs of Fermat's Last Theorem?
    • No, current AI does not exhibit general intelligence. That would be strong AI. We haven't developed it yet. The article is about weak AI, "the use of software to study or accomplish specific problem solving or reasoning tasks that do not encompass (or in some cases, are completely outside of) the full range of human cognitive abilities."
  • I've never been a big Ms. Pac Man player, always preferred the original, but when there's an AI that can pull off a perfect game then I'll be impressed, like that guy who got a perfect score on Pac Man without losing a life in the 80's. When the AI can do that it's done something. Not breaking 10,000 points? Meh.
    • Re: (Score:3, Interesting)

      The first perfect (meaning all the possible points were collected) game of Pac-Man wasn't until 1999 and was played by Billy Mitchell. It took him 17 years of playing to get that good. Here's some background [tripod.com]. That page has one of my favorite quotes about the ill effects of video games:

      Imagine a world in which Billy Mitchell never encountered Pac-Man. Put to good use his sharp mind, excellent hand-eye coordination, incredibly long attention span and his prodigious talent for problem-solving probably would

    • First of all, AI is in a rather basic stage compared to what we tend to expect from it. AI isn't going to be doing anything impressive any time soon, but that doesn't make progress less significant.

      Second of all, getting a perfect score on Pac-Man without losing a life isn't that impressive to me, considering that by learning a handful of patterns you can play a perfect game (as long as you don't fuck up and mis-time a turn or something).

  • This is cool, being able to choose smart moves against a random opponent could have a lot of uses in enemy AI in other games too. The unpredictability of a human opponent has always been an issue when creating realistic AI. It always kind of bugged me that even in new advanced games like Crysis, enemies will sometimes move in the most stupid ways possible. The next generation of FPS AI could use something similar to this.
  • Honest to Jebus, I was writing Netrek bots in 1994 that used a genetic algorithm to self-guide their development, and you don't get more "random" than human opponents. When all those Quake bots hit the scene a couple of years later, it was already old hat as far as I was concerned, and now some Korean MMOs are almost entirely populated by robots. Are people really still getting grants for this?
    • some Korean MMOs are almost entirely populated by robots

      Keep in mind that MMO "robots" (more typically called "bots"), are mostly automated scripts that utilize very specialized record-and-playback functionality combined with techniques for screen-analysis, such as recognizing the name of a piece of text used as a navigation marker. These bots exploit the predictive and repetitive nature of MMOs, such as the fact that a particular creature will always spawn in the same location, that a vendor will be in the same place all the time, that the same sequence of ac

  • by Old Wolf (56093) on Saturday January 19 2008, @04:34PM (#22112100) Homepage
    ...and we've had Angband Borg [phial.com] for some time (which is very impressive!)
  • Tetris, Ms. Pac-Man, and Baldur's Gate... One of these things just doesn't belong!
  • There is an xscreensaver hack [jwz.org] that is a pacman game with various level styles. I suspect that the monsters in that are a bit more random in their movement. However, the monsters move slower than pacman, and the pacman currently seems rather stupid, running towards monsters, and just collecting air when there's still plenty of pills to pick up. It would be nice to work on the AI in that, then I'd get a more interesting screensaver to watch.