Skip to main content
Log in

Unsupervised Hierarchical Clustering of Build Orders in a Real-Time Strategy Game

  • Published:
The Computer Games Journal

Abstract

Currently, no artificial intelligence (AI) agent can beat a professional real-time strategy game player. Lack of effective opponent modeling limits an AI agent’s ability to adapt to new opponents or strategies. Opponent models provide an understanding of the opponent’s strategy and potential future actions. To date, opponent models have relied on handcrafted features and expert-defined strategies, which restricts AI agent opponent models to previously known and easily understood strategies. In this paper, we propose size-first hierarchic clustering to cluster players that employ similar strategies in a real-time strategy (RTS) game. We employ an unsupervised hierarchal clustering algorithm to cluster game build orders into strategy groups. To eliminate small outlying clusters, the hierarchal clustering algorithm was modified to first group the smallest cluster with its closest neighbor, i.e., size-first hierarchal clustering. In our analysis, we employ a previously developed dataset based on StarCraft: Brood War game replays. In our proposed approach, principal component analysis (PCA) is used to visualize player clusters, and the obtained PCA graphs show that the clusters are qualitatively distinct. We also demonstrate that a game’s outcome is marginally affected by both players’ clusters. In addition, we show that the opponent’s faction can be determined based on a player’s transition between clusters overtime. The novelty of our analysis is the lack of expert-defined features and an automated stopping condition to determine the appropriate number of clusters. Thus, the proposed approach is bias-free and applicable to any StarCraft-like RTS game.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

References

  • Bakkes, S. C., Spronck, P. H., & Van Den Herik, H. J. (2009). Opponent modelling for case-based adaptive game AI. Entertainment Computing, 1(1), 27–37.

    Article  Google Scholar 

  • Dereszynski, E. W., Hostetler, J., Fern, A., Dietterich, T. G., Hoang, T. T., & Udarbe, M. (2011). Learning probabilistic behavior models in real-time strategy Games. In AIIDE.

  • Drachen, A., Canossa, A., & Yannakakis, G. N. (2009). Player modeling using self-organization in Tomb Raider: Underworld. In IEEE symposium on computational intelligence and games, 2009. CIG 2009 (pp. 1–8). IEEE.

  • Drachen, A., Thurau, C., Sifa, R., & Bauckhage, C. (2014). A comparison of methods for player clustering via behavioral telemetry. arXiv:1407.3950.

  • Farias, V. F., Moallemi, C. C., Van Roy, B., & Weissman, T. (2010). Universal reinforcement learning. IEEE Transactions on Information Theory, 56(5), 2441–2454.

    Article  MathSciNet  MATH  Google Scholar 

  • Gutierrez-Rodríguez, A. E., Martínez-Trinidad, J. F., García-Borroto, M., & Carrasco-Ochoa, J. A. (2015). Mining patterns for clustering on numerical datasets using unsupervised decision trees. Knowledge-Based Systems, 82, 70–79.

    Article  Google Scholar 

  • Hostetler, J., Dereszynski, E. W., Dietterich, T. G., & Fern, A. (2012) Inferring strategies from limited reconnaissance in real-time strategy games. arXiv:1210.4880.

  • Hsieh, J. L., & Sun, C. T. (2008). Building a player strategy model by analyzing replays of real-time strategy games. In IEEE International Joint Conference on Neural Networks, 2008. IJCNN 2008. (IEEE World Congress on Computational Intelligence) (pp. 3106–3111). IEEE.

  • Iuhasz, G., Munteanu, V. I., & Negru, V. (2014). A survey of adaptive game AI: Considerations for cloud deployment. In F. Zavoral, J. J. Jung, & C. Badica (Eds.), Intelligent distributed computing VII (pp. 309–315). Cham: Springer.

    Chapter  Google Scholar 

  • Leece, M., & Jhala, A. (2014). Opponent state modeling in RTS games with limited information using Markov random fields. In 2014 IEEE conference on computational intelligence and games (CIG) (pp. 1–7). IEEE.

  • Levy, K. J. (1975). Large-sample many-one comparisons involving correlations, proportions, or variances. Psychological Bulletin, 82(2), 177.

    Article  Google Scholar 

  • Ontanón, S., Synnaeve, G., Uriarte, A., Richoux, F., Churchill, D., & Preuss, M. (2013). A survey of real- time strategy game ai research and competition in starcraft. IEEE Transactions on Computational Intelligence and AI in Games, 5(4), 293–311.

    Article  Google Scholar 

  • Rousseeuw, P. J. (1987). Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. Journal of Computational and Applied Mathematics, 20, 53–65.

    Article  MATH  Google Scholar 

  • Stanescu, M., & Čertický, M. (2016). Predicting opponent’s production in real-time strategy games with answer set programming. IEEE Transactions on Computational Intelligence and AI in Games, 8(1), 89–94.

    Article  Google Scholar 

  • Synnaeve, G., & Bessiere, P. (2011). A Bayesian model for plan recognition in RTS games applied to StarCraft. In AIIDE.

  • Synnaeve, G., & Bessiere, P. (2012). A dataset for StarCraft AI & an example of armies clustering. In AIIDE workshop on AI in adversarial real-time games (Vol. 2012).

  • Tavares, A., Azpúrua, H., Santos, A., & Chaimowicz, L. (2016). Rock, paper, StarCraft: Strategy selection in real-time strategy games. In 12th artificial intelligence and interactive digital entertainment conference (AIIDE) (pp. 93–99).

  • Weber, B. G., & Mateas, M. (2009). A data mining approach to strategy prediction. In IEEE symposium on computational intelligence and games, 2009. CIG 2009 (pp. 140–147). IEEE.

  • Yasui, K., Kobayashi, K., Murakami, K., & Naruse, T. (2013). Analyzing and learning an opponent’s strategies in the RoboCup small size league. In Robot Soccer World Cup (pp. 159–170). Springer, Berlin.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Roy Hayes.

Ethics declarations

Conflict of interest

On behalf of all authors, the corresponding author states that there is no conflict of interest.

Ethical Approval

On behalf of all authors, this manuscript complied with all ethical guidelines.

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Hayes, R., Beling, P. Unsupervised Hierarchical Clustering of Build Orders in a Real-Time Strategy Game. Comput Game J 7, 5–26 (2018). https://doi.org/10.1007/s40869-018-0051-1

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s40869-018-0051-1

Keywords

Navigation