Hostname: page-component-76d6cb85b7-kcxw8 Total loading time: 0 Render date: 2026-07-10T21:40:26.511Z Has data issue: false hasContentIssue false

Reinforcement actor-critic learning as a rehearsal in MicroRTS

Published online by Cambridge University Press:  08 November 2024

Shiron Manandhar
Affiliation:
School of Computing Sciences and Computer Engineering, University of Southern Mississippi, Hattiesburg, MS 39406, USA
Bikramjit Banerjee*
Affiliation:
School of Computing Sciences and Computer Engineering, University of Southern Mississippi, Hattiesburg, MS 39406, USA
*
Corresponding author: Bikramjit Banerjee; Email: Bikramjit.Banerjee@usm.edu
Rights & Permissions [Opens in a new window]

Abstract

Real-time strategy (RTS) games have provided a fertile ground for AI research with notable recent successes based on deep reinforcement learning (RL). However, RL remains a data-hungry approach featuring a high sample complexity. In this paper, we focus on a sample complexity reduction technique called reinforcement learning as a rehearsal (RLaR) and on the RTS game of MicroRTS to formulate and evaluate it. RLaR has been formulated in the context of action-value function based RL before. Here, we formulate it for a different RL framework, called actor-critic RL. We show that on the one hand the actor-critic framework allows RLaR to be much simpler, but on the other hand, it leaves room for a key component of RLaR–a prediction function that relates a learner’s observations with that of its opponent. This function, when leveraged for exploration, accelerates RL as our experiments in MicroRTS show. Further experiments provide evidence that RLaR may reduce actor noise compared to a variant that does not utilize RLaR’s exploration. This study provides the first evaluation of RLaR’s efficacy in a domain with a large strategy space.

Information

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2024. Published by Cambridge University Press
Figure 0

Table 1. Summary of common notations used with variations in the paper

Figure 1

Figure 1. The actor network used for all three agent types. Neural network layers are shaded in blue. Inputs ($\omega$) are shaded in yellow, and outputs (samplings from softmax layers) are shaded in pink. Here, $N_E$ is the number of entities owned by any player, $N_A$ is the number of actions allowed, $N_T$ is the number of entity-types that can be produced, and $N_L$ is the number of locations that can be attacked. Masks are computed from inputs to suppress, and thus reduce, the support of softmax distributions. For instance, only the visible locations that contain opponent entities are allowed to be activated for sampling ‘Attack Location Index’.

Figure 2

Figure 2. The critic network used for RLAlpha and RLaR agents. Neural network layers are shaded in blue. Inputs are shaded in yellow. $\omega_t$ and $\omega^-_t$ contain the same components (from the perspectives of the player and its opponent, respectively) as shown in Figure 1’s input.

Figure 3

Figure 3. The prediction network used for the RLaR agent. Neural network layers are shaded in blue. Inputs are shaded in yellow. One of the inputs is from the output layer of the policy/actor network ($\pi_{t-1}$) shown in Figure 1. This network minimizes 2 standard loss components: latent loss (KL divergence between the captured distribution and standard Gaussians (${\mathcal{N}}(0,I)$), shown in red double-headed arrow), and a reconstruction loss measured by the cross entropy between the input $\omega^-_t$ and predicted $\hat{\omega}^-_t$. A third loss function (entropy of the captured conditional distribution) is added to the actor network’s loss and does not participate in training this network.

Figure 4

Figure 4. The 4 maps used in our experiments. White cells are unobserved, purple cells are observed by both blue and red teams. The learning agents always assume the role of the blue team, but there is no advantage to either role due to initial symmetry. The red team is MicroPhantom.

Figure 5

Figure 5. Learning curves of RLAlpha (RLAlpha+A2C+SIL) and RLaR (RLaR+A2C+SIL) against MicroPhantom in 4 maps. Baseline RL (A2C+SIL) is excluded due to poor performance. The terminal reward for win/loss/draw are +1000/–1000/+50. The initial policy/actor was trained by supervised learning from games between MentalSeal and MicroPhantom on large set of maps, but performs poorly in (a).

Figure 6

Figure 6. Win percentages of intermediate policies in 4 maps. Policies were saved at intervals of 100 games during training, and evaluated against MicroPhantom later.

Figure 7

Table 2. Performance of final/trained policies for 3 variants in 4 maps, in terms of the rewards against MicroPhantom averaged over 100 games and over 6 trials.

Figure 8

Table 3. Win percentages of final/trained policies for 3 variants in 4 maps, in terms of the percentages of wins (no loss/draw) against MicroPhantom averaged over 100 games and over 6 trials.

Figure 9

Figure 7. Plots showing the number of steps that the learner needs before at least one of its units gets within a distance threshold of 4.0 of the opponent’s base, thereby bringing it within the radius of the learner’s visibility.

Figure 10

Table 4. Win(W)/Loss(L)/Draw(D) percentages of the best RLaR policy against 4 scripted opponents in 4 maps over 100 games