Reinforcement Learning in FlipIt

Laura Greige, Peter Chin

Abstract

Reinforcement learning has shown much success in games such as chess, backgammon and Go. However, in most of these games, agents have full knowledge of the environment at all times. In this paper, we describe a deep learning model in which agents successfully adapt to different classes of opponents and learn the optimal counter-strategy using reinforcement learning in a game under partial observability. We apply our model to FlipIt, a two-player security game in which both players, the attacker and the defender, compete for ownership of a shared resource and only receive information on the current state of the game upon making a move. Our model is a deep neural network combined with Q-learning and is trained to maximize the defender's time of ownership of the resource. Despite the noisy information, our model successfully learns a cost-effective counter-strategy outperforming its opponent's strategies and shows the advantages of the use of deep reinforcement learning in game theoretic scenarios. We also extend FlipIt to a larger action-spaced game with the introduction of a new lower-cost move and generalize the model to $n$-player FlipIt.

Introduction

In cybersecurity, Advanced Persistent Threats (APTs) represent a significant challenge due to their stealthy nature. Unlike traditional attacks, APTs remain within a network for extended periods, making detection difficult. Standard game-theoretic models often fail here because they assume perfect information regarding the system's state and the opponent's payoffs.

To address this, the authors utilize FlipIt, a game that models stealthy competition for a shared resource. In FlipIt, players only learn the current state of ownership when they take an action to "flip" the resource. Each flip incurs a cost, while ownership generates a reward over time. The core challenge lies in scheduling moves to maximize net benefit under significant uncertainty.

FlipIt game mechanics showing players P1 and P2 competing for resource ownership over time.

Methodology

The study employs a Deep Q-Network (DQN) to navigate the partially observable environment of FlipIt. The DQN architecture consists of three fully connected layers with ReLU activations.

State and Reward Design

The agent's state space is defined by its internal history: the time elapsed since its last move and the time since it last observed an opponent's move. The reward function balances the benefits of ownership against the costs of flipping.

Extensions: The "Check" Move

A significant contribution of this work is the introduction of a "Check" move. This lower-cost action allows the agent to observe the current owner of the resource without attempting to seize control. This adds a layer of strategic information-gathering to the game. Training utilized standard reinforcement learning techniques, including experience replay and an $\epsilon$-greedy exploration strategy.

Results and Analysis

The DQN agent was tested against three primary opponent strategies: Periodic, Periodic with Random Phase, and Exponential (Poisson process).

Final scores vs. episode number for DQN agents against Periodic, Periodic with Random Phase, and Exponential opponent strategies.

As shown in the figures above, the DQN successfully converges to optimal or near-optimal strategies across all scenarios. Against periodic opponents, the agent learns to synchronize its flips to reclaim ownership immediately after a loss. Notably, against a periodic opponent with a period of 10, the agent reached the theoretical maximum benefit of 200 within 400 iterations.

Key Insights

  • The "Drop Out" Strategy: When faced with an overly aggressive opponent where defense costs exceed ownership rewards, the DQN learns to stop playing entirely, which is the optimal strategy for maximizing the net score in such cases.
  • Information Value: The "Check" move proves valuable in budget-constrained scenarios, allowing for informed decision-making regarding when to commit to a full "Flip."
  • Scalability: The model generalizes well to $n$-player scenarios, effectively treating multiple attackers as a single, more complex aggregate opponent.

Conclusion

This research demonstrates that deep reinforcement learning can effectively master games with partial observability and "noisy" feedback. The DQN agent outperformed traditional renewal strategies and showed robustness to different opponent behaviors. Future work will explore the utility of the "Check" move under strict budget constraints, team-based dynamics, and the introduction of probabilistic success rates for moves to further mirror real-world cybersecurity environments.

Summary updated

BibTeX
@inproceedings{greige2021reinforcement,
  author = {Laura Greige and Peter Chin},
  title = {{Reinforcement Learning in FlipIt}},
  booktitle = {COMPLEX NETWORKS},
  year = {2021},
  url = {https://openreview.net/forum?id=RphY_N7HskZ},
}
Figure