HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Computer program that learns to play classic NES games

suckerpinch9 HN recommenders · recommended in 10 months, 2015-2025
YouTube
2.2M views · 13 years ago · demo · evergreen

Tom7 explains and demos software that learns to play NES games by finding score patterns in memory and then searching for inputs that raise it. It is the video companion to his SIGBOVIK paper.

Loved on HN as a hilarious, brilliant example of hacker-academic work and cited whenever game-playing AI or fuzzing comes up.

Machine learning & deep learningGame history & retro gamingChess, board games & puzzles#learnfun#playfun#tom7#nes#sigbovik#machinelearning

19 comments from Hacker News

@keeperofdakeys2025 · in “We put a coding agent in a while loop”

A bit out of context, but it reminded me of this funny moment. The only winning move is not to play. ▶ this video (Background: Someone training an algorithm to win NES games based on memory state)

JokeView on HN
@Dwedit2025 · in “Optimizing our way through Metroid”

Did anyone else get reminded of the Lexographic Ordering Solver that played NES games? This was featuring in Sigbovik 2013. link Video: ▶ this video

CitesView on HN
@rdlw2025 · in “AI-designed chips are so weird that 'humans cannot understand them'”

Not quite what you're describing, but no one has yet linked the classic Tom7 series where he applies deep learning to classic NES games: ▶ this video

RecommendsView on HN
@MrPoush2024 · in “Reversing Choplifter”

Tom7 implemented some of this with his Learnfun and Playfun ( ▶ this video ) - It looks for lexicographical changes to bytes in memory (i.e., one byte seems to almost always increase, and then when it suddenly decrements, a neighboring byte is incremented) as a way of calculating memory location for increasing values (score, x-position), and similarly detects bytes that generally seem to decrease (lives). It then tries to play the game, choosing inputs that increase the values that should be increasing (move right, gain lives), or tries not to decrease the values that are decreasing (don't die).

CitesView on HN
@chc42024 · in “How Antithesis finds bugs”

A lot of fuzzers use Mario or other simple games as an internal testcase. I'm aware of a hypervisor fuzzer from 2016 that did it, and I'm positive there are others (both before and since). Hell, tom7 has a fuzzer for exploring program states that uses Super Mario Bros as the example from 2013 ( link , plus a youtube video ▶ this video ), and he's definitely not the first either.

CitesView on HN
@dan_quixote2022 · in “MAR1D: First-Person Mario”

tom7 is awesome. He made an awesome and hilarious video years ago about his SIGBOVIK paper/research on AI playing NES: ▶ this video

RecommendsView on HN
@fartcannon2021 · in “Medical chatbot using OpenAI’s GPT-3 told a fake patient to kill themselves”

There was an AI created the absolutely brilliant Tom7 on on his YouTube channel 'SuckerPinch' on April 1, 2013 that paused a game of Tetris instead of losing. In my opinion, Tom doesn't get enough credit for his work. He released his AI a full 8+ months before DeepMind released their Atari playing AI. Watch the whole thing, it's delightful. The AI pauses Tetris right before it loses at around 16mins into the video. ▶ this video I also recommend his other videos. Brilliant guy. Edit: Here's the paper link

Strongly recommendsView on HN
@onli2018 · in “Reverse-emulating the NES”

I'm not sure many people can pull this off. The author here was also great in his presentation about automated NES playing, ▶ this video . You don't see often academics & hacker work that is also combined with the right amount of humor. He even 3Dified the original Zelda!

RecommendsView on HN
@dpflan2018 · in “AI Cheats at Old Atari Games by Finding Unknown Bugs in the Code”

This reminds me of AI research using NES Games. The AI eventually became proficient at completing Mario levels, and along the way it discovered novel strategies for survival, obtaining points, and finishing levels. > Check out this timestamp to watch the machine "cheat": ▶ this video > Researcher's site about the project: link > The Paper: The First Level of Super Mario Bros. is Easy with Lexicographic Orderings and Time Travel...after that it gets a little tricky. : link

CitesView on HN
@learc832018 · in “A C89 compiler that produces executables that are also valid ASCII text files [pdf]”

Thanks for pointing that out. I wouldn't have noticed who that was otherwise. His video on learnfun/playfun is both hilarious and amazing. ▶ this video

Strongly recommendsView on HN
@djsumdog2017 · in “Classic Nintendo Games Are NP-Hard (2012)”

Here is an actual implementation of trying to implement a general AI to play all NES games. It's pretty interesting, but his approach does involve the algorithm having access to the raw NES memory map: ▶ this video

CitesView on HN
@shellbackground2017 · in “Is there a winning strategy in Tetris?”

To reference: ▶ this video It's fun how program learning to play teris pauses the game just before loosing.

CitesView on HN
@Houshalter2017 · in “Why I’m Remaking OpenAI Universe”

Why not use game emulators? With popular NES emulators you can advance the game frame by frame. You can read the raw memory addresses that correspond to the score. You can dump the memory at any time and reload the game to a specific game state. You can even manipulate the games in many fun ways by messing around with the game memory. Or give an AI algorithm access to memory addresses as additional information, instead of relying on pure machine vision, if you want to do that.. Here's an example of a guy who made a general game playing algorithm that brute forces it's way through any NES game: ▶ this video This isn't necessarily interesting from an AI perspective - the playing algorithm is just brute force. But it shows what can be done with the platform, easily reloading to previous states and exploring counterfactual futures (which is exactly the sort of thing RL algorithms do.) He also has a cool algorithm for finding the objective function of an arbitrary game, by watching a human play, and seeing what memory addresses increment. Which is a lot more easy to use than writing OCR code to read the score and game over states from the screen.

CitesView on HN
@onli2017 · in “The glEnd of Zelda(): Automatic 3Dification of NES Games (2016)”

You should look at some other things the author did. They fit in the same area of craziness, and are absolutely great. For example link , Portmantout: A portmanteau of every English word, or the first one, ▶ this video , Computer program that learns to play classic NES games. I also liked the humor in What, if anything, is epsilon?, link .

RecommendsView on HN
@d332016 · in “Deep Reinforcement Learning: Pong from Pixels”

In the context of AI and gaming, I definitely recommend this series of three youtube videos: ▶ this video Some games are played better than human would.

RecommendsView on HN
@tomjakubowski2016 · in “Autonomous Mini Rally Car Teaches Itself to Powerslide”

If you're interested in a "dumber" approach to machines "learning" to play classic video games (including Super Mario Bros), tom7's video [1] and paper [2] on Playfun are both fascinating. [1] ▶ this video [2] link

RecommendsView on HN
@fixermark2016 · in “Automatic 3Dification of Nintendo Games: The GlEnd() of Zelda”

Tom 7's work on machine learning and NES emulation is very impressive. This isn't the first time he's attacked that space; you can see previous experiences he had with an automatic game-playing AI he built called "LearnFun / PlayFun" on that YouTube channel also: ▶ this video link link

RecommendsView on HN
@Karunamon2015 · in “Classic Nintendo Games Are NP-Hard (2012)”

So as someone with only a lay understanding of what NP-Hard means - does anyone remember that neural network that someone trained to play the game[1]? So if you can train a neural network to solve an NP-Hard problem, does that mean by definition (since NP refers to a whole class of problems) that a neural network could eventually be trained to solve any given NPH problem given the time and compute resources to do so? [1]: ▶ this video

CitesView on HN
@recondite2015 · in “SIGBOVIK 2015 Proceedings [pdf]”

Haha, I love it. There was a SIGBOVIK submission a couple years ago that looked at byte patterns within video game RAM (specifically NES) to automate the playing of. Pretty entertaining stuff. ▶ this video

RecommendsView on HN
MarI/O - Machine Learning for Video Games5:58

MarI/O - Machine Learning for Video Games

SethBling
11.5M views • 11 years ago
Reverse emulating the NES to give it SUPER POWERS!22:21

Reverse emulating the NES to give it SUPER POWERS!

suckerpinch
1.1M views • 8 years ago
The Day FPS Games Died8:28

The Day FPS Games Died

Basically Homeless
2M views • 5 years ago
Playing a Neural Network's version of GTA V: GAN Theft Auto17:08

Playing a Neural Network's version of GTA V: GAN Theft Auto

sentdex
766K views • 5 years ago
MENACE: the pile of matchboxes which can learn13:59

MENACE: the pile of matchboxes which can learn

Stand-up Maths
453K views • 8 years ago
30 Weird Chess Algorithms: Elo World42:36

30 Weird Chess Algorithms: Elo World

suckerpinch
965K views • 7 years ago
Training an unbeatable AI in Trackmania20:41

Training an unbeatable AI in Trackmania

Yosh
17.7M views • 3 years ago
Infinite Mario AI - Long Level1:11

Infinite Mario AI - Long Level

Robin Baumgarten
1.3M views • 17 years ago
Deepmind artificial intelligence @ FDOT144:41

Deepmind artificial intelligence @ FDOT14

Elizr
288K views • 12 years ago
Robocalypse Now: Using Deep Learning to Combat Cheating in Counter-Strike: Global Offensive1:05:25

Robocalypse Now: Using Deep Learning to Combat Cheating in Counter-Strike: Global Offensive

GDC Festival of Gaming
35K views • 6 years ago
New NES Tetris Technique: Faster Than Hypertapping!9:34

New NES Tetris Technique: Faster Than Hypertapping!

aGameScout
5.1M views • 5 years ago
First NetHack bot ascension24:44

First NetHack bot ascension

Jan K
20K views • 11 years ago
How we fit an NES game into 40 Kilobytes12:04

How we fit an NES game into 40 Kilobytes

Morphcat Games
3.7M views • 8 years ago
How AlphaZero Completely CRUSHED Stockfish33:48

How AlphaZero Completely CRUSHED Stockfish

GothamChess
4.9M views • 5 years ago
The Unbeatable Game from the 60s: Dr NIM11:39

The Unbeatable Game from the 60s: Dr NIM

Stand-up Maths
7.2M views • 10 years ago
Playing to Lose: AI and "Civilization" (Soren Johnson)1:00:29

Playing to Lose: AI and "Civilization" (Soren Johnson)

Google TechTalks
67K views • 16 years ago
How a Laser-Shot Disk Defeats Hackers & Pirates (Coding Secrets)5:01

How a Laser-Shot Disk Defeats Hackers & Pirates (Coding Secrets)

GameHut
132K views • 8 years ago
I made a NES emulator in 15 minutes15:04

I made a NES emulator in 15 minutes

Bisqwit
389K views • 14 years ago
How We Solved the Worst Minigame in Zelda's History24:32

How We Solved the Worst Minigame in Zelda's History

Linkus7
1.1M views • 6 years ago
I Built a COMPUTER in Magic: The Gathering22:54

I Built a COMPUTER in Magic: The Gathering

Because Science
2M views • 7 years ago