SlideShare a Scribd company logo
1 of 42
Using Artificial Intelligence to Test the Candy Crush
Saga Game
© King.com Ltd 2017
About us
King/Midasplayer AB
• Founded 2003
• +200 Games
• 2000 employees
• 13 Studios(Stockholm, London, Barcelona,
Seattle…)
• 290 million MAU(Q4 2017)
• Acquired by Activision/Blizzard(2016-02-23)
Page 2
© King.com Ltd 2017
Products
Franchise Games
Page 3
© King.com Ltd 2017
QA at King
King QA roles
• ATL – Agile Testing Lead
• QAAnalyst – Exploratory tester
• QRT – Quick Regression Team
• TAE – Test Automation Engineer
• DS – Data Scientist
• Developer – (Frontend/Backend)
Page 4
© King.com Ltd 2017
QA Problem
More than 2000 levels in Candy
Page 9
© King.com Ltd 2017
Introduction
History of AI
Page 6
© King.com Ltd 2017
Introduction
So, what is a bot exactly?
Page 7
© King.com Ltd 2017
Introduction
Application that performs an automated task
Page 8
© King.com Ltd 2017
Introduction
AI-bot –
why?
Page 9
• Level designers
• QualityAssistance (QA)
• Game-domain research
© King.com Ltd 2017
AI-bot
How would an AI-bot actually think(heuristic,
simulation)?
Page 9
© King.com Ltd 2017
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 2017
MCTS
Simulation – Monte Carlo Tree Search
Page 12
© King.com Ltd 2017
MCTS
Page 13
Simulate example
© King.com Ltd 2017
MCTS
Page 14
Win Loss Win
Is this reliable?
© King.com Ltd 2017
MCTS
Page 15
36% 28% 19%
Repeat simulations – Monte-Carlo simulations
© King.com Ltd 2017
MCTS
Page 16
36% 28% 19%
Gradually we build a tree
=> Monte-Carlo Tree Search
40% 32%
© King.com Ltd 2017
MCTS
Search tree for level 13 in Candy
Page 17
© King.com Ltd 2017
MCTS
Available actions
Page 18
© King.com Ltd 2017
MCTS
Future states
Page 19
© King.com Ltd 2017
MCTS
Page 20
After 299 simulations
© King.com Ltd 2017
MCTS demo
Page 21
MCTS demo
© King.com Ltd 2017
MCTS - Impact
What do we have?
Page 22
• Generic method
• Works for all levels
• Works for other games
© King.com Ltd 2017
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 2017
NEAT
NEAT – NeuroEvolution of Augmented
Topologies!
Page 24
• Artificial Neural Network(ANN)
• Reinforced learning(action, learn, evolve)
• Guided playout
© King.com Ltd 2017
NEAT
Play Candy Crush!
Page 25
4 1 0 0
© King.com Ltd 2017
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 2017
NEAT
The jungle law in Candy
Page 27
Focus on
blockers!
Look at
jellies!
Special candies are tasty!
© King.com Ltd 2017
NEAT
Making babies
Page 28
Mom Dad
© King.com Ltd 2017
NEAT
Page 29
Newborn
Mom Dad
© King.com Ltd 2017
NEAT
Product of evolution
Page 30
© King.com Ltd 2017
NEAT demo
Page 31
NEAT training
• Red=Fittest Bot
• Yellow=Avg Bot
fitness
• Green=# Bot’s
• Blue=Fittest Bot
ANN nodes
© King.com Ltd 2017
NEAT demo
Page 32
NEAT training
demo
© King.com Ltd 2017
Results
Guiding the
playout helps
Page 33
© King.com Ltd 2017
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 2017
Content QA
Content QA – No bot
Page 35
© King.com Ltd 2017
Content QA
Content QA – With bot
Page 36
© King.com Ltd 2017
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 2017
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)
© King.com Ltd 2017
Links
Crushing Candy Crush: Predicting Human Success Rate in a Mobile Game using Monte-Carlo
Tree Search
http://kth.diva-portal.org/smash/get/diva2:1093469/FULLTEXT01.pdf
Predicting Game Level Difficulty Using Deep Neural Networks
http://kth.diva-portal.org/smash/get/diva2:1154062/FULLTEXT01.pdf
Simulating Human Game Play for Level Difficulty Estimation with Convolutional Neural
Networks
http://kth.diva-portal.org/smash/get/diva2:1149021/FULLTEXT01.pdf
Page 39
Links
© King.com Ltd 2017
Q&A
alexander.andelkovic@king.c
om
Page 40
Questions?
© King.com Ltd 2017
Thank you!
Page 41
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Test the Candy Crush Saga Game.

More Related Content

What's hot

Building Better Collaboration Between Development and Testing in a DevOps World
Building Better Collaboration Between Development and Testing in a DevOps WorldBuilding Better Collaboration Between Development and Testing in a DevOps World
Building Better Collaboration Between Development and Testing in a DevOps World
QASymphony
 

What's hot (20)

"Production Driven Development", Serhii Kalinets
"Production Driven Development", Serhii Kalinets"Production Driven Development", Serhii Kalinets
"Production Driven Development", Serhii Kalinets
 
How to Build a SaaS App With Twitter-like Throughput on Just 9 Servers
How to Build a SaaS App With Twitter-like Throughput on Just 9 ServersHow to Build a SaaS App With Twitter-like Throughput on Just 9 Servers
How to Build a SaaS App With Twitter-like Throughput on Just 9 Servers
 
Pivotal CloudFoundry on Google cloud platform
Pivotal CloudFoundry on Google cloud platformPivotal CloudFoundry on Google cloud platform
Pivotal CloudFoundry on Google cloud platform
 
Flink Forward Berlin 2018: Wei-Che (Tony) Wei - "Lessons learned from Migrati...
Flink Forward Berlin 2018: Wei-Che (Tony) Wei - "Lessons learned from Migrati...Flink Forward Berlin 2018: Wei-Che (Tony) Wei - "Lessons learned from Migrati...
Flink Forward Berlin 2018: Wei-Che (Tony) Wei - "Lessons learned from Migrati...
 
Overcoming Regulatory & Compliance Hurdles with Hybrid Cloud EKS and Weave Gi...
Overcoming Regulatory & Compliance Hurdles with Hybrid Cloud EKS and Weave Gi...Overcoming Regulatory & Compliance Hurdles with Hybrid Cloud EKS and Weave Gi...
Overcoming Regulatory & Compliance Hurdles with Hybrid Cloud EKS and Weave Gi...
 
Introduction of devops
Introduction of devopsIntroduction of devops
Introduction of devops
 
Tech breakfast at Lab49
Tech breakfast at Lab49Tech breakfast at Lab49
Tech breakfast at Lab49
 
GNAT Pro User Day: AdaCore Insights
GNAT Pro User Day: AdaCore InsightsGNAT Pro User Day: AdaCore Insights
GNAT Pro User Day: AdaCore Insights
 
Building Better Collaboration Between Development and Testing in a DevOps World
Building Better Collaboration Between Development and Testing in a DevOps WorldBuilding Better Collaboration Between Development and Testing in a DevOps World
Building Better Collaboration Between Development and Testing in a DevOps World
 
ThoughtWorks Continuous Delivery
ThoughtWorks Continuous DeliveryThoughtWorks Continuous Delivery
ThoughtWorks Continuous Delivery
 
THE PLEASURES OF ON-PREM, TOMER GABEL
THE PLEASURES OF ON-PREM, TOMER GABELTHE PLEASURES OF ON-PREM, TOMER GABEL
THE PLEASURES OF ON-PREM, TOMER GABEL
 
Measuring the Quality of Your Perl Code
Measuring the Quality of Your Perl CodeMeasuring the Quality of Your Perl Code
Measuring the Quality of Your Perl Code
 
AWS Well-Architected Framework (nov 2017)
AWS Well-Architected Framework (nov 2017)AWS Well-Architected Framework (nov 2017)
AWS Well-Architected Framework (nov 2017)
 
Moving QA from Reactive to Proactive with qTest
Moving QA from Reactive to Proactive  with qTestMoving QA from Reactive to Proactive  with qTest
Moving QA from Reactive to Proactive with qTest
 
#ATAGTR2020 Presentation - GraphQL for CICD integration
#ATAGTR2020 Presentation - GraphQL for CICD integration#ATAGTR2020 Presentation - GraphQL for CICD integration
#ATAGTR2020 Presentation - GraphQL for CICD integration
 
Driving TAS Enterprise Fitness
Driving TAS Enterprise FitnessDriving TAS Enterprise Fitness
Driving TAS Enterprise Fitness
 
Improving Agility (Learning from Maersk Line's Journey) | Özlem Yüce | Agile ...
Improving Agility (Learning from Maersk Line's Journey) | Özlem Yüce | Agile ...Improving Agility (Learning from Maersk Line's Journey) | Özlem Yüce | Agile ...
Improving Agility (Learning from Maersk Line's Journey) | Özlem Yüce | Agile ...
 
Sck spring-reactive
Sck spring-reactiveSck spring-reactive
Sck spring-reactive
 
Study Notes - Architecting for the cloud (AWS Best Practices, Feb 2016)
Study Notes - Architecting for the cloud (AWS Best Practices, Feb 2016)Study Notes - Architecting for the cloud (AWS Best Practices, Feb 2016)
Study Notes - Architecting for the cloud (AWS Best Practices, Feb 2016)
 
Making the Business Case for DevOps
Making the Business Case for DevOpsMaking the Business Case for DevOps
Making the Business Case for DevOps
 

Similar to Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Test the Candy Crush Saga Game.

How to Suceed in Hadoop
How to Suceed in HadoopHow to Suceed in Hadoop
How to Suceed in Hadoop
Precisely
 

Similar to Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Test the Candy Crush Saga Game. (20)

Using Artificial Intelligence to Test the Candy Crush Saga Game
Using Artificial Intelligence to Test the Candy Crush Saga GameUsing Artificial Intelligence to Test the Candy Crush Saga Game
Using Artificial Intelligence to Test the Candy Crush Saga Game
 
Using Artificial Intelligence to Test the Candy Crush Saga Game
Using Artificial Intelligence to Test the Candy Crush Saga GameUsing Artificial Intelligence to Test the Candy Crush Saga Game
Using Artificial Intelligence to Test the Candy Crush Saga Game
 
WaveEngine Dotnet 2018
WaveEngine Dotnet 2018WaveEngine Dotnet 2018
WaveEngine Dotnet 2018
 
A revolution is coming! Writing performant and safe multi-threaded code in Un...
A revolution is coming! Writing performant and safe multi-threaded code in Un...A revolution is coming! Writing performant and safe multi-threaded code in Un...
A revolution is coming! Writing performant and safe multi-threaded code in Un...
 
How to Succeed in Hadoop: comScore’s Deceptively Simple Secrets to Deploying ...
How to Succeed in Hadoop: comScore’s Deceptively Simple Secrets to Deploying ...How to Succeed in Hadoop: comScore’s Deceptively Simple Secrets to Deploying ...
How to Succeed in Hadoop: comScore’s Deceptively Simple Secrets to Deploying ...
 
How to Suceed in Hadoop
How to Suceed in HadoopHow to Suceed in Hadoop
How to Suceed in Hadoop
 
Legacy code - Taming The Beast
Legacy code  - Taming The BeastLegacy code  - Taming The Beast
Legacy code - Taming The Beast
 
Internet of Fun: Winning Ways for an IoT Hackathon
Internet of Fun: Winning Ways for an IoT HackathonInternet of Fun: Winning Ways for an IoT Hackathon
Internet of Fun: Winning Ways for an IoT Hackathon
 
Modern Product Data Workflows: How King Crushes New Product Development using...
Modern Product Data Workflows: How King Crushes New Product Development using...Modern Product Data Workflows: How King Crushes New Product Development using...
Modern Product Data Workflows: How King Crushes New Product Development using...
 
Modern Product Data Workflows: How King Crushes New Product Development using...
Modern Product Data Workflows: How King Crushes New Product Development using...Modern Product Data Workflows: How King Crushes New Product Development using...
Modern Product Data Workflows: How King Crushes New Product Development using...
 
Creating macOS Build Infrastructure in the Cloud
Creating macOS Build Infrastructure in the CloudCreating macOS Build Infrastructure in the Cloud
Creating macOS Build Infrastructure in the Cloud
 
3 Million Hours in 30 Days_How Tangent Animation Created Next Gen: NY Symposium
3 Million Hours in 30 Days_How Tangent Animation Created Next Gen: NY Symposium3 Million Hours in 30 Days_How Tangent Animation Created Next Gen: NY Symposium
3 Million Hours in 30 Days_How Tangent Animation Created Next Gen: NY Symposium
 
The Performance Engineer's Guide to Java (HotSpot) Virtual Machine
The Performance Engineer's Guide to Java (HotSpot) Virtual MachineThe Performance Engineer's Guide to Java (HotSpot) Virtual Machine
The Performance Engineer's Guide to Java (HotSpot) Virtual Machine
 
05 ttg labs
05 ttg labs05 ttg labs
05 ttg labs
 
SAST 140416 King
SAST 140416 KingSAST 140416 King
SAST 140416 King
 
Cloud Gaming Architectures: From Social to Mobile to MMO
Cloud Gaming Architectures: From Social to Mobile to MMOCloud Gaming Architectures: From Social to Mobile to MMO
Cloud Gaming Architectures: From Social to Mobile to MMO
 
In-Memory Computing Essentials for Architects and Engineers
In-Memory Computing Essentials for Architects and EngineersIn-Memory Computing Essentials for Architects and Engineers
In-Memory Computing Essentials for Architects and Engineers
 
Preparing for AI - Measurefest
Preparing for AI - MeasurefestPreparing for AI - Measurefest
Preparing for AI - Measurefest
 
Customer Story: Elastic Stack을 이용한 게임 서비스 통합 로깅 플랫폼
Customer Story: Elastic Stack을 이용한 게임 서비스 통합 로깅 플랫폼Customer Story: Elastic Stack을 이용한 게임 서비스 통합 로깅 플랫폼
Customer Story: Elastic Stack을 이용한 게임 서비스 통합 로깅 플랫폼
 
Data Science Competition
Data Science CompetitionData Science Competition
Data Science Competition
 

More from COMAQA.BY

Системный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестовСистемный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестов
COMAQA.BY
 

More from COMAQA.BY (20)

Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
 
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
 
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
 
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важностьRoman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
 
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
 
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
 
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
 
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
 
Моя роль в конфликте
Моя роль в конфликтеМоя роль в конфликте
Моя роль в конфликте
 
Организация приемочного тестирования силами матерых тестировщиков
Организация приемочного тестирования силами матерых тестировщиковОрганизация приемочного тестирования силами матерых тестировщиков
Организация приемочного тестирования силами матерых тестировщиков
 
Развитие или смерть
Развитие или смертьРазвитие или смерть
Развитие или смерть
 
Системный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестовСистемный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестов
 
Эффективная работа с рутинными задачами
Эффективная работа с рутинными задачамиЭффективная работа с рутинными задачами
Эффективная работа с рутинными задачами
 
Как стать синьором
Как стать синьоромКак стать синьором
Как стать синьором
 
Open your mind for OpenSource
Open your mind for OpenSourceOpen your mind for OpenSource
Open your mind for OpenSource
 
JDI 2.0. Not only UI testing
JDI 2.0. Not only UI testingJDI 2.0. Not only UI testing
JDI 2.0. Not only UI testing
 
Out of box page object design pattern, java
Out of box page object design pattern, javaOut of box page object design pattern, java
Out of box page object design pattern, java
 
Static and dynamic Page Objects with Java \ .Net examples
Static and dynamic Page Objects with Java \ .Net examplesStatic and dynamic Page Objects with Java \ .Net examples
Static and dynamic Page Objects with Java \ .Net examples
 
Design Patterns for QA Automation
Design Patterns for QA AutomationDesign Patterns for QA Automation
Design Patterns for QA Automation
 
Battle: BDD vs notBDD
Battle: BDD vs notBDDBattle: BDD vs notBDD
Battle: BDD vs notBDD
 

Recently uploaded

一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
pxcywzqs
 
一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书
F
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 
一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理
F
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Monica Sydney
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Monica Sydney
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Down bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirts
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理
 
South Bopal [ (Call Girls) in Ahmedabad ₹7.5k Pick Up & Drop With Cash Paymen...
South Bopal [ (Call Girls) in Ahmedabad ₹7.5k Pick Up & Drop With Cash Paymen...South Bopal [ (Call Girls) in Ahmedabad ₹7.5k Pick Up & Drop With Cash Paymen...
South Bopal [ (Call Girls) in Ahmedabad ₹7.5k Pick Up & Drop With Cash Paymen...
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
Call girls Service Canacona - 8250092165 Our call girls are sure to provide y...
Call girls Service Canacona - 8250092165 Our call girls are sure to provide y...Call girls Service Canacona - 8250092165 Our call girls are sure to provide y...
Call girls Service Canacona - 8250092165 Our call girls are sure to provide y...
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
Research Assignment - NIST SP800 [172 A] - Presentation.pptx
Research Assignment - NIST SP800 [172 A] - Presentation.pptxResearch Assignment - NIST SP800 [172 A] - Presentation.pptx
Research Assignment - NIST SP800 [172 A] - Presentation.pptx
 
💚 Call Girls Bahraich 9332606886 High Profile Call Girls You Can Get The S...
💚 Call Girls Bahraich   9332606886  High Profile Call Girls You Can Get The S...💚 Call Girls Bahraich   9332606886  High Profile Call Girls You Can Get The S...
💚 Call Girls Bahraich 9332606886 High Profile Call Girls You Can Get The S...
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Sensual Call Girls in Tarn Taran Sahib { 9332606886 } VVIP NISHA Call Girls N...
Sensual Call Girls in Tarn Taran Sahib { 9332606886 } VVIP NISHA Call Girls N...Sensual Call Girls in Tarn Taran Sahib { 9332606886 } VVIP NISHA Call Girls N...
Sensual Call Girls in Tarn Taran Sahib { 9332606886 } VVIP NISHA Call Girls N...
 
Leading-edge AI Image Generators of 2024
Leading-edge AI Image Generators of 2024Leading-edge AI Image Generators of 2024
Leading-edge AI Image Generators of 2024
 

Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Test the Candy Crush Saga Game.

  • 1. Using Artificial Intelligence to Test the Candy Crush Saga Game
  • 2. © King.com Ltd 2017 About us King/Midasplayer AB • Founded 2003 • +200 Games • 2000 employees • 13 Studios(Stockholm, London, Barcelona, Seattle…) • 290 million MAU(Q4 2017) • Acquired by Activision/Blizzard(2016-02-23) Page 2
  • 3. © King.com Ltd 2017 Products Franchise Games Page 3
  • 4. © King.com Ltd 2017 QA at King King QA roles • ATL – Agile Testing Lead • QAAnalyst – Exploratory tester • QRT – Quick Regression Team • TAE – Test Automation Engineer • DS – Data Scientist • Developer – (Frontend/Backend) Page 4
  • 5. © King.com Ltd 2017 QA Problem More than 2000 levels in Candy Page 9
  • 6. © King.com Ltd 2017 Introduction History of AI Page 6
  • 7. © King.com Ltd 2017 Introduction So, what is a bot exactly? Page 7
  • 8. © King.com Ltd 2017 Introduction Application that performs an automated task Page 8
  • 9. © King.com Ltd 2017 Introduction AI-bot – why? Page 9 • Level designers • QualityAssistance (QA) • Game-domain research
  • 10. © King.com Ltd 2017 AI-bot How would an AI-bot actually think(heuristic, simulation)? Page 9
  • 11. © King.com Ltd 2017 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?
  • 12. © King.com Ltd 2017 MCTS Simulation – Monte Carlo Tree Search Page 12
  • 13. © King.com Ltd 2017 MCTS Page 13 Simulate example
  • 14. © King.com Ltd 2017 MCTS Page 14 Win Loss Win Is this reliable?
  • 15. © King.com Ltd 2017 MCTS Page 15 36% 28% 19% Repeat simulations – Monte-Carlo simulations
  • 16. © King.com Ltd 2017 MCTS Page 16 36% 28% 19% Gradually we build a tree => Monte-Carlo Tree Search 40% 32%
  • 17. © King.com Ltd 2017 MCTS Search tree for level 13 in Candy Page 17
  • 18. © King.com Ltd 2017 MCTS Available actions Page 18
  • 19. © King.com Ltd 2017 MCTS Future states Page 19
  • 20. © King.com Ltd 2017 MCTS Page 20 After 299 simulations
  • 21. © King.com Ltd 2017 MCTS demo Page 21 MCTS demo
  • 22. © King.com Ltd 2017 MCTS - Impact What do we have? Page 22 • Generic method • Works for all levels • Works for other games
  • 23. © King.com Ltd 2017 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?
  • 24. © King.com Ltd 2017 NEAT NEAT – NeuroEvolution of Augmented Topologies! Page 24 • Artificial Neural Network(ANN) • Reinforced learning(action, learn, evolve) • Guided playout
  • 25. © King.com Ltd 2017 NEAT Play Candy Crush! Page 25 4 1 0 0
  • 26. © King.com Ltd 2017 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
  • 27. © King.com Ltd 2017 NEAT The jungle law in Candy Page 27 Focus on blockers! Look at jellies! Special candies are tasty!
  • 28. © King.com Ltd 2017 NEAT Making babies Page 28 Mom Dad
  • 29. © King.com Ltd 2017 NEAT Page 29 Newborn Mom Dad
  • 30. © King.com Ltd 2017 NEAT Product of evolution Page 30
  • 31. © King.com Ltd 2017 NEAT demo Page 31 NEAT training • Red=Fittest Bot • Yellow=Avg Bot fitness • Green=# Bot’s • Blue=Fittest Bot ANN nodes
  • 32. © King.com Ltd 2017 NEAT demo Page 32 NEAT training demo
  • 33. © King.com Ltd 2017 Results Guiding the playout helps Page 33
  • 34. © King.com Ltd 2017 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)
  • 35. © King.com Ltd 2017 Content QA Content QA – No bot Page 35
  • 36. © King.com Ltd 2017 Content QA Content QA – With bot Page 36
  • 37. © King.com Ltd 2017 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
  • 38. © King.com Ltd 2017 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)
  • 39. © King.com Ltd 2017 Links Crushing Candy Crush: Predicting Human Success Rate in a Mobile Game using Monte-Carlo Tree Search http://kth.diva-portal.org/smash/get/diva2:1093469/FULLTEXT01.pdf Predicting Game Level Difficulty Using Deep Neural Networks http://kth.diva-portal.org/smash/get/diva2:1154062/FULLTEXT01.pdf Simulating Human Game Play for Level Difficulty Estimation with Convolutional Neural Networks http://kth.diva-portal.org/smash/get/diva2:1149021/FULLTEXT01.pdf Page 39 Links
  • 40. © King.com Ltd 2017 Q&A alexander.andelkovic@king.c om Page 40 Questions?
  • 41. © King.com Ltd 2017 Thank you! Page 41

Editor's Notes

  1. Simple mobile games, can they be a challenge to AI? Single-player game with simple mechanics? There is only one level in chess and Go and no randomness. This is a BIG difference.
  2. Talk about the great success of AI in games, Kasparov 97 and Sedol 2016
  3. Spend some time here, explaining how it improves the work for level designers etc.
  4. The traditional AI in games, like in chess, builds a function which can rank the moves – a heuristic function – based on the relevant features of the game. We have done something like that for many of our games. Very fast and pretty good ... to begin with High maintenance, no transfer of method between games – new heuristic for each game. How would it choose between the possible actions? Should it try to think ahead, predict the future?
  5. We would like to have some heuristic but the levels are always changing. Get feedback about automatic heuristic construction.
  6. So, we tried simulation
  7. Here are three of the possible moves, how can we figure out which move is the best?
  8. Let‘s simulate each action. One simulation each move very unreliable. How should the playout be? Random at the moment. => repeat! Not too fast here, make sure everybody follows and understand how we play until the end while still thinking – no action taken yet.
  9. After repeated simulations we start to get some kind of an estimate for the expected value of each of these three actions.
  10. Current position is in the middle – the root of the tree. The bot is still thinking and has used 100 simulations. The smartness of MCTS comes from how we manage our resources – greed vs. exploration
  11. The circle shows the possible actions in the current position
  12. Further down the tree we see possible future states and future actions. Both trees from the same level but with different values for the parameter controlling greed. One is ”flat” the other more ”deep”.
  13. Colored tree, more simulations, red = loss, green = win
  14. The solid line shows the mean/average. The gray line is where we want to be
  15. Game engine code is not optimized for this. Easily scalable though. How can we improve? Talk about different methods available – get feedback from audience and steer it towards random playout. Strength and speed, one can often be exchanged for he other.
  16. We tried NEAT and will continue experimenting with automatically constructing heuristic.
  17. We want a bot that can weigh the importance of the game features, e.g. Number of candies in a combination, striped candy, number of jellies and number of blockers as shown here. But we are lazy and don‘t want to do anything ourself.
  18. Let’s create a lot of bots, and we are still lazy so we just create them randomly and let them play.
  19. Exemple for one child Mom uses interaction between candies/special candies Dad focuses on blockers
  20. Child do both Emphasize that this is how you generate the new generation Slights changes between newborns A couple won’t always produce the same child Different couples
  21. Complex pattern = More interactivity between features Straightforward = all features are independent A more complex pattern allows deeper thinking.
  22. The dotted line is the mean and the solid line is the mean with ANN. Remember, we want to be close to gray. Talk about that the heuristic can save us time – we can get good enough with more simulations
  23. We tried NEAT and will continue experimenting with automatically constructing heuristic.
  24. We tried NEAT and will continue experimenting with automatically constructing heuristic.
  25. We tried NEAT and will continue experimenting with automatically constructing heuristic.