Slashdot Mirror


AI Taught How To Play Ms. Pac-Man

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

30 of 167 comments (clear)

  1. Not Really by ilikepi314 · · Score: 5, Funny

    It just lied that it could play Ms. Pac-Man so it could get more reward food.

    1. Re:Not Really by BinarySkies · · Score: 5, Funny

      The joke is on it, the cake is a lie.

  2. What I have learn from PacMan is by mastermemorex · · Score: 3, Funny

    live fast, eat chips, big ones are the best and avoid the gosh with ugly faces

  3. re Now we KNOW! by jelizondo · · Score: 5, Funny

    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

    --
    Be very, very careful what you put into that head, because you will never, ever get it out. - Cardinal Wolsey
    1. Re:re Now we KNOW! by AndGodSed · · Score: 5, Funny

      That my friend, is a statistical; scientific and verrily a religious impossibility.

    2. Re:re Now we KNOW! by the_banjomatic · · Score: 2, Funny

      Perhaps the greatest achievement of AI would be to understand female behavior Obligatory, but true none the less: "The only way to win is not to play"
    3. Re:re Now we KNOW! by hairyfeet · · Score: 2, Funny

      Not to mention very cruel. You'd have the poor little A.I.'s brain snapping like a twig trying to figure out things like "If you don't know why I'm mad then I'm not going to tell you". It would be the A.I. equivalent to torture!

      --
      ACs don't waste your time replying, your posts are never seen by me.
  4. Bad idea by QuickFox · · Score: 4, Funny

    As if everybody didn't already waste too much time on games, do we have to teach programs to waste time too?

    --
    Terrorists can't threaten a country's freedom and democracy. Only lawmakers and voters can do that.
    1. Re:Bad idea by GroeFaZ · · Score: 5, Insightful

      The good part is, computers are several orders of magnitude more efficient at wasting time than humans.

      --
      The grass is always greener on the other side of the light cone.
    2. Re:Bad idea by exp(pi*sqrt(163)) · · Score: 2, Funny

      What are you talking about? By having machines play our games for us, humans can finally move on and become truly free.

      --
      Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
  5. so... by dashslotter · · Score: 5, Funny

    Who's Al?

    --
    I was flipping bits on an abacus, newb.
    1. Re:so... by Adambomb · · Score: 3, Funny

      Well, he could be Betty's long lost pal.

      --
      Ice Cream has no bones.
  6. "AI"s tend to be overhyped by eyenot · · Score: 4, Interesting

    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.

    --
    "Stratigraphically the origin of agriculture and thermonuclear destruction will appear essentially simultaneous" -- Lee
    1. Re:"AI"s tend to be overhyped by bunratty · · Score: 4, Interesting

      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.

      --
      What a fool believes, he sees, no wise man has the power to reason away.
    2. Re:"AI"s tend to be overhyped by Hado · · Score: 4, Informative

      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.

    3. Re:"AI"s tend to be overhyped by Tyir · · 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 reward. What a RL algorithm will do is give approximations for the future value of being in any state in the environment. What the researches will do is train the agent on the domain for a large number of steps (perhaps millions of games played in simulation) and the agent will learn to play the game well. Note this require *no* domain knowledge, i.e. the programmer doesn't but any heuristics, strategies, or high level tricks to have the agent complete the game, which I believe is what you think is being done here.

      So what the technique used in this paper is doing exactly what you would consider "real" AI. Full disclosure, I am a Master's student who has done a good amount of work in RL, and I have not read the paper, so what I describe above is not going to be exactly right, but is probably the general idea.

    4. Re:"AI"s tend to be overhyped by bunratty · · Score: 2, 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.

      --
      What a fool believes, he sees, no wise man has the power to reason away.
    5. Re:"AI"s tend to be overhyped by bunratty · · Score: 4, Informative

      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.

      --
      What a fool believes, he sees, no wise man has the power to reason away.
  7. Re:Bad idea - NOT by jelizondo · · Score: 5, Funny

    Only by teaching them to waste time AI will be become truly human...

    --
    Be very, very careful what you put into that head, because you will never, ever get it out. - Cardinal Wolsey
  8. Re:Humans in no danger yet by eyenot · · Score: 2, Funny

    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

    --
    "Stratigraphically the origin of agriculture and thermonuclear destruction will appear essentially simultaneous" -- Lee
  9. Re:Not gonna happen by Conspiracy_Of_Doves · · Score: 5, Funny

    The simple fact is that when the female suspects that the male is beginning to understand her behavior, she changes the rules.

  10. gender-neutral pac-person by waveformwafflehouse · · Score: 3, Funny

    So now we're teaching our AI that it's a round, dot hungry trans-gender Miss-Man being chased by ghosts?

  11. Oblig by MobileTatsu-NJG · · Score: 4, Funny

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

    --

    "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

  12. One of these things is not like the other... by roystgnr · · Score: 3, Insightful

    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?

  13. Perfect Game? by Sangui · · Score: 2, Interesting

    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.

    1. Re:Perfect Game? by greg1104 · · Score: 2, 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. 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 have led the world into a utopian technological society by now. The human genome would have been mapped by the mid eighties. World poverty would have been eliminated entirely. The air and the earth would be clean. We'd be living in an age of unprecedented peace. Serbs and Kosovars would be frolicking hand in hand cracking jokes about their ethnic differences. Billy Mitchell would have a girlfriend. Instead, Billy Mitchell played Pac-Man and grew a moustache.

      If you're ever near Weirs Beach, New Hampshire, be sure to visit Funspot--great arcade.

      I'm a pretty good Ms. Pac Man player, and I consider my game a failure if I don't get the maximum of 14600 points on the first board. If the best the AI could do is averaging 8186 points per game, I think we're still pretty far from Skynet taking over.
  14. Other uses by TheSpengo · · Score: 2, Insightful

    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.

    --
    Weaksauce as they say...
  15. Angband is more complex than Pacman by Old+Wolf · · Score: 2, Interesting

    ...and we've had Angband Borg for some time (which is very impressive!)

  16. Re:Can the AI play Tic Tac Toe? by mad_minstrel · · Score: 2, Funny

    But can it play Twister?

    --
    May the source be with you.
  17. Re:The difference between Pac-Man and Ms Pac-Man by blogan · · Score: 2, Informative

    Ms Pac-Man also has a bow.