2 min readfrom Machine Learning

Training an AI to play Resident Evil Requiem using Behavior Cloning + HG-DAgge [P]

Our take

In this project, I’m training an AI agent to navigate a fast-paced escape sequence in Resident Evil Requiem using a hybrid approach of Behavior Cloning (BC) and HG-DAgger. By leveraging human demonstrations for initial policy learning, the agent mimics gameplay and refines its performance over time. Key challenges included managing instability when deviating from demonstrated trajectories and synchronizing actions with on-screen events.
Training an AI to play Resident Evil Requiem using Behavior Cloning + HG-DAgge [P]
Training an AI to play Resident Evil Requiem using Behavior Cloning + HG-DAgge [P]

Code of Project: https://github.com/paulo101977/notebooks-rl/tree/main/re_requiem

I’ve been working on training an agent to play a segment of Resident Evil Requiem, focusing on a fast-paced, semi-linear escape sequence with enemies and time pressure.

Instead of going fully reinforcement learning from scratch, I used a hybrid approach:

  • Behavior Cloning (BC) for initial policy learning from human demonstrations
  • HG-DAgger to iteratively improve performance and reduce compounding errors

The environment is based on gameplay capture, where I map controller inputs into a discretized action space. Observations are extracted directly from frames (with some preprocessing), and the agent learns to mimic and then refine behavior over time.

One of the main challenges was the instability early on — especially when the agent deviates slightly from the demonstrated trajectories (classic BC issue). HG-DAgger helped a lot by correcting those off-distribution states.

Another tricky part was synchronizing actions with what’s actually happening on screen, since even small timing mismatches can completely break learning in this kind of game.

After training, the agent is able to:

  • Navigate the sequence consistently
  • React to enemies in real time
  • Recover from small deviations (to some extent)

I’m still experimenting with improving robustness and generalization (right now it’s quite specialized to this segment).

Happy to share more details (training setup, preprocessing, action space, etc.) if anyone’s interested.

submitted by /u/AgeOfEmpires4AOE4
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Related Articles

Tagged with

#real-time data collaboration#financial modeling with spreadsheets#real-time collaboration#machine learning in spreadsheet applications#rows.com#natural language processing for spreadsheets#generative AI for data analysis#cloud-based spreadsheet applications#Excel alternatives for data analysis#no-code spreadsheet solutions#big data performance#Resident Evil Requiem#Behavior Cloning#HG-DAgger#AI agent#reinforcement learning#action space#gameplay capture#policy learning#preprocessing