A Formalism For Build Order Search In StarCraft Brood War - Unibas.ch

11m ago
9 Views
1 Downloads
1.02 MB
36 Pages
Last View : 1d ago
Last Download : 3m ago
Upload by : Harley Spears
Transcription

A Formalism for Build Order Search in StarCraft Brood War Severin Wyss Institute of Computer Science and Mathematics University Basel Bachelor Thesis, 2017

Why should you read this Thesis? I Gives the formal basis for implementing Build Order planner for StarCraft Brood War. I Formalism can also be used in other RTS. For example StarCraft 2. I The description will allow to judge whether the formalism works with a other RTS. I The concepts used to simplify the search space could also be useful in real life temporal planning.

Why StarCraft Brood War? I There exists a community API for using AI agents directly in the original game: BWAPI. I API allows to test AI agents versus human. I Annually held tournaments between universities. I One of the first and biggest competitive games. Therefore human skill and knowledge of domain is very strong. I Now even more interesting: Blizzard and Deep Mind teams will enable AI agents in StarCraft 2 within 2017.

Real-Time-Strategy Game A Real-Time-Strategy (RTS) game usually has the following structure: I Start with a few units and resources. I Collect resources and build new units. I When having build a reasonable army send units to attack the enemy. I Fight the enemy. I Win or lose the game. We focus on the second item which is essentially about Build Orders.

StarCraft Brood War

Minerals, Gas

Minerals, Gas Minerals and Gas are natural numbers greater than zero! Example values: 0, 50, 400, 2500

States in SAS From Foundations of AI course, we know what a state is in SAS . States are a variable assignments such that each variable has a assignment. Variable assignments to the variable v must be part of its finite domain dom(v ) {d1 , ., dn }.

Numerical Values Variable assignments to the variable v in SAS must be part of its finite domain dom(v ) {d1 , ., dn }. Instead of a finite domain, we now can have infinite domains: dom(v ) (R) . Additionally, effects and conditions include comparators ( , , etc.) and computations ( , , · etc.).

Main Building and Worker

Units SCV Command Center We will use units for the union of game units and game structures. Each unit has a set of task it can perform. Such as move, attack, gather resources, build new units etc.

Mineral Field and Vespine Gas Geyser

Tech Restriction

Tech Restriction Yellow: can be build. Gray: another unit is must exist first.

Actions in SAS From Foundations of AI course, we know what a action is in SAS . Actions are a 3-tuple a hpre(a), eff (a), cost(a)i where pre(a) and eff(a) are sets of variable assignments and cost(a) is a number.

Temporal Action Actions in SAS are a 3-tuple a hpre(a), eff (a), cost(a)i Temporal actions are 8-tuples aT hd, prestart (aT ), preinvar (aT ), preend (aT ), effstart (aT ), effinvar (aT ), effend (aT ), cost(aT )i . A special action is needed: aTimeStep which only advances time.

Building a Command Center start (frame 0) after 300 frames after 800 frames end (frame 1800) after 1700 frames

State in our Formalism A State is a 5-tuple s : hf , U, R, m, g i I f represents time I m represents minerals I g represents gas I R are boolean values representing upgrades I U is a set of units, each with their task For example the initial state encodes as: s0 (0, {(Terran SCV , , (IDLE , ), , 4), (Terran Command Center , , (IDLE , ), , 1)} , {}, 50.0, 0.0)

Initial State as Example s0 (0, {(Terran SCV , , (IDLE , ), , 4), (Terran Command Center , , (IDLE , ), , 1)} , {}, 50.0, 0.0)

Simplifications by Churchill and Buro I Do not consider positions. I Worker (SCV) always collect minerals instead of being idle. I Replace resource collecting with average income per frame. I Combat is not part of Build Order. I Do not cancel. I Build as soon as possible, enables Fast Forward Mechanism.

Graph without Fast Forward Mechanism aTimeStep f 0 f 1 SCV f 0,SCV 300 aTimeStep f 1,SCV 299

Graph without Fast Forward Mechanism CC aTimeStep aTimeStep aTimeStep . aTimeStep aTimeStep aTimeStep . aTimeStep SCV aTimeStep

Fast Forward Mechanism Idea: fast forward to the frame in which the unit can be build. What unit will the agent eventually be able to build when only taking aTimeStep .

Graph with Fast Forward Mechanism f 0 CC f 7778,CC 1800 SCV f 0,SCV 300 For building a Command Center, we save 7778 times the action aTimeStep .

Action An Action a is a 2-tuple a : ho, ti

Action An Action a is a 2-tuple a : ho, ti The number t N says by how many frames the action will fast forward.

Action possiblity 2 - without complex formula probably better? An Action a is a 2-tuple a : ho, ti The number t N says by how many frames the action will fast forward. The component o is contains the conditions and effects of the temporal action for building a unit.

Action Example The action for building a CC in the initial state is aCC I h(({(Terran SCV , NOPARTNER, 1)}, ), {(Terran SCV , NOPARTNER, 1)}, (400, 0, ), 1896, , Terran Command Center ), 7778i

Build Order A Build Order is a solution path in our formalism. Example: starting in the initial state with the goal 2 Terran Command Center . Most trivial Build Order BO would be: BO (aCC I ) with aCC I hoCC , 7778i.

Build Order Given an initial state and oCC we have t 7778 deterministically given. Therefore t is not important when talking about Build Order. Furthermore, there exists only one oX for every type of unit X . We can write a Build Order just as the sequence of unit types: BO (Terran Command Center )

Make Span and Finishing Step The make span is the duration of the whole Build Order. Just adding up the durations of the actions would be incomplete. Additionally we need a finishing step to advance the amount of frames the longest temporal action still needs to end. In our example BO (Terran Command Center ), the finishing step fast forwards by 1896 frames. So the overall make span of BO is 9674 frames.

DEMO

Discussion I The formalism allows for Build Order search for StarCraft Brood War. I Can also be applied to other RTS games. I Cannot handle all RTS games, for example in Age of Empires 2 the resources simplification will probably be very weak. I When adaptations are required, this formalism can be used as basis.

My thanks go to Malte Helmert, Dave Churchill and Martin Wehrle.

Questions?

Thank you for listening and have a lovely afternoon.

Why should you read this Thesis? I Gives the formal basis for implementing Build Order planner for StarCraft Brood War. I Formalism can also be used in other RTS. For example StarCraft 2. I The description will allow to judge whether the formalism works with a other RTS. I The concepts used to simplify the search space could also be useful in real life temporal planning.

Related Documents:

Bruksanvisning för bilstereo . Bruksanvisning for bilstereo . Instrukcja obsługi samochodowego odtwarzacza stereo . Operating Instructions for Car Stereo . 610-104 . SV . Bruksanvisning i original

10 tips och tricks för att lyckas med ert sap-projekt 20 SAPSANYTT 2/2015 De flesta projektledare känner säkert till Cobb’s paradox. Martin Cobb verkade som CIO för sekretariatet för Treasury Board of Canada 1995 då han ställde frågan

service i Norge och Finland drivs inom ramen för ett enskilt företag (NRK. 1 och Yleisradio), fin ns det i Sverige tre: Ett för tv (Sveriges Television , SVT ), ett för radio (Sveriges Radio , SR ) och ett för utbildnings program (Sveriges Utbildningsradio, UR, vilket till följd av sin begränsade storlek inte återfinns bland de 25 största

Hotell För hotell anges de tre klasserna A/B, C och D. Det betyder att den "normala" standarden C är acceptabel men att motiven för en högre standard är starka. Ljudklass C motsvarar de tidigare normkraven för hotell, ljudklass A/B motsvarar kraven för moderna hotell med hög standard och ljudklass D kan användas vid

LÄS NOGGRANT FÖLJANDE VILLKOR FÖR APPLE DEVELOPER PROGRAM LICENCE . Apple Developer Program License Agreement Syfte Du vill använda Apple-mjukvara (enligt definitionen nedan) för att utveckla en eller flera Applikationer (enligt definitionen nedan) för Apple-märkta produkter. . Applikationer som utvecklas för iOS-produkter, Apple .

och krav. Maskinerna skriver ut upp till fyra tum breda etiketter med direkt termoteknik och termotransferteknik och är lämpliga för en lång rad användningsområden på vertikala marknader. TD-seriens professionella etikettskrivare för . skrivbordet. Brothers nya avancerade 4-tums etikettskrivare för skrivbordet är effektiva och enkla att

Den kanadensiska språkvetaren Jim Cummins har visat i sin forskning från år 1979 att det kan ta 1 till 3 år för att lära sig ett vardagsspråk och mellan 5 till 7 år för att behärska ett akademiskt språk.4 Han införde två begrepp för att beskriva elevernas språkliga kompetens: BI

American Revolution Lapbook Cut out as one piece. You will first fold in the When Where side flap and then fold like an accordion. You will attach the back of the Turnaround square to the lapbook and the Valley Forge square will be the cover. Write in when the troops were at Valley Forge and where Valley Forge is located. Write in what hardships the Continental army faced and how things got .