How Reinforcement Learning Powers AI Bots in ‘Barbarian Battle 2’

This article details NetEase Zhiji and Dianhun Network's use of reinforcement learning, a distributed training framework, and middleware to create, train, deploy, and iterate AI robots for the game "Barbarian Battle 2", highlighting technical challenges, solutions, and the impact on player experience.

NetEase Smart Enterprise Tech+
NetEase Smart Enterprise Tech+
NetEase Smart Enterprise Tech+
How Reinforcement Learning Powers AI Bots in ‘Barbarian Battle 2’

On March 24, 2023, NetEase Zhiji partnered with Dianhun Network to showcase at GDC 35 the application of reinforcement learning‑based AI robots in the game Barbarian Battle 2 . The collaboration covered AI integration, training, deployment and iteration.

Key components:

Integration scheme: design of gameplay experience and access methods.

Robot training: SAR solution design, network architecture, large‑scale distributed training.

Robot deployment: multi‑difficulty and multi‑style AI interfaces, dynamic difficulty adjustment, private deployment support.

Robot iteration: model fine‑tuning or structural adjustments after major version updates.

Traditional rule‑based bots (FSM, behavior trees) cannot capture the complexity of human players, leading to predictable and unsatisfying behavior. Reinforcement learning (RL) trains an agent by interacting with the game environment, receiving rewards, and learning optimal policies, resulting in more human‑like and challenging AI.

To reduce training cost, NetEase Fuxi co‑developed the distributed RL framework RLEase , consisting of Workers that collect state‑action‑reward data from the game and Learners that train the model. Supporting modules include Stat for metrics, and Model Manager for model storage and opponent selection based on win‑rate.

The AI model processes multi‑head inputs (character, team, opponent, boss, map states) and outputs actions and value estimates (the latter used only during training). Feature engineering such as sector‑based mushroom counting, perception‑range limiting, and embedding‑based one‑hot replacement helps manage the large state space.

Curriculum learning gradually introduces more heroes and equipment, while reward shaping encourages desired behaviors (e.g., focusing fire on the boss). Three robot styles—cautious, aggressive, supportive—are created by adjusting reward weights.

AIBridge middleware abstracts the AI service, exposing simple APIs (GameStart, tick, GameEnd) so developers can integrate AI bots without deep RL knowledge.

Debugging includes real‑time data statistics, video replay analysis, and handling bugs that corrupt training data.

Overall, the project demonstrates that RL‑based AI bots can enhance player experience, and the presented solutions (RLEase, AIBridge, feature engineering, curriculum learning) address the challenges of cost, scalability, and integration.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

game developmentreinforcement learningDistributed TrainingGame AIAI bots
NetEase Smart Enterprise Tech+
Written by

NetEase Smart Enterprise Tech+

Get cutting-edge insights from NetEase's CTO, access the most valuable tech knowledge, and learn NetEase's latest best practices. NetEase Smart Enterprise Tech+ helps you grow from a thinker into a tech expert.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.