Akliji Works
2026Research Publication

Real-Time Probabilistic Enemy Decision Making in Survival Games

Paper cover: four cues feed a Bayesian network, which picks Fight, Hold, or Strike in a Behavior Tree
Project SnapshotResearch Publication
01

Project Overview

Enemies in survival games often flip between attacking and holding back when signals conflict, which players read as indecision. This paper adds a small Bayesian network on top of a standard Behavior Tree. Every frame, it weighs four cues (own health, opponent health, nearby enemies, and nearby allies) and commits to one tactic: fight, hold position, or go for a decisive strike. The result is enemies that act with clearer intent, react faster, and behave the same way every run, so they stay easy to tune and debug. Published by IEEE in the ICCRAIDS 2026 proceedings, co-authored with Hanny Haryanto.

02

The Challenge

  • Enemies that switch tactics too often look indecisive and break immersion.
  • Conflicting signals, such as a weak opponent while the enemy itself is hurt, are hard to resolve with fixed thresholds.
  • Heavier AI methods such as machine learning or online search are often opaque, unpredictable, and costly to run every frame.
  • Designers need enemy behaviour they can read, tune, and reproduce.
03

The Solution

  • Probabilistic decisions: a discrete Bayesian network combines four live cues into a probability for each tactic, then commits to the most likely one.
  • Fits existing Behavior Trees: the decision passes through the blackboard as a single value, so designer-made subtrees keep working unchanged.
  • Tunable as data: enemy tendencies live in an 81-row table stored as JSON, adjustable without touching code.
  • Reproducible by design: the same situation always produces the same decision, so any behaviour can be replayed and fixed.
  • Built for real time: a constant, allocation-free cost per enemy, tested with 24 enemies at 60 frames per second.
04

How It Was Tested

  • Compared against a standard threshold-based Behavior Tree, with identical content in both.
  • Two arenas: a tight 40 × 20 m indoor corridor with frequent cover, and an open 120 × 80 m ridge with long sightlines.
  • Three measures: how often enemies change tactics, how fast they react to new information, and processing cost per enemy.
05

Outcome & Reflection

  • Up to 36% fewer tactic switches (18.0 down to 11.5 per minute), so enemies act with clearer intent.
  • Up to 32% faster reactions (155 ms down to 105 ms after the situation changes).
  • About 0.008 ms extra per enemy per frame, well within a 60 fps budget.
  • Published by IEEE and presented at ICCRAIDS 2026 in Banyumas, Indonesia.
06

Tech Stack

A focused stack selected for the project requirements, platform constraints, and delivery scope.

UnityC#Discrete Bayesian NetworkBehavior TreeJSON