AI

After 50,000 hours, this AI can play Pokémon Red

Comment

Pokémon Red
Image Credits: Peter Whidden on YouTube (opens in a new window)

Almost 10 years ago, the online phenomenon “Twitch Plays Pokémon” convened over a million people to play Pokémon Red at the same time, with each player’s keystrokes registering as commands for the one pixelated avatar. Now, like a Magikarp growing into a Gyarados, the evolution of technology begs a new question: can AI play Pokémon?

For the last few years, Seattle-based software engineer Peter Whidden has been training a reinforcement learning algorithm to navigate the classic first game of the Pokémon series — in that time, the AI has played more than 50,000 hours of the game. Whidden posted a 33-minute YouTube video telling the story of the AI’s development, and after nine days, the video has amassed 2.2 million views.

“What’s been super fun to see is how many people are engaging with it,” Whidden told TechCrunch. He uploaded the code he used to GitHub, along with instructions on how to operate and train the AI. “There’s a ton of people that seem really interested in actually doing this process of creating or designing.” One fan was able to apply his code to Pokémon Crystal, another retro Game Boy installment.

The AI’s reinforcement model is Pavlovian, giving the AI point-based incentives to level up Pokémon, explore new areas, win battles and beat gym leaders. Sometimes, these incentives don’t perfectly align with progression in the game, yet the failures of the AI are weirdly charming, which is probably why Whidden’s video has gone viral.

In one of the AI’s attempts, it simply stops to stare at the water in Pallet Town — the first place you visit in the game — and never moves. It gets stuck in an area with animated water, grass and NPCs who pace back and forth, meaning that every individual frame seems like a novel experience to the AI, even though it’s just sitting motionless without even getting its first Pokémon yet. But this AI isn’t in a rush to “catch ’em all.” It’s just enjoying the beauty of the Kanto region (or maybe it’s taking an ethical stance against forcing these cute little animals to battle each other… who can say).

“So, according to our own objective, just hanging out and admiring the scenery is more rewarding than exploring the rest of the world,” Whidden explains in the video. “This is a paradox that we encounter in real life: curiosity leads us to our most important discoveries, but at the same time, it makes us vulnerable to distractions and gets us into trouble.”

The AI somehow continues to pull on our heartstrings: Later, it experiences something akin to a traumatic event at the Pokémon Center. The AI’s success is measured in part by the total levels of all Pokémon in your party. But when an AI goes to the Pokémon Center and button smashes enough to deposit a Pokémon into storage, the sum of all levels reduces drastically, sending a strong negative signal to the AI. With both Pidgey and an unidentified creature nicknamed “AAAAAAAAAA” in its party, the sum of all levels was 25, but once Pidgey is deposited into the PC, the sum is only 12.

“It doesn’t have emotions like a human does, but a single event with an extreme reward value can still leave a lasting impact on its behavior,” Whidden narrates. “In this case, losing its Pokémon only one time is enough to form a negative association with the whole Pokémon Center, and the AI will avoid it entirely in all future games.”

Image Credits: Peter Whidden on YouTube

Despite the AI’s ability to experience trauma and admire the pretty pixels of Pallet Town, it’s still just a computer. This AI isn’t able to read and interpret dialogue in the game, so in early iterations, the program would get stuck at an early crossroads in the game. When you reach the second town in Pokémon Red, you’re given an item to bring back to the Pokémon Professor in Pallet Town. But the AI was having a hard time backtracking to deliver the parcel, making it impossible to progress further. So, Whidden skipped ahead to make each game begin after delivering the package, and with Squirtle as the AI’s starter Pokémon, since the early game is generally easier with a water Pokémon at your service.

“In the video, the farthest that [the AI] reaches is Mt. Moon, between the first and second gym,” Whidden told TechCrunch. Caves are notoriously frustrating to navigate in early Pokémon games, even if you have an actual human brain. But Whidden recently tweaked some of the rewards in his code and tried a different learning algorithm, and finally, the AI managed to exit the cave and arrive in Cerulean City.

Other researchers have used reinforcement learning to study the use of AI in gaming, like with DeepMind’s AlphaGo, which was the first computer program to defeat a professional Go player. But Whidden’s video has garnered so much attention because he’s so adept at explaining unfamiliar concepts through a familiar medium: Pokémon.

Make your very own AI-generated Pokémon-like creature

More TechCrunch

The U.S. Commerce Department today issued a report in support of “open-weight” generative AI models like Meta’s Llama 3.1, but recommended the government develop “new capabilities” to monitor these models…

U.S. Commerce Department report endorses ‘open’ AI models

Shared micromobility giant Lime is piloting two new vehicles designed to appeal to women and older folks who might appreciate a lower step-through frame, smaller wheels and an upgrade from…

Lime is piloting two new e-bikes to attract more women and older riders 

Apple has published a technical paper detailing the models that it developed to power Apple Intelligence, the range of generative AI features headed to iOS, macOS and iPadOS over the…

Apple says it took a ‘responsible’ approach to training its Apple Intelligence models

A fireside chat on Monday between Nvidia CEO Jensen Huang and Meta CEO Mark Zuckerberg at the SIGGRAPH 2024 conference in Colorado took a few unexpected turns. It started innocently…

Huang and Zuckerberg swapped jackets at SIGGRAPH 2024 and things got weird

Meta’s machine learning model, Segment Anything, has a sequel: It now takes the model to the video domain, showing how fast the field is moving.

Zuckerberg touts Meta’s latest video vision AI with Nvidia CEO Jensen Huang

Featured Article

The fall of EV startup Fisker: A comprehensive timeline

Here is a timeline of the events that led fledgling automaker Fisker to file for bankruptcy.

The fall of EV startup Fisker: A comprehensive timeline

Hello, and welcome back to TechCrunch Space. In case you missed it, Boeing and NASA decided to keep Starliner docked to the International Space Station for the rest of the…

TechCrunch Space: Catching stars

As failed EV startup Fisker winds its way through bankruptcy, a persistent and tricky question has become a flashpoint of the proceedings: does its only secured lender, Heights Capital Management,…

The question haunting Fisker’s bankruptcy

So-called “unlearning” techniques are used to make a generative AI model forget specific and undesirable info it picked up from training data, like sensitive private data or copyrighted material. But…

Making AI models ‘forget’ undesirable data hurts their performance

Uber is now letting riders in India book up to three rides simultaneously.

Uber now lets users in India book three trips at once

U.S. airports are rolling out facial recognition to scan travelers’ faces before boarding their flights. Americans, at least, can opt out. 

How to opt out of facial recognition at airports (if you’re American)

The promise of AI and large language models (LLMs) is the ability to understand increasingly wider amounts of context and make sense of that information easily, so it makes sense…

Bee AI raises $7M for its wearable AI assistant that learns from your conversations

Featured Article

DEI backlash: Stay up-to-date on the latest legal and corporate challenges

It’s clear that this year will be a turning point for DEI.

DEI backlash: Stay up-to-date on the latest legal and corporate challenges

Bike-taxi startup Rapido, which counts Swiggy among its investors, is the latest Indian firm to become a unicorn.

India’s Rapido becomes a unicorn with fresh $120M funding

Government websites aren’t known for cutting-edge tech. GovWell co-founder and CTO Ben Cohen discovered this while trying to help his dad, a contractor, apply for building permits. Cohen worked as…

GovWell is bringing automation and efficiency to local governments

Critics have long argued that wararantless device searches at the U.S. border are unconstitutional and violate the Fourth Amendment.

US border agents must get warrant before cell phone searches, federal court rules

Featured Article

UK’s Zapp EV plans to expand globally with an early start in India

Zapp is launching its urban electric two-wheeler in India in 2025 as it plans to expand globally.

UK’s Zapp EV plans to expand globally with an early start in India

The first time I saw Google’s latest commercial, I wondered, “Is it just me, or is this kind of bad?” By the fourth or fifth time I saw it, I’d…

Dear Google, who wants an AI-written fan letter?

Featured Article

MatPat, the first big YouTuber to successfully exit his company, is lobbying for creators on Capitol Hill

Though MatPat retired from YouTube, he’s still pretty busy. In fact, he’s been spending a lot of time on Capitol Hill.

MatPat, the first big YouTuber to successfully exit his company, is lobbying for creators on Capitol Hill

Featured Article

A tale of two foldables

Samsung is still foldables’ 500-pound gorilla, but the company successes have made the category significantly less lonely in recent years.

A tale of two foldables

The California Department of Motor Vehicles this week granted Nuro approval to test its third-generation R3 autonomous delivery vehicle in four Bay Area cities, giving the AV startup a positive…

Autonomous delivery startup Nuro is gearing up for a comeback

With Ghostery turning 15 years old this month, TechCrunch caught up with CEO Jean-Paul Schmetz to discuss the company’s strategy and the state of ad tracking.

Ghostery’s CEO says regulation won’t save us from ad trackers

Two years ago, workers at an Apple Store in Towson, Maryland, were the first to establish a formally recognized union at an Apple retail store in the United States. Now…

Apple reaches its first contract agreement with a US retail union

OpenAI is testing SearchGPT, a new AI search experience to compete directly with Google. The feature aims to elevate search queries with “timely answers” from across the internet and allows…

OpenAI comes for Google with SearchGPT

Indian cryptocurrency exchange WazirX announced on Saturday a controversial plan to “socialize” the $230 million loss from its recent security breach among all its customers, a move that has sent…

WazirX to ‘socialize’ $230M security breach loss among customers

Featured Article

Stay up-to-date on the amount of venture dollars going to underrepresented founders

Stay up-to-date on the latest funding news for Black and women founders.

Stay up-to-date on the amount of venture dollars going to underrepresented founders

The National Institute of Standards and Technology (NIST), the U.S. Commerce Department agency that develops and tests tech for the U.S. government, companies and the broader public, has re-released a…

NIST releases a tool for testing AI model risk

Featured Article

Max Space reinvents expandable habitats with a 17th-century twist, launching in 2026

Max Space’s expandable habitats promise to be larger, stronger, and more versatile than anything like them ever launched, not to mention cheaper and lighter by far than a solid, machined structure.

Max Space reinvents expandable habitats with a 17th-century twist, launching in 2026

Payments giant Stripe has acquired a four-year-old competitor, Lemon Squeezy, the latter company announced Friday. Terms of the deal were not disclosed. As a merchant of record, Lemon Squeezy calculates…

Stripe acquires payment processing startup Lemon Squeezy

iCloud Private Relay has not been working for some Apple users across major markets, including the U.S., Europe, India and Japan.

Apple reports iCloud Private Relay global outages for some users