McKinsey for Kids: Game on! Why your computer learns faster and games better than you think
April 1, 2022Interactive
Computers can solve some problems better and faster than humans can—but only after humans train the machines to use artificial intelligence. Let’s explore the world of gaming to figure out how.
More than just fun
70% of people younger than 25 …
prefer gaming to watching videos. Games can even help recruiters find the right person for a job. In 2019, McKinsey incorporated Solve, an interactive game that looks at how people solve problems, into our recruiting process. Solve has now been used by more than 15,000 people across 30 countries!
Do you remember the first game you played? Maybe you and your mom or dad loved tic-tac-toe or go fish, or you couldn’t get enough of board games with your friends. Now that you’re older, video games might be more your speed.
By next year, there may be more than 3 billion active gamers around the world—which means 2 out of every 5 people you meet could be into gaming.
Do you know who else loves video games? Computer researchers. Games can help them do their jobs better by testing different ways to give a computer artificial intelligence (AI). That means teaching computers how to think, and to do it as well as or–sometimes–better than humans.
Researchers have taught computers to play all sorts of games, from chess to StarCraft. All that gaming has made computers smarter, allowing them to get better at many things–not just games.
How do games help with AI?
As AI researchers come up with new ways to give computers humanlike abilities, they also need to make sure they work. It’s similar to your teacher giving you a test to see how you’re doing in class.
Games can test and compare the way computers and humans solve problems. Here’s how: researchers feed the computer the game’s rules and teach it the moves and strategies humans would use. Some of the first computers with AI learned to play checkers and chess this way, and it showed that computers with AI could do some of the same tasks as well as humans–but many times faster.
That’s partly because computers can store more in their short-term “memory” than we can.
For example, maybe in math, you’ve learned about pi, the number that helps you figure out the size of a circle. The average person’s short-term memory can hold the first seven digits of pi: 3.141592 (if you know what’s next, that’s better than average). A computer with lots of memory (say, 1 terabyte, which you might use if you store a lot of big music or video files) could hold 2 trillion or more digits of pi.
The ultimate matchup:
Brain versus computer
Here’s a short quiz. Humans are better than computers at some things, and vice versa. All you need to do is read the question, then click the flip card to see if you got it right.
Question 1 of 3
Think fast: Which one, computer or human brain, performs 10 billion operations per second?
Computer
You’ve got it!
That’s 10 million times as fast as a human brain.
Human Brain
Not quite.
The brain can handle 1,000 operations per second. A computer can work 10 million times faster than that.
Practice makes perfect
One way researchers are getting companies to use AI for more than just games is through “reinforcement learning,” which is a little bit of a “geeky” term. But the way it works is that the computer keeps playing a game millions of times, using trial and error to learn on its own and even find ways of playing that humans never thought of. The reinforcement part comes in through feedback that tells the computer how it’s doing.
For example, say you’ve told a computer that it needs to win a game of chess in as few moves as possible. You tell it some basic rules, like the piece called a bishop can only move diagonally. The computer then plays the game against itself, making moves and getting feedback about whether those moves helped it win. It is given some kind of reward, like scoring a point if the sequence was good. It might lose a point if the sequence was wrong. The computer keeps playing over and over until it can’t top the fewest number of moves that it previously won.
In time, the computer could come up with a winning strategy that even world-championship players haven’t tried, faster than a human ever could. Just imagine if you played the same game millions of times. Even chess champions don’t have the patience or time, but that kind of practice is how you keep getting better.
So, without even realizing it, you might have encountered something created via reinforcement learning. Maybe you have a robotic dog?
Let’s take a closer look at how this method could work with robotic dogs.
Here, Fido!
Programmers can teach a robotic dog to run and fetch like a real dog.They can train the robot to understand the connection between an action (fetching a ball that’s thrown) and a reward (a treat).
Programmers test the robot’s responses.
They correct the robot if its response isn’t quite right.
They keep correcting and repeating the task so the robot can learn. (Here the robot should have picked up the purple ball, not a stick.)
Through trial and error, the robot eventually learns to run and fetch on its own.
Programmers reward the robot when it moves correctly. Then they can continue training it to do even more. Woof!
Even though reinforcement learning can make a computer very smart, it’s no substitute for the human brain. Humans have many qualities that computers don’t, like emotions and creativity. More than that, we have common sense. Your common sense helps you use your judgment to do logical things, like reading a book from the first page, not from the last. Or stopping at the curb when there’s oncoming traffic, even if the crosswalk signal tells you it’s OK to walk. When it comes to games, your common sense helps you to know the game’s end goal without ever being told. So we really need to help computers so that reinforcement learning doesn’t lead them down the wrong path. Working together, the human brain and the computer can come up with the best solutions to a variety of problems.
Now let’s take a look at how much smarter computers have gotten at learning how to play games over the years.
Gaming the way to AI
In the past six decades, computers have made lots of advances using artificial intelligence. Let’s take a look at how much smarter computers have gotten at learning how to play games over the years.
1960s
1970s
1980s
1990s
2000s
2010s
1959: Checkers
Rules-based AI
Arthur Samuel, a computer engineer for IBM, taught a computer how to play checkers. His work showed how machines can learn simple tasks and eventually do them better than humans. This was one of the first successful cases of the so-called machine learning form of AI.
1997: Chess
Rules-based AI
Although researchers had begun teaching computers to play the much more complicated game of chess in the 1950s as well, it took around 40 years to develop a supercomputer that could play so well that it beat world chess champion Garry Kasparov. That computer was IBM’s Deep Blue.
2016: Go
Rules-based AI
This 2,500-year-old strategic board game, invented in China, is even more challenging than chess–it has a larger board, more playing pieces, and a lot more possible moves. AIphabet’s AI developers at its DeepMind unit taught a computer program the moves champions used and had it practice playing against humans. The program came up with new moves humans hadn’t thought of and eventually beat 18-time world champion Lee Sedol.
2017: Go, Chess, Shogi
Rules-based and reinforcement learning AI
Shogi is a Japanese board game that is similar to, but a little more complex than, chess. A year after teaching a program to play Go, DeepMind researchers also developed a new version of the software that learned to play these three different games in less than 24 hours–by itself. The program was given only some basic rules and then figured out how to play through reinforcement learning with no further human input.
2020: Go, Chess, Shogi, and Atari
Reinforcement learning AI
Just a few short years later, DeepMind researchers once again developed a program that was taught to learn how to play Go, chess, shogi, and 57 games by Atari (one of the first home video-gaming systems in the early 1980s) without being taught a single rule of the games!
AI makes waves at the America’s Cup
The America’s Cup is like the Super Bowl for sailors, and it’s one of the oldest championships in international sports. In 2021, teams were asked to build a new type of sailboat for the race. The team that won, Emirates Team New Zealand, used reinforcement learning to design its winning boat, with McKinsey’s help.
Imagine you’ve been asked to make something no one’s ever built before. You and your friends might sketch different ideas, build and test a few models, and then make changes based on what went wrong. Realistically, you couldn’t sketch everything you wanted to, especially if you had a deadline for completing the project.
The New Zealand team took a different approach. It uploaded designs into a digital simulator, kind of like a virtual world you might build in Minecraft. Sailors could test the designs using a gaming wheel to control virtual boats in virtual seas. But because the sailors were busy practicing on real water, they had limited time to operate the simulator. So they teamed up with McKinsey, and we brought along some gaming technology and reinforcement learning innovation to help.
Let’s see how it all came together.
Riding the wave
The goal of the sailors and programmers is to create a boat that sails faster than other boats in the competition. In a simulator, sailors try different maneuvers they use on real water in a digital environment.Busy schedules keep sailors from practicing in the simulator, so they need AI to help them. A “bot,” or software powered by AI, is created and trained to control the simulator. Unlike a robot, a bot is software that you can’t see, but it works behind the scenes.
The bot becomes an autopilot for the simulator. It learns different maneuvers from the sailors and is rewarded when it does well.
Hydrofoil design is essential to winning the race. It makes a big difference in how fast the boat goes, and whether it wins or loses.
To test the hydrofoil designs, the bot does simple moves first, like sailing in a straight line, without wind and waves. Once it can do that well, testing gets more complex.
Using 14 boat controls, the bot sails based on conditions like wind speed and direction. It judges its own progress to reduce mistakes. Bots test 10 times faster than humans. If sailors do hundreds of tests, bots perform thousands.
Since design delays can keep a team from winning the race, sailors and programmers test at top speed. Testing faster increases the chance of nailing the right hydrofoil design.
Hundreds of bots are created so they can learn from one another very quickly. After 1,000 hours of sailing, the bots’ skills match the experience of Olympic sailors.
After sailing under various conditions, the bots find what works well. Soon they can perform better than the sailors in the simulator! Sailors note the new tricks bots have taught them for use on real water.
Through reinforcement learning, the bots learn to compete like world-class sailors and help find the boat design that leads the team to victory! Together, the human brain and the computer make a winning combination.
What else can reinforcement learning help us do?
Reinforcement learning can help solve lots of problems. And one day, it might even help solve some of the world’s toughest challenges, like making sure everyone has enough food to eat or combatting climate change.
Here are a few examples of how reinforcement learning can do the thinking for us:
Reinforcement learning examples
On the phone
Ever called a friend whose voice was cutting out? That could be a thing of the past if phone companies use reinforcement learning to improve cellular networks. Machines could be given data about mobile networks to see which ones are getting crowded and then use that information to keep networks from becoming too full. That would prevent your calls from dropping and make it easier to stream videos on your phone.
1 of 3
On the farm
Did you know that reinforcement learning could help farmers decide what to plant and when? Machine algorithms can help determine the most fertile soil types, the right pesticides, and the best weather conditions for healthy food to grow. Using bots in the field to pick the crops can also save farmers time and allow for ripe crops to be gathered more quickly. That would mean less waste and more food in hungry bellies.
2 of 3
On the road
Waiting on a package? Reinforcement learning can help shipping companies plan the best truck routes based on changing traffic, weather, and safety conditions. You get what you ordered faster, and truckers save gas, time, and money—and maybe even the environment, because more efficient driving can reduce pollution.
3 of 3
1 of 3
Another area where reinforcement learning can help the environment is climate change. In Europe, scientists have started a project called “Destination Earth” to create a digital model of the Earth. The model mirrors Earth’s air and water temperatures, composition, types of life and their habitats, human-made structures, natural resources, and more. The process won’t be easy; scientists expect building the model to take 10 years. Once it’s complete, a computer using reinforcement learning could use the model to test and combine different strategies to help slow, stop, or even reverse climate change.
As you can see, there are many different ways smarter computers can help humans. Which problems could reinforcement learning help you solve? Now that you’ve come to this point, think you can answer these questions? (Hint: the answers are all in this story!)
Can you name one game a computer has learned to play?
If you named checkers, chess, Go, Atari, or shogi, you’re right!
How much information can a person hold in short-term memory at the same time?
The average person’s short-term memory can hold seven pieces of information at the same time.
Which method was used to help the New Zealand team win the America’s Cup?
Reinforcement learning helped the reigning champion design a sailboat for the 2021 race, with McKinsey’s support.
This edition, based on reports and articles from McKinsey Digital, comes from McKinsey Global Publishing, in a collaborative effort by Emily Adeyanju, Mike Borruso, Vanessa Burke, Vicki Brown, David DeLallo, Torea Frey, Vishwa Goghari, Stephen Landau, Ashley Lucchese, Janet Michaud, Matt Perry, Kanika Punwani, Katie Shearer, and Dan Spector, with DAQ, Chris Philpot, and Sinelab providing additional illustration support.
We hope you have enjoyed reading it as much as we have enjoyed making it. Do tell us what you thought of it and what else we could have done with it, or what our next McKinsey for Kids should explore. Drop a note to our publisher, Raju Narisetti, at newideas@mckinsey.com.