| I recorded gameplay trajectories in RE4's village — running, shooting, reloading, dodging — and used Behavioral Cloning to train a model to imitate my decisions. Added LSTM so the AI could carry memory across time steps, not just react to the current frame. The most interesting result: the AI handled single enemies reasonably well, but struggled with the fight-or-flee decision when multiple enemies were on screen simultaneously. That nuance was hard to imitate without more data. Full video breakdown on YouTube. Source code and notebooks here: https://github.com/paulo101977/notebooks-rl/tree/main/re4 Happy to answer questions about the approach. [link] [comments] |
[P] I trained an AI to play Resident Evil 4 Remake using Behavioral Cloning + LSTM
Reddit r/MachineLearning / 3/29/2026
💬 OpinionIdeas & Deep AnalysisTools & Practical UsageModels & Research
Key Points
- The author trained an AI to play Resident Evil 4 Remake by recording gameplay trajectories (e.g., running, shooting, reloading, dodging) and using Behavioral Cloning to imitate observed decisions.
- They added an LSTM to give the model temporal memory across time steps, improving action decisions versus purely frame-by-frame imitation.
- In testing, the AI could handle single-enemy encounters reasonably well, but it struggled with higher-level tactical choices like fight-or-flee when multiple enemies were present.
- The post shares a YouTube breakdown and provides source code and notebooks via a GitHub repository, enabling others to replicate or extend the approach.
Related Articles

Black Hat Asia
AI Business

AutoGen vs CrewAI: A Comprehensive Benchmark and Selection Guide for 2026
Dev.to

64 Deepfake Laws Passed — And Investigators Still Can't Prove What's Real in Court
Dev.to

Building with TIAMAT: Live API Demos
Dev.to

I Built a Read-Only kubectl So AI Agents Can't Break My Cluster
Dev.to