Adaptive AI Engine for RTS Games

Discussing the theory and practice

Situation Assessment for Plan Retrieval in Real-Time Strategy Games

Posted by Ogail on May 12, 2010

  • Abstract:
    • Case-Based Planning (CBP) is an effective technique for solving planning problems that has the potential to reduce the computational complexity of the generative planning approaches. However, the success of plan execution using CBP depends highly on the selection of a correct plan; especially when the case-base of plans is extensive. In this paper we introduce the concept of a situation and explain a situation assessment algorithm which improves plan retrieval for CBP. We have applied situation assessment to our previous CBP system, Darmok, in the domain of real-time strategy games. During Darmok’s execution using situation assessment, the high-level representation of the game state i.e. situation is predicted using a decision tree based Situation- Classification model. Situation predicted is further used for the selection of relevant knowledge intensive features, which are derived from the basic representation of the game state, to compute the similarity of cases with the current problem. The feature selection performed here is knowledge based and improves the performance of similarity measurements during plan retrieval. The instantiation of the situation assessment algorithm to Darmok gave us promising results for plan retrieval within the real-time constraints.
  • A Situation is a high-level representation of the state of the world. For example, in the WARGUS domain the player might be in an attacking situation, or in a base development situation, among others.
  • Situations can be predicted based on raw features that can be directly computed from the game state, i.e. shallow features.
  • However, shallow features by themselves are not strong enough for selection of a strategy in a game. Additional derived deep features for a situation are needed.
  • For example, shallow features, like the ratio of a player’s resources to that of the opponent, by themselves are less suggestive of usefulness of an appropriate strategy. However deeper features, like knowing the existence of path or a barrier between the player and its opponent, can help in choosing a rush or a tunneling strategy.
  • Situation Assessment is a process of gathering high-level information using low-level data to help in better decision making.
  • Our general situation assessment technique comprises of four steps:
    • Shallow feature selection.
      • During this first step, a situation annotated trace is provided to a feature selection algorithm. An annotated trace consists of a sequence of world states annotated with the set of shallow features computed for each world state and the appropriate situation that world state corresponds to. This algorithm returns the set of shallow features which have high information gain. Specifically, in Darmok, we have used best-first greedy hill-climbing algorithm. For filtering the high information gain shallow features.
    • Model generation.
      • In this step the following three models are generated:
        • The Situation-Classification Model, , is built by providing and to a classification algorithm. This model is useful for classification of a world state to a situation using shallow features in . In Darmok, we have used a standard algorithm inducing a decision tree classifier model.
        • The Situation-Case Model, , provides a mapping from the set of situations to a subset of cases in the case-base . It can be built using statistical or empirical analysis. This model captures the intuition that not all the cases will be useful in all the situations.
        • The Situation-Deepfeature Model, , provides a mapping from to deep features in the set . This mapping is done using a feature selection algorithm or by using empirical knowledge.
    • Model execution.
      • In this third step, the models generated in the previous step are executed to get the current situation , the subset of cases from the case-base C and the subset of deep features which are most relevant to s. s is obtained by running over . Once s is known, using and , C’ and are obtained respectively.
    • Case retrieval.
      • This is the last step where using and the most similar case in retrieved from C0 using normal retrieval techniques
  • Situation Assessment Working Mechanism:
    • Firstly, a subset of shallow features is selected which are used for classification of a game state into a situation.
    • Then three models:
      • For classification of game state into situations based on shallow features.
      • For mapping of situations to cases.
      • For mapping of situations to deep features respectively are generated.
  • Shallow features are generally computationally inexpensive but lack the high-level inferential knowledge about the world.
  • The deep features are generally computationally expensive but provide information very relevant for case selection in specific situations.

  • How Situation Assessment is applied in Darmok:
    • The Offline Stage: comprising of Feature Selection and Model Generation before the game-play.
    • The Online Stage: comprising of Model Execution and Plan Retrieval during the game-play.
  • We perform situation assessment in two stages since the models required for predicting the situation during Darmok’s game-play are built just once at the start. Therefore, the models can be easily generated offline using standard feature selection and classification algorithms

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: