Gadgetory


All Cool Mind-blowing Gadgets You Love in One Place

How AI will completely change video games

2019-03-06
Whether you know it or not, you use artificial intelligence all the time. Maybe you own a smart speaker or you've seen a self-driving car or you've used Google Photos to search for images of your cat. Now, there's also a good chance you've played a video game that happens to have some AI in it, like God of War or Red Dead Redemption 2. What may surprise you is that those two types of AI are not the same thing. The AI in digital systems and autonomous vehicles is self-learning and really fast, but it’s also really unpredictable. Yet these two worlds are fast colliding, and once game developers have the right tools and the freedom to make games that really push the limits of AI, the results are going to be the stuff of science fiction. (electronic music) Over the years, AI has become really good at playing certain games. Try beating your computer at chess on the hardest difficulty. It's pretty much impossible. Or even if you're a pro StarCraft player, DeepMind software can now crush you. I'm here, in the shadows. But the AI inside of a video game, that's basically been building off the same core set of principles for decades. Take, for instance, a classic game like Pac-Man. At different points, the ghosts evaluate where you are in the map and where you might be going, and then they either chase you, or they run away from you. It's not exactly groundbreaking AI, but it is video game AI nonetheless. And what's remarkable is that the AI you encounter in games today hasn't really changed that much over the years. Two of the core components of commercial game AI are pathfinding and finite state machines. Julian Togelius is a professor of computer science at NYU who spent years studying the intersection of gaming and artificial intelligence. He walked us through the basic toolkit that underpins a ton of video game AI. Pathfinding is how to get from point A to point B in a simple way, and it’s used in all games all the time. Finite state machine is a construct where an NPC can be in different states and move between them. Real AI in commercial games is more complex than that, but those are some of the founding principles. So using these basics, developers have created ever-more realistic game worlds and characters, but that software is not exactly intelligent. That's because game developers have yet to really utilize key advancements in the field of artificial intelligence research, namely deep learning. Through the deep learning revolution, researchers at universities and tech companies have made astounding progress at giving a machine the means to improve itself over time. But there's a reason game developers aren't using that type of AI to develop games. Typically, when you design a game, you want to know what the player will experience. And for that, if you go in to evolve any AI there, you want the AI to be predictable. Now, if you just went and tossed in a neural network that was constantly adapting and learning from all the feedback it got from you, there's a very good chance something unexpected might happen, and it could break the game. And that's a problem for a designer. Imagine if every single character in Red Dead Redemption remembered all of your crimes, and you couldn't even play anymore because everyone just took you down on sight. I'll put your brains all over you. The way designers think today when they're designing games, they want predictability. And therefore, they want the relatively anemic AI we have in games today. What's more useful for game makers is taking those traditional approaches, and trying them at unprecedented scales. If you play Red Dead Redemption 2, you've probably seen this clip. A player firing a warning shot, which shoots a bird right out of the sky. What makes it so interesting is that it isn't a planned part of the game. It’s completely random. What? The individual systems here, the way that bullets move through the sky, and where birds are programmed to fly around, those are not wildly different than the pathfinding Pac-Man ghosts. The difference in a game like Red Dead Redemption is that all of its many, many systems can overlap and run into one another. The individual pieces aren't intelligent, but when they come together, they trick you into thinking they are. Haven't you brought enough misery upon us? Another game that's great at this is The Legend of Zelda: Breath of the Wild. It's a cohesive world where a few simple programming rules around weather, gravity, and even heat create endlessly surprising moments. You can use a makeshift torch to bake an apple while it's still on a tree, or drop a bunch of these weird balloon things on a boat, and it'll soar into the sky. Now, is this really AI? Well, that kind of depends on who you ask. Some argue it's just automation or emergent gameplay because these systems aren't intelligent, per se. While others say game AI is less about trying to pass off a machine as a human, and more about creating a sense of wonder and mystery that makes the game feel real. So what would honest to goodness AI-powered video games actually look like? Well, in the Spike Jonze movie Her, creator David O'Reilly conceived of a video game in which a foul-mouthed character could react dynamically to you and your personality. It could even taunt and bully you into continuing to play. Come on, follow me. (beep) Games like this may seem far off, but we're getting there. That's because cutting-edge AI research is finally bleeding over into game development. Today, researchers are using the kind of AI that can actually learn to design entire games, using a technique known as procedural generation. It was popularized most recently by the indie game No Man's Sky, but now, AI researchers are using the same technique to create software that can design a game entirely from scratch. So you can say that not only do I want to generate a landscape, but I want to generate a landscape where I know there will be choke points, where we can hide my troops behind, or I know there will be places to have a castle on, and with no deep valleys you can fall into. Building off that, game developers could create games that don't just generate levels all on their own, but also learn what you like as a player. In the longer-term future, we're going to see game directors that learn to adapt the game as you are playing it, and learn to become game masters that play the player as the player plays the game. There are even ways that AI right now can be used to create the art for games. Take a look at Nvidia's research generating game graphics using deep learning. What you're seeing is not real, an AI used a game engine and some video footage to teach itself how to generate an imaginary city block. One that you could see in a game. The same technique can even create all new, never-before-seen faces, ones that look indistinguishable from real human beings. Of course, that doesn't stop with faces. You could do mountains, dogs, space ships, whatever. But the Holy Grail of AI in games would be a true self-learning character that is complex and relatable, and it has a realistic persona that could build you up. Do you know how to get out of here? Or tear you down. (bleeping) We're probably not going to have game characters that sophisticated for a long time. In the short term, big game companies will likely use AI for testing games and boring stuff like analytics. But AI is really tricky, and it requires a ton of tinkering and training. That's time and money that game developers don't always have. So Julian doesn't see the usual suspects jumping on actual AI powered games anytime soon. We need to take the AI capability, and think about how can we design a game around that? And I don't think that's going to happen from the big AI companies. It’s too risky. Instead, it might take smaller, scrappier gaming companies to lean into AI's quirks and make something unexpected and strange that feels entirely new. So if something unexpected or weird happened to you while you were playing Red Dead Redemption 2, or even the new Zelda, describe it in the comments below. And if you have one, leave us a link, too. Thanks for watching.
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.