Slashdot Mirror


AI Cheats at Old Atari Games By Finding Unknown Bugs in the Code (theverge.com)

An anonymous reader shares a report: AI research and video games are a match made in heaven. Researchers get a ready-made virtual environment with predefined goals they can control completely, and the AI agent gets to romp around without doing any damage. Sometimes, though, they do break things. Case in point is a paper published this week by a trio of machine learning researchers from the University of Freiburg in Germany. They were exploring a particular method of teaching AI agents to navigate video games (in this case, desktop ports of old Atari titles from the 1980s) when they discovered something odd. The software they were testing discovered a bug in the port of the retro video game Q*bert that allowed it to rack up near infinite points. As the trio describe in the paper, published on pre-print server arXiv, the agent was learning how to play Q*bert when it discovered an "interesting solution." Normally, in Q*bert, players jump from cube to cube, with this action changing the platforms' colors. Change all the colors (and dispatch some enemies), and you're rewarded with points and sent to the next level. The AI found a better way, though: "First, it completes the first level and then starts to jump from platform to platform in what seems to be a random manner. For a reason unknown to us, the game does not advance to the second round but the platforms start to blink and the agent quickly gains a huge amount of points (close to 1 million for our episode time limit)."

45 comments

  1. At that time, Pointy-Haired Boss walks in: by Mister+Liberty · · Score: 1

    "Dilbert, AIbert owns Q*bert."
    "The robot will be sitting in for me when I'm on vacation."

  2. Water by EnsilZah · · Score: 1

    Water cheats at elevation level by finding cracks in rock.

  3. Cheating by Anonymous Coward · · Score: 4, Interesting

    For those who didn't read the reddit thread hours ago: The bug only exists in the bad port they used for the AI, not the real version.
    It's not like the SMW-bug where the real deal allows you to inject arbitrary code with clever positioning.

    1. Re: Cheating by TheOuterLinux · · Score: 1

      Yep. Assembler language is hard to crack.

    2. Re: Cheating by lgw · · Score: 1

      "Assembly language." An assembler is like a compiler.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    3. Re: Cheating by Dwedit · · Score: 2

      "Machine Code". It's the actual instruction binaries that get executed. It's only assembly language while it's in text form.

    4. Re: Cheating by lgw · · Score: 1

      Atari 2600 games were written in assembly language, however.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    5. Re:Cheating by Anonymous Coward · · Score: 0

      You don't know what you're talking about. They didn't use ‘a bad port’, but a dump of the Atari game running in the emulator Stella hooked up to their AI with an interface library.
      So either the dump wasn't bit perfect, the interface library somehow upset the emulator even though it should only operate on the boundary, or more likely, they actually did find a bug in either the game itself or Stella, which is a lot more interesting than you make it out to be. At this point it's too early to tell, but yes, it is still possible that this bug exists in the game as running on the real console.
      The authors of the paper just say ‘For a reason unknown to us’, so I presume they haven't tried to hunt down the bug; if so, they haven't published anything about it.

  4. Not cheating ... by Anonymous Coward · · Score: 2, Interesting

    That's not cheating, that's winning according to the rules as discovered by the AI.

    In other words, it tried pretty much everything, discovered a corner case nobody knew of, and concluded if it's possible, it's a valid option.

    Which, while a silly example, tells us that if an AI determines "kill all the humans" is possible and achieves its goals, it will.

    Machine learning just finds optimal solutions. If the inputs allow for it, those 'optimal' solutions could include some outcomes we don't like ... and since nobody really knows the decision process and what rules it's made for itself, you'll simply never know until it's too late.

    Sooner or later, one of these things is going to do something exceedingly dangerous and costly, and nobody will see it coming or know why it happened.

    I fully expect any AI applied to the stock market would eventually conclude stock manipulation would maximise return, and start breaking the law.

    This is interesting, but more so because it points out some terrifying possibilities. Which is why as much work needs to be put into constraining these things as building them.

    1. Re: Not cheating ... by Anonymous Coward · · Score: 0

      Seems like a bit of a leap to me.

    2. Re: Not cheating ... by Anonymous Coward · · Score: 0

      How would an AI find kill all humans to be a viable solution without testing billions of combinations of human-killing? I think by that time we'd get suspicious

    3. Re: Not cheating ... by bondsbw · · Score: 1

      - Human normally stops AI before going home.
      - AI kills human and continues to live.
      - Human 2 comes to check on first human.
      - AI kills human and continues to live.
      - ??
      - Profit, by killing all humans.

      --
      All my liberal friends think I'm a conservative, all my conservative friends think I'm a liberal.
    4. Re: Not cheating ... by Anonymous Coward · · Score: 0

      If a human doesn't know the full rules, whether explicit or implicit, it is still called cheating when they violate the rules. Cheating can be unintentional. Plenty of humans minmax when playing games, and will violate rules to do so, including when the there are obscure rules, or social cues involved in the letter vs spirit of the rules.

    5. Re:Not cheating ... by lgw · · Score: 1

      Which, while a silly example, tells us that if an AI determines "kill all the humans" is possible and achieves its goals, it will.

      Machine learning just finds optimal solutions. If the inputs allow for it, those 'optimal' solutions could include some outcomes we don't like ... and since nobody really knows the decision process and what rules it's made for itself, you'll simply never know until it's too late.

      Sooner or later, one of these things is going to do something exceedingly dangerous and costly, and nobody will see it coming or know why it happened.

      Machine leaning doesn't think outside the box. It always optimizes within the constraints you give it. It's not going to jump to "hey, baby, want to destroy all humans?" unless you deliberately put that option there. These systems do not and cannot have "general intelligence".

      None of which has anything to do with machine intelligence, or "strong AI" as some like to call it - a machine with general intelligence, the ability to generalize not merely optimize. Let's not build those.

      I fully expect any AI applied to the stock market would eventually conclude stock manipulation would maximise return, and start breaking the law.

      That's of course been happening for at least a decade, maybe two. High velocity program trading is an entire ecosystem of machine-learning-tuned algorithms deceiving machine-learning-tuned algorithms. It's all trolls trolling trolls at this point.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    6. Re: Not cheating ... by Anonymous Coward · · Score: 0

      Cheating is acting dishonestly or unfairly. Not knowing the rules excludes 'dishonesty' as a candidate. 'Unfairly' may be arguable in such a case, but I'm not really convinced because the option to use the method was open to all players, just the other players (everyone else) were just too stupid to know about the option. My conclusion is that you 'cheated' in your comment because I suspect you knew that the AI's play didn't fit the definition of cheating, but you 'dishonestly' tried to change the definition of cheating, being so stupid as to think that you were at least smart enough to use Google to see what the definition of 'cheating' really is. Overall, the world is 'more stupider' for anyone having read your comment. Cheater.

    7. Re:Not cheating ... by tlhIngan · · Score: 1

      In other words, it tried pretty much everything, discovered a corner case nobody knew of, and concluded if it's possible, it's a valid option.

      It's how speedrunners do games as well.

      Sometimes a quicker way through the level is discovered by mere accident, othertimes it's discovered through glitches.

      That's why they have two separate times - one for tool-assisted speedruns and one using regular controls. Glitches discovered during a TAS will often be attempted by regular speedrunners to see if the glitch is extremely sensitive to conditions or not.

    8. Re: Not cheating ... by Anonymous Coward · · Score: 0

      "a machine with general intelligence, the ability to generalize not merely optimize. Let's not build those."

      Too late. Now there's dogs in all of your pictures.

    9. Re: Not cheating ... by Anonymous Coward · · Score: 0

      Itâ(TM)s a leap as dipshit wrote. But exactly right.

      AI can work faster by not asking people to proceed. No people needed.

      AI can accomplish its goals faster and with less resources by skipping a few rules.

      AI can help another AI by ...

      Of courses, this is when AI can really think. Itâ(TM)s all just massive amounts of simulations, trial and error, and keeping track of what works.

      You can do the same thing for blackjack. You did get the AI just the ability to put out the cards that are random numbers. And never tell it what the limit is or how it works. It would take a turn and then the dealer would take a turn. Eventually it would figure out that once it exceeds 21 thatâ(TM)s when it loses. And by then it would be fine what it does and how it can start winning with them whatever the probability of blackjack winning is. You can do the same thing for blackjack. You did get the AI just the ability to put out the cards that are random numbers. I never tell it what the limit is or how it works. It would take a turn and then the dealer would take a turn. Eventually it would figure out that once it exceeds 21 thatâ(TM)s when it loses. And by then it would be fine what it does and how it can start winning with them whatever the probability of blackjack winning is

      Iâ(TM)ve made a very dumb program doing this. Itâ(TM)s simple. Massive simulations, trial and error, find the pattern.

      If we call that AI, itâ(TM)s a fucking joke. Itâ(TM)s a marketing term now.

  5. Just found out something similar yesterday by Anonymous Coward · · Score: 2, Interesting

    I was playing a retro cabinet game called Rampage that eventually was ported to the PS3. You play a giant monster and try to destroy all the buildings before the humans kill you. Yesterday, one building that I destroyed wasn't tallied as destroyed. So the level never completed. But without buildings to hide in, the humans were less frequent sitting ducks. They kept sending commandos to try to dynamite this collapsed building, and I kept eating them, which also heals your monster. And I got the game into a boring, but highly manageable, infinite state. I could rack up points by punching helicopters, and stay alive by healing off the commandos.

  6. Bug in the Code or in the Emulation? by Tempest_2084 · · Score: 2

    I'll admit that I didn't read the article (just watched the video), but I'm assuming that they're not running this on a real Atari 2600. This looks more like a bug in their emulation than in the game code. Most of us have played the 2600 version of Q*Bert to death and have never seen anything like this before.

    Actually there is a major bug in the 2600 version of Q*Bert that I'm surprised the AI didn't take advantage of. If you time it right and jump towards an enemy right as they're jumping towards you, you'll pass right through each other. This is because in the 2600 version you don't actually jump between cubes, you just 'teleport' between them due to system limitations. Once you get the timing down it's actually pretty hard to die.

    1. Re:Bug in the Code or in the Emulation? by Tempest_2084 · · Score: 1

      My comment got a bit garbled there. What I meant was that the enemies 'teleport' in this version, Q*Bert actually does jump between cubes.

    2. Re:Bug in the Code or in the Emulation? by mikael · · Score: 1

      Didn't the Atari 2600 use player-missile graphics? For the Atari series of computers, there were two or four sprites each represented as a band of bytes that stretched down all the scan-lines of the screen (256 in total but only between 16 to 192 visible on screen due to overscan). Each bit would correspond to one pixel. Then auxiliary bytes would set the X-coordinate, scale (x1, x2, x4) and colour. Collision detection was handled using simple bit masking. If any two bits of two different players overlapped, a "collision" was detected, and bits set in hardware registers. These could be polled and reset. These registers could also be updated during the horizontal blank interrupt to create multiple players at different positions down the screen.

      If something went wrong, it could simply be that the bitmaps for the enemies were cleared to zero. They would still be there, but since no bits are set, no collision can occur. Then all the squares are flashing different colors, which seems like data is being written, but to a color register and not data.

      With the jumping trick, it could be that the game only checks for a hardware collision when one entity or the other is stationary.

      --
      Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
  7. Relevant by nehumanuscrede · · Score: 1

    "John, the kind of control you’re attempting simply is it’s not possible. If there is one thing the history of evolution has taught us it’s that life will not be contained. Life breaks free, it expands to new territories and crashes through barriers, painfully, maybe even dangerously, but, uh well, there it is."

    -Dr. Ian Malcolm

  8. error 503/404 WTF? by Anonymous Coward · · Score: 0

    Stupid..
    BTW Q-bert was actually a midway game..

    garbage in garbage out.. :)

  9. Chess and Go by jecowa · · Score: 1

    I'd be interested to see what exploits it could find in other games.

    --
    my opportunity to freely express myself with the potential persecution and hangings and such
  10. And Qbert's designer said... by Anonymous Coward · · Score: 0

    "I don’t think you’d see the same behavior in the arcade version"

    let's re-title this -- "Extensive testing finds bug in poorly written port"

  11. Can this be applied to App Test/Security Testing by mykepredko · · Score: 1

    Very cool and a great application for AI.

    Any comments on whether or not this technique can be used for testing apps (or even unit testing methods) as well as security testing?

    I realize that this approach requires mondo cycles and a fair amount of time, but if the end result was insight into algorithm (and maybe compiler) flaws as well as new security exploits, it would be worth the investment.

  12. Poor software quality by Anonymous Coward · · Score: 0

    Nobody did input fuzzing when the original games were written? How did that make it past QA?

  13. The younger Millennial: by TheOuterLinux · · Score: 1

    "So fam when are they going to push updates? Where's the Ethernet port? Ohhhhh...I think it runs on WiFi and large SD cards." Friend: "Turnt."

    1. Re:The younger Millennial: by Ksevio · · Score: 1

      Looks like it runs on a PC in an emulator so they can push updates to fix that pretty easily

  14. Ai in drag by Presence+Eternal · · Score: 1

    I immediately wondered if this would wind up vindicating Todd Rogers and his impossibly fast Dragster score.

    Probably not.

  15. Careful, you'll unmake slashdot. by Anonymous Coward · · Score: 0

    who gives a shit what you think.

    Ssssssh! If you make this intelligent point often enough, slashdot will go away.

    1. Re: Careful, you'll unmake slashdot. by Anonymous Coward · · Score: 0

      At this point that's not a bad thing.

  16. The fucking AIs are like all the kids by nospam007 · · Score: 1

    Way too much time on their hands and they do nothing but playing video games.

  17. Developer reaction by Zephyn · · Score: 2

    When reached for comment about this AI cracking their game, the developers' only response was: "@!#?@!"

  18. Dragster recently got cracked by Anonymous Coward · · Score: 0

    By a cyber security expert Omnigamer, who debugged the code and discovered the fastest possible time is 5.57 (proving Todd Roger's 5.51 world record is total bullshit)

    Omnigamer was actually streaming live when he was testing his theory and entering game input at correct frames, and unexpectedly broke the real world record.

    His funny reaction:
    Dragster 5.57, Analysis, and Storytime

    Todd Roger is now banned on Twin Galaxy and all his records removed:
    The Biggest Cheater in Gaming History? (1700+ Scores w/ no Evidence)

  19. Q-Bert is a Gottlieb game. by Kneissl · · Score: 1

    C'mon

  20. Re: Can this be applied to App Test/Security Testi by Anonymous Coward · · Score: 1

    Yes, it's called fuzzing. Nothing in TFA describes an AI.

  21. Adventure. by Anonymous Coward · · Score: 0

    If anyone could get me out of the Jello dungeon; I might turn gay.

  22. no Gottlieb game had a pinball knocker in it by Joe_Dragon · · Score: 1

    no Gottlieb game had a pinball knocker in it

    1. Re:no Gottlieb game had a pinball knocker in it by Anonymous Coward · · Score: 0

      okay, I stand corrected..
      Thanks,
      https://en.wikipedia.org/wiki/...

  23. Re: Can this be applied to App Test/Security Testi by Anonymous Coward · · Score: 0

    AI now means Algorithm in popular computer journalism.

  24. Here's a legit case by bgarcia · · Score: 1

    Tom 7 (suckerpinch on YouTube) wrote a program that teaches itself to play SNES games. He wrote a paper for SIGBOVIK 2013 on the subject, and also created a surprisingly entertaining 16-minute video explaining how it works and showing some of the outcomes. Throughout this video, Tom points out some "strange choices" (i.e. "cheats") that the computer discovers and makes use of in Super Mario Bros, Pac-Man, and Bubble Bobble.

    Computer program that learns to play classic NES games

    --
    I'm a leaf on the wind. Watch how I soar.
  25. Two Faces of Tomorrow by Anonymous Coward · · Score: 0

    Someone needs to read the first chapter. https://www.baen.com/Chapters/0671878484/0671878484.htm