So You Want To Build A General Of The Dead Army

The General Of The Dead Army is a procedural content generation pipeline that uses defeated or low-resource enemy units as training data for a reinforcement learning agent. You feed it corpse-state examples from completed matches, it learns the inverse mapping — what a losing side should have done differently — and then generates synthetic training scenarios to close that gap. That is the short version. The long version is that it took me about three weeks to get my first stable build running. It starts with telemetry from games where the player lost. Position data, ability cooldowns, resource curves, death timestamps. You dump all of that into a replay buffer, then the pipeline reverses the outcome signal — instead of learning what led to victory, it learns what deviation from the losing pattern might have shifted the result. The model iterates on those deviations across thousands of synthetic replay rewrites. Eventually it spits out a ranked list of alternative decisions with confidence scores. Here is what nobody tells you up front: the pipeline does not care about your game's actual narrative or lore. It only cares about state transitions. If your match data has missing frames or desync issues, the dead army side of things will absorb those gaps as noise and generate garbage suggestions. I lost two full days debugging why the model kept recommending absurd ability rotations. Turns out my replay parser was dropping frames during team-fight chaos. Once I patched the parser to use raw network packets instead of the SDK's replay events, the signal-to-noise ratio jumped immediately.

Getting The Pipeline Running

You need a data collection layer, a replay parser, a reward-shaping module, and the training loop itself. I run everything on a single RTX 4090 with roughly 64 GB of RAM allocated to the replay buffer. The dataset size matters more than you might think. I stopped seeing meaningful improvement after about 12,000 logged losses across multiple skill brackets. Before that number, the General Of The Dead Army was basically just overfitting to one particular loss pattern — usually the early surrender or the last-stand panic. After that threshold, the suggestion quality actually stabilized. The configuration file is where most people mess up. Specifically the temporal discount factor. Set it too low and the model only notices decisions made in the last ten seconds of a match. Set it too high and the credit assignment becomes so diffuse that every suggestion sounds reasonable but helps with nothing. I settled on 0.92 for a standard MOBA structure and 0.87 for a faster tactical shooter. Those numbers are starting points, not rules.

One Practical Problem I Hit And How I Fixed It

During a test run with roughly 4,000 losses from a single rank tier, the General Of The Dead Army started generating extremely similar synthetic scenarios — like ten thousand near-identical rewrites of the same team-fight mistake. The model had hit a mode collapse on a specific play pattern. My workaround was to add a diversity penalty to the reward function. I measured scenario entropy using cosine distance between the action embedding vectors, then applied a small negative reward when similarity exceeded a threshold. It broke the repetition almost instantly and forced the generator to explore other failure branches. This is also where the tool shows its biggest weakness. It cannot generate useful suggestions for games with very few recorded losses — under about 500, the output is mostly random dressed up as analysis. And it struggles with games where the losing condition is structural rather than decision-based. If a map is inherently unfavorable or a hero pick is hard-countered, the pipeline will still try to find decision-level fixes that do not exist. I learned that the hard way after a friend asked me to run his entire season of Dota losses through the General Of The Dead Army and then expecting coaching-level advice. The output was technically coherent but directionally useless because the problem was draft phase, not in-game execution.

Get the Full Details

Albania: The General of the Dead Army : Book Review
Albania: The General of the Dead Army : Book Review

Where It Actually Helps

It is best used as a supplemental review tool, not a replacement for traditional VOD analysis. The General Of The Dead Army surfaces patterns you would not notice watching replays manually — decision clusters that appear across hundreds of losses but never in any single game. I have caught myself making the same positioning error in fifteen different matches before the pipeline even flagged it. That alone has been worth the setup time. If you are looking to pull this together yourself, the open-source repo is straightforward enough that anyone who has built a basic PPO trainer can adapt it. The hard part is always the data pipeline, not the training loop. Clean replays, consistent frame timing, and a diverse enough loss pool will get you further than tweaking hyperparameters.