0% found this document useful (0 votes)
21 views1 page

Vo John

Uploaded by

Joshua Josh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Vo John

Uploaded by

Joshua Josh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Analysis of Blizzard StarCraft II’s artificial intelligence on resource allocation

John Vo
Mentored by Ms. Ashley Funai

Introduction Materials and Methods (cont.) Results (cont.)


Artificial intelligence (AI) is a field of study into how computers or operations, and 15 with a hybrid approach. For both SC2 AI and player The AI games were mapped onto the established clusters (Graph 2)
computer-controlled robots can accomplish cognitive tasks done by humans. playstyle repositories, data was recorded in segments where cycles of damage showing if the game resulted in a win or a loss (Table 2).
Through the process of reinforcement learning, an AI receives feedback to and recovery occurred.
Classification of Blizzard AI playstyle
influence its behavior in a scenario, until a desired or optimal behavior is Principal component analysis (PCA) in scikit-learn was used to reduce the using control player clusters
achieved. dimensionality of the feature space. With the reduced feature space, a 6000 Graph 2 (left): PCA
StarCraft II (SC2) is a real-time strategy game, by the company Blizzard, classification model was created by applying K-means clustering on the data 4000
values of Blizzard AI
where two players make decisions with imperfect information due to the fog from the playstyle classification repository to establish three playstyle clusters. Cluster 2 plotted on the
classification model.
of war, meaning players can only see their structures and the units they are To classify the SC2 AI and player playstyle games, PCA was applied to data 2000
Cluster 1 contains a
inhabiting. In SC2 players play one of three races, each having a unique set of from the respective repositories to map each game onto the classification small patch of games

PC 2
0 Centroid
units and structures for gameplay. Players must balance developing an model. Win
resulting in a loss and
Loss
economy and developing a military to defend against and attack the other Playstyle Classification AI Playstyle Human Player Playstyles -2000
Cluster 1
Cluster 3
two small patches in
player, making StarCraft II related to the field of resource allocation: Establish and distinguish Locate online in replay archive
cluster 2 resulting in a
-4000
managing various resources towards a strategic goal. The game’s complexity,
different playstyle categories
Create
websites win.
Corrupt file and duplicate detector
incorporation of imperfect information, and need to manage limited Attack and recovery replay
program -6000
-1500 -1000 -500 0 500 1000 1500
resources/time makes it a good simulator for real-world scenarios involving Resources Hybrid Military
games PC 1
Blizzard AI vs. Human vs.
resource allocation, such as providing humanitarian aide. Clean files for analysis
Table 2 (right): For the Blizzard AI, Playstyle Control Player Human Player
A study by Vinyals et al. (2019) involved training an AI to play human Cluster 1 contained the most games, and Cluster
Sc2 Reader Data Filtering (SC2 Reader) Wins Losses Wins Losses
players. The AI was able to reach grandmaster rank, the highest rank in the Cluster 2 containing the largest win-loss
game, for all three races. However, little research has been done related to
PCA and K-means clustering ratio. For the human player repository, Cluster 1 64 22 342 428
Figure 1: Organization of project Cluster 2 contained the most games,
analyzing the actions the AI made in the game. PCA
with cluster 3 containing the largest win-
Cluster 2 63 1 6721 6901
design and game categorization via
This project aimed to analyze the actions made by the Blizzard SC2 AI as General cluster model
PCA and K-means clustering. loss ratio. Cluster 3 5 5 2248 1805
they related to resource allocation. The analysis consisted of analyzing the
AI’s actions after an attack, finding patterns and possible unique insights into Results Conclusions
its resource allocation strategy.
Using the playstyle classification repository games K-means clustering was The actions of the StarCraft II AI were successfully classified into distinct
Materials and Methods used to group the 47 games into three clusters (Graph 1). The games in each playstyles in relation to resource allocation. The AI was able to recover and
cluster were analyzed to create a list of Prioritization Playstyle win when prioritizing the development of both military and economy rather
The first stage of this multi-stage project (Figure 1) involved establishing commonalities (Table 1). As seen in Group Commonalities than one, in comparison to human players that were able to successfully
and building three replay repositories: playstyle classification (Control Player Graph 2, 160 games played by the SC2 AI Immediate spending recover when focusing on only one. The AI was unable to successfully
vs. AI), SC2 AI playstyle (AI vs. Control Player), and human player playstyle were analyzed using this list and classified of resources on recover when preferring to focus only on gathering and saving resources, over
(Player vs. Player). Military
accordingly, into the appropriate cluster. military related prioritizing a military, but human players were able to recover in the same
For the human player playstyle repository, a Python web scraping script objects scenario. The AI was the most successful in playstyles where the human
Table 1 (right): Description of actions that
was built to download replay files from public replay sites: Spawning tool, player was least successful and vice versa.
characterized each playstyle. Saving resources and
Sc2rep, and GggReplays. Replay files with the race match type “Protoss vs. Hybrid spending only when Further research could be done by developing a humanitarian aid-based AI
Protoss” and the map “2000 Atmospheres” were collected. Additionally, a Clusters of control player’s necessary with characteristics of the hybrid playstyle: equally managing goals and
Python script was developed to delete duplicate and corrupted files. playstyle resources, as this was most successful in gameplay.
The program, Sc2 Reader, on GitHub was used to extract data from all 2000 Saving resources and
1500
Cluster 2 Resources spending on workers
replay files. A separate Python program was created to extract specific data
from the Sc2 Reader data. Based on their respective repositories the data were
1000
500
and land expansion References
PC2

0
collected for specific time segments, based on game activity, and converted to -500
Vinyals, O., Babuschkin, I., Czarnecki, W. M., Mathieu, M., Dudzik, A., Chung, J.,
Cluster 3 Graph 1 (left): PCA allowed the
a tab separated file. -1000
Cluster 1 Choi, D. H., Powell, R., Ewalds, T., Georgiev, P., Oh, J., Horgan, D., Kroiss, M.,
reduction and standardization of
For the playstyle classification repository of 47 games, data from the -1500
features into two principal Danihelka, I., Huang, A., Sifre, L., Cai, T., Agapiou, J. P., Jaderberg, M., . . .
control player were recorded up to the first attack from the SC2 AI. Sixteen
-2000
-1500 -1000 -500 0 500 1000 1500 components, PC 1 and PC 2, Silver, D. (2019). Grandmaster level in StarCraft II using multi-agent
games were played prioritizing resource collection, 16 prioritizing military PC1
representing variances. reinforcement learning. Nature, 575(7782), 350–354. https://
Military Hybrid Resources Centroid
doi.org/10.1038/s41586-019-1724-z

You might also like