|

Technoloty News : This AI can play Pokémon Red After 50k hours

Nearly ten years ago, “Twitch plays Pokemon” brought together over a hundred thousand people to play Pokemon Red simultaneously, with each player’s keyboard commands registering as commands for one pixelated character. The evolution of technology has led to a new question, much like a Magikarp becoming a Gyarados.

Seattle-based software developer Peter Whidden, has been training an reinforcement learning algorithm for the past few years to navigate the classic first Pokemon game. In that time, the AI played the game more than 50,000 times. Whidden created a 33-minute YouTube video that told the story of how the AI was developed. After nine days, it had accumulated 2.2 million views.

Whidden told TechCrunch that it was “super fun” to see how many people were engaging with the AI. He uploaded his code to GitHub along with instructions for how to train and operate the AI. “There are a lot of people who seem to be interested in actually creating or designing.” One of the fans was able to apply their code to Pokemon Crystal, a retro Game Boy game.

The AI’s reinforcement is Pavlovian. It gives the AI points-based incentives for leveling up Pokemon, exploring new areas, winning battles, and beating gym leaders. These incentives are not always in line with the progression of the game. However, the AI’s failures are often charming. This is probably why Whidden’s video went viral.

In one of its attempts, the AI simply stares at the water and never moves in Pallet Town, the first place that you visit in the video game. It gets stuck in a place with animated grass, water and NPCs that pace back and forward, so every frame feels like a new experience to the AI. This is despite it not having caught its first Pokemon. This AI isn’t in any hurry to “catch them all”; it’s just taking a break to enjoy the beauty of Kanto (or maybe, it’s taking a stand against forcing these cute little creatures to fight each other… who knows).

Whidden explains this in the video. “According to our own objective it is more rewarding to just hang out and admire the scenery than explore the rest of the globe,” Whidden says. “This is the paradox we face in real life. Curiosity leads us to our greatest discoveries, but it also makes us vulnerable to distractions, and can get us into trouble.”

The AI continues to tug at our heartstrings. Later, it experiences a similar event to a traumatic one at the Pokemon Center. The AI’s performance is measured by the total level of all Pokemon in your team. When an AI deposits a Pokemon in storage at the Pokemon Center, the total level of all Pokemon drops dramatically, sending a negative signal to the AI. The sum of all levels for a party with Pidgey, and an unidentified creature called “AAAAAAAA”, was 25. But once Pidgey has been deposited in the PC, it is only 12.

Whidden explains that “it doesn’t have feelings like a person, but an event with a high reward value can still have a lasting effect on its behavior.” In this case, losing a Pokemon just once is enough to create a negative association and the AI will avoid the Pokemon Center in all future games.

Image Credits: Peter Whidden on YouTube

It’s still a computer, even though it can feel trauma and appreciate the pretty pixels in Pallet Town. This AI can’t read and understand dialogue in the games, so it would get stuck in early versions. You’re given a special item to take back to Pallet Town when you reach the second village in Pokemon Red. The AI had a difficult time retracing its steps to deliver the parcel. This made it impossible to continue. Whidden decided to skip ahead and start each game after the package was delivered, with Squirtle being the AI’s starting Pokemon, as early games are generally easier when you have a water Pokemon.

“In the video the AI reaches Mt. Whidden told TechCrunch that Moon is between the first gym and the second gym. Caves in early Pokemon games are notoriously difficult to navigate, even with a human brain. Whidden tweaked his code recently and tried a new learning algorithm. Finally, the AI was able to exit the cave.

Other researchers have used reinforcement-learning to study the use AI in gaming. For example, DeepMind’s AlphaGo was the first computer to defeat a professional Go gamer. Whidden’s video is so popular because Whidden is so good at explaining unfamiliar concepts using a familiar medium, Pokemon.

Create your own AI-generated Pokemon creature

Similar Posts