SlideShare uma empresa Scribd logo
1 de 34
Evolving Build Orders
In Starcraft
Matthieu Macret
Matthieu Macret
Msc student
Starcraft
• Science fiction real-time strategy game
(RTS) (1998)
• 11 million copies sold worldwide
• E-sport in Korea with professional players
2
Matthieu Macret
Msc student
Starcraft basis
• Gather resources (crystal and gas)
• Building your base
• Building your army
• Manage your army
• Destroy the enemy
3
Matthieu Macret
Msc student
Build order (BO)
• Sequence of actions in the game:
• Build a command center
• Build a SCV
• Build a barrack
• Build a marine ...
4
Matthieu Macret
Msc student
Build order (BO)
• Equivalent to opening strategies in chess
(ex: English Opening, Sicilian Defence, Ruy
Lopez...)
• Determine your gameplay style for the rest
of the game.
• Context: Early stage of the game when
there is no interaction with the enemy.
(5-10 first min)
5
Matthieu Macret
Msc student
Chess / Starcraft
Complexity
6
Chess
Starcraft
(Terran)
Number of different
pieces
Maximum number of
pieces
Size of the
environment
6 33
16 200
8 x 8 128 x 128
Matthieu Macret
Msc student
Complexity
• Each unit/building has:
• requirements (other buildings,
units...),
• cost (resources, supply, time)
7
Matthieu Macret
Msc student
Related work
• « A first Look at Build Order Optimization in
Real-Time Strategy Games », Buro (2006)
• « Build Order Optimization for Real-Time
Strategy Game »,Wei and Sun (2007)
• « Using Automated Replay Annotation for
Case-Based Planning in Games»,Weber (2010)
• « Automatically generating game tactics via
evolutionary learning », Ponsen (2006)
8
Matthieu Macret
Msc student
Optimizing build orders
• Using genetic programming.
• Intelligent way to search the space of the BO
• Using game mechanics.
• Do an objective evaluation of the BO.
• Time, resources optimization but also other
criteria.
• Ex: 10 marines at t=2min, maximizing defense
and upgradeWeapon1 completed
9
Matthieu Macret
Msc student
Genetic programming
• Open Beagle Framework
• C++ (faster than JAVA...)
• Everything is customizable
• Support for distributed computing
environments
10
Matthieu Macret
Msc student
Build Order
representation
11
A1 A2 A3 T
Matthieu Macret
Msc student
Genetic programming
principle
12
Population of BO
-
Generation n
Population of BO
-
Generation n+1
mutationselection subtitutioncrossover
Matthieu Macret
Msc student
Evaluation
13
Individual
Evaluator
Genotype
Primitive Primitive Primitive
Build Order
Converter
Fitness score
Build order
Genotype
Optimization
criteria
Matthieu Macret
Msc student
Evaluator
14
Evaluator
Starcraft
Simulator
Fitness
function
Game State
Units
Buildings
Statistics
Upgrades
Resources
Matthieu Macret
Msc student
Starcraft Simulator
15
Build Order Simulator
-
C++ , CLIPS
Initial game state
Build Order
Game state
in function of time
Matthieu Macret
Msc student
CLIPS
• C Language Integrated Production System
• Rule engine
• Similar to language LISP
• Developed to be easily embeddable in any
program
16
Matthieu Macret
Msc student
Facts at initialization
17
f-1 (time 0)
f-2 (resources crystal 50)
f-3 (resources gas 0)
f-4 (supply 4)
f-5 (supplyMax 10)
f-8 (waiting commandCenter 0)
f-9 (available commandCenter 1)
f-56 (available SCV 1)
f-57 (waiting SCV 0)
f-92 (upgrade infantryWeapons1 0)
Matthieu Macret
Msc student
Rule
• 2 rules by unit, building or upgrade:
• one rule to put the order in queue.
• one rule to execute the order.
• 1 rule to update the time.
18
Matthieu Macret
Msc student
Rule system
• Some figures about the system:
• 135 initialization facts
• 139 rules
19
Matthieu Macret
Msc student 20
Initialize
the rule
system
Add build
order to the
fact list
Update
time
Run the
rule
system
Until t=tmax
Game State File
Matthieu Macret
Msc student
Game state file
21
Matthieu Macret
Msc student
Fitness function
22
Game State File
Fitness
function
Fitness score
Matthieu Macret
Msc student
Examples: Fitness
function
23
Goal: Have 10 SCV at t=30s
Number of SCV at t=30_________________
10
Matthieu Macret
Msc student
Fitness function
examples
• Maximizing resources
• Have at least 10 marines
• Have a barrack at t=44s
• Minimizing number of orders
24
resources
at tmax
Nbr of marines at tmax_________
10
Nbr
of
barracks
at t=44
Nbr
of orders
at tmax
1
________________ XXX
Goal:
Matthieu Macret
Msc student
Experiment
• Goal: Have 10 SCV at t=300s
25
Matthieu Macret
Msc student
Actions in Starcraft
• Build Supply Depot
• Build SCV
• Build Marines
• Build Barracks
26
Matthieu Macret
Msc student
Genetic programming
parameters
• Population size = 200
• Number of generation = 50
• Max size of a BO = 25
27
Matthieu Macret
Msc student
Fitness function
28
Goal: Have 10 SCV at t=300s
Number of SCV at t=300
_________________
10
Matthieu Macret
Msc student
Results
29
Matthieu Macret
Msc student
Best individual
• buildSCV
• buildSupplyDepot
• buildSCV
• buildSupplyDepot
• buildSCV
• buildSCV
• buildSCV
• buildSCV
• buildSCV... (until 22 X buildSCV)
30
Matthieu Macret
Msc student
Observations
• The system learnt that it is necessary to
build a supply depot to overcome the limit
of eight units.
• The system learnt that building a barrack
or a marine is useless.
• The goal is achieved !
31
Matthieu Macret
Msc student
Conclusion
• Using genetic programming:
• Intelligent way to search the space
• Learning effect
• Easy to set the optimization criteria
• BUT:
• no real-time (long to evolve)
• only interesting for the early stages of the game
32
Matthieu Macret
Msc student
Future work
• Experimenting with the whole rule system
and a more complex fitness functions.
• Developing an user interface to set the
optimization criteria.
• Exploring computer creativity in real time
strategy game.
33
Matthieu Macret
Msc student
34
Questions ?

Mais conteúdo relacionado

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Evolving Build Orders in Starcraft