Candy Crush Soda Saga makes a promising debut on Smartphones
Using Artificial Intelligence to Test the Candy Crush Saga Game
Transcript of Using Artificial Intelligence to Test the Candy Crush Saga Game
W12 Session 10/26/2016 1:30:00 PM
Using Artificial Intelligence to Test the Candy Crush Saga Game
Presented by:
Alexander Andelkovic
King/Midasplayer AB
Brought to you by:
350 Corporate Way, Suite 400, Orange Park, FL 32073 888---268---8770 ·· 904---278---0524 - [email protected] - http://www.starcanada.techwell.com/
Alexander Andelkovic King/Midasplayer AB The agile testing lead for Sweden-based King/Midasplayer AB, developer of the popular mobile game Candy Crush Saga, Alexander Andelkovic has worked on multiple complex test projects ranging from using session-based test management for quality assuring MED-Tech devices for life critical systems to establishing a world class approval process for Spotify apps used by Fortune 500 companies. Now he teams with developers in testing big data, business analytics, and game level regression testing using AI. Alex performs both system testing and exploratory testing with a focus on assisting teams with high-quality deliveries. He is a frequent speaker at international conferences including both STAREAST and STARWEST.
© King.com Ltd 2016
About us
King/Midasplayer AB • Founded 2003
• +200 Games
• 2000 employees
• 13 Studios(Stockholm, London, Barcelona, Seattle…)
• 409 million MAU(Q2 2016)
• Acquired by Activision/Blizzard(2016-02-23)
Page 2
© King.com Ltd 2016
QA at King
King QA roles • ATL – Agile Testing Lead
• Ninja – Exploratory tester
• QRT – Quick Regression Team
• TAE – Test Automation Engineer
• DS – Data Scientist
• Dev – Frontend/Backend Developer
Page 4
© King.com Ltd 2016
Introduction
AI-bot – why?
Page 9
• Level designers
• Quality Assistance (QA)
• Game-domain research
© King.com Ltd 2016
Heuristic
Heuristic is good, maintenance is bad!
Page 11
• Having a function that ranks moves – heuristic – could
help a lot
• Each simulation much richer
• Has to be generic
• Increasing complexity with more features
• Can we create the heuristic automatically?
© King.com Ltd 2016
MCTS
Page 16
36% 28% 19%
Gradually we build a tree => Monte-Carlo Tree Search
40% 32%
© King.com Ltd 2016
MCTS - Impact
What do we have?
Page 22
• Generic method
• Works for all levels
• Works for other games
© King.com Ltd 2016
MCTS - summary
MCTS summary
Page 23
• Closer to human success rate
• Easy to tune with more simulation per
decision
• Time consuming, one level takes
~ 5-10 mins
• How can we improve?
© King.com Ltd 2016
NEAT
NEAT – NeuroEvolution of Augmented Topologies!
Page 24
• Artificial Neural Network(ANN)
• Reinforced learning(action, learn, evolve)
• Guided playout
© King.com Ltd 2016
NEAT
NEAT – Steps
Page 26
• Get training data - Predict score (hours)
• Create random bots
• Compete (hours)
• Create new bots
• Choose the best bot - ANN
• Play Candy choosing moves in playout with
ANN
© King.com Ltd 2016
NEAT
The jungle law in Candy
Page 27
Focus on
blockers!
Look at
jellies!
Special candies are tasty!
© King.com Ltd 2016
NEAT demo
Page 31
NEAT training
• Red=Fittest Bot
• Yellow=Avg Bot
fitness
• Green=# Bot’s
• Blue=Fittest Bot
ANN nodes
© King.com Ltd 2016
NEAT
NEAT – Performance
Page 34
• Simulation time, game engine needs to replay
each game state
• Traversing time, game engine does not
support jump to state
• More GPU’s for bot training(5-6 hours > on
commit)
© King.com Ltd 2016
Benefits
Bot benefits
Page 37
• Level development: level difficulty, less
tweaks
• Quality assistance: crash testing,
performance testing, regression testing
• Data scientists: Game domain
knowledge, fun levels, game balancing
© King.com Ltd 2016
Challenges
Bot challenges
Page 38
• Ownership(Knowledge, Resources, Bot
team)
• Integration(Headless mode, C++/Lua/JS,
Hackday/Sprint, Bot Api)
• Maintenance(Bot Training, Infrastructure,
Extend)