2. 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
3. Matthieu Macret
Msc student
Starcraft basis
• Gather resources (crystal and gas)
• Building your base
• Building your army
• Manage your army
• Destroy the enemy
3
4. 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
5. 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
6. 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
8. 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
9. 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
10. Matthieu Macret
Msc student
Genetic programming
• Open Beagle Framework
• C++ (faster than JAVA...)
• Everything is customizable
• Support for distributed computing
environments
10
12. Matthieu Macret
Msc student
Genetic programming
principle
12
Population of BO
-
Generation n
Population of BO
-
Generation n+1
mutationselection subtitutioncrossover
15. Matthieu Macret
Msc student
Starcraft Simulator
15
Build Order Simulator
-
C++ , CLIPS
Initial game state
Build Order
Game state
in function of time
16. 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
18. 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
20. 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
24. 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:
31. 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
32. 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
33. 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