How King is using artificial intelligence to accelerate the development of new Candy Crush levels
Updated 7 months ago on May 17, 2024
For King, the new opportunities that AI offers to improve and accelerate game development are not new at all.
The Candy Crush maker has been using and exploring machine learning and artificial intelligence technologies for more than half a century, and that's even before it acquired Peltarion, a Swedish artificial intelligence software company it bought in 2022.
King's AI Labs is a large department headed by Sahar Asadi, and the company has already introduced artificial intelligence tools that its team is using in games like Candy Crush. What's more, one of these tools has already had a significant impact on the development of the hit mobile game.
"The playtesting bot we've developed gives designers the ability to understand what kind of gameplay experience players will get even before the level is released," Asadi explains. "They can see if the level they've created provides the desired experience or not, and if not, they can go back and refine it.
"We've also built a refinement solution based on this bot. If a designer says there are some levels that don't deliver the desired experience, and here are the criteria for that experience, the bot can automatically make refinements. The best solutions are sent to the designers and they can pick the best ones and move on.
"The most fun for designers is creating levels. The routine part is iterating, playing the level, seeing how it looks and, if you're not happy, going back and tweaking it. The manual part is the routine part. The playtesting bot helps cut down on tweaking time, and that allows more time to focus on the creative part - level design and innovation."
The use of artificial intelligence in games is nothing new. For decades, computers have been playing chess with world champions. But the AI created by King is not trying to beat a human, but to repeat his actions. And that requires a different approach.
"A few years ago, DeepMind's AlphaGo was created to play Go against a Go master, and the goal was to beat the best player. Here too, we want to emulate our players. How do you make it look like a human? Let's say you're making your second or third move: [the bot] looks at the board, examines the possible actions you can take, and then decides which option is best. And the 'best' in this case is the one a human is most likely to make."
Asadi continues, "This behavior can be learned from the data King collects on its players.
"We know millions and millions of states and corresponding actions that [players] have taken. And the bot learns those patterns. So for a new state it sees, it can predict the most human-like response. It may not be the best, but it's the most human-like."
"We run a bot to test the game on a large amount of data. We have a difficulty level, and we have the bot estimate the difficulty of the level and the overall difficulty. And we detect a linear pattern that indicates that the bot is playing the game like a human. In addition, we've been working steadily lately on ways to incorporate player skills and preferences into the bot to make it even more human-like."
The impact of the bot has been significant. Asadi told us that thanks to the playtesting bot, there is now 95% less manual tweaking of levels, and this has resulted in levels being tweaked 50% faster overall. But the bot isn't just about speed of development.
"It also helps us a lot to make sure the quality of the level being produced," Asadi says. "Is it playable at this level? How much shuffle is there in this level? Does it give the right amount of challenge to our players? That's one of the factors why we do it."
"The way you work will change. There will be a definite shift in what skills you will need in your day-to-day work."
A natural concern for employees is whether this will be the beginning of the end for designers. If bots are successful in recommending changes to levels that designers accept, how long before these tools start creating levels?
"Absolutely, we need designers," Asadi says firmly. "We see this as a co-pilot for designers. It's a supporting tool. What the playtesting tool provides is insight into the gameplay before it's released. If the bot does everything right, then we are confident that its conclusions are correct. At the end of the day, designers know what they like and what they want from the gameplay. And then they can decide if they should release the level, or if they need to do a few more iterations."
She adds: "What is fun? What is good gameplay? Mathematically you can never explain it. The designer's role is to create that."
Moreover, these tools would not have been possible without the involvement of designers, Asadi argues.
"This entire refinement system was created by working closely with the designers. Their openness and willingness to divert from routine tasks to focus on innovation was the main driving force and incentive for everyone to take the time to create this system."
"If you go back in time, designers used paper and pencils to create levels, then they moved to Photoshop, and now to new UI tools. I see this as another advanced tool that allows them to work on the things they're really skilled at. And hopefully that means we're creating more exciting and interesting things."
Asadi may not believe AI will replace designers, but the routine tasks she talks about are often assigned to entry-level employees to help them understand processes. There are plenty of people in the game industry who have found their way into the business through testing, for example.
"The way you work will change," she admits. "There's going to be a definite shift in what skills you're going to need on a day-to-day basis. What are the new technologies and the new products that we're creating? So everyone's role, especially mine, is changing."
"Thanks to machine learning, a lot of things that engineers had to code, they don't need to code anymore. When I interview people today, I don't base my hiring on the criteria I used to hire people two years ago. But the essence of the things I need and the understanding of machine learning is still there."
"Other companies are developing artificial intelligence rapidly, but how do you integrate it technically, culturally and in terms of capitalizing on it?"
Going forward, King's AI Labs is exploring ways in which the company can better understand its players and what they need at different times.
"For example, if I'm sitting on the bus and I have five minutes, I want to get to the level I was playing as quickly as possible," she explains. "When I'm sitting on the couch and I have half an hour, on the other hand, I might want to do different quests in the game. Getting that context and what it takes to enjoy the gameplay is something that can be useful for players. Part of our research is how, using fundamental models and new developments in machine learning, we can get a more complete view and understanding of players and use that in the game to create a better experience."
AI is developing rapidly, and it may only be a year or two before King's current research is implemented into its games. However, the speed at which King can move forward is due to such an early investment in AI technology. For other studios, the immediate possibilities of AI will depend on whether they are ready to make the most of it.
"The AI development landscape is changing very rapidly," Asadi concludes, "and that makes it very exciting because it creates new opportunities for innovation, which keeps me and my team on our toes. It creates a huge opportunity to bring research into games. But a huge factor is how ready games are to implement these technologies. King has that opportunity because we've already started, started much earlier, with internal research, then acquired Peltarion, which means we have the experience. We have a very good connection with the game, and we're preparing the game to integrate with AI solutions. That helps us to move faster.
"For other companies, it's something to think about. AI is evolving rapidly, but how do you integrate it technically, culturally and in terms of capitalizing on it? That's really important. Very often my team is working on something that will be in the game in one or two years. And I'm hoping that the new solutions we're talking about can be even faster."
Related Topics
More Press
Let's get in touch!
Please feel free to send us a message through the contact form.
Drop us a line at request@nosota.com / Give us a call over nosota.skype