Skip to content
forked from ocram444/EldenRL

Reinforcement Learning for Elden Ring on Windows11

License

Notifications You must be signed in to change notification settings

dan1109/EldenRL

Repository files navigation

EldenRL - Elden Ring Ai

Reinforcement Learning for Elden Ring on Windows11.

The goal of this project is to create a basic working version of a reinforcement learning agent for Elden Ring. The agent should be able to fight all bosses if trained long enough on them.

Description

This project uses a custom OpenAI gym environment that feeds the agent a picture of the game, previous actions, and health. The agent then decides an action to take and is rewarded based on damage delt to the boss, damage taken and some other rewards. For now only bosses behind fog gates (no open world bosses) are implemented but it shouldnt be too hard to adjust the code for open world bosses too.
It is programmed with modularity in mind. It should be fairly easy to hook in other actions, observations, rewards or any other functions you may want.
Learning and decision making is completely handled by Stable-Baselines3 using PPO and the custom environment.
The code is written 100% in python for Windows11.
It runs at ~2.4fps on my i9 13900k CPU with the game running normally on my GPU.

Other

  • You should probably launch Elden Ring in offline mode if you dont want to end up getting banned from online play. I am not doing that and I havent been banned yet though...
  • Letting the Ai fight/train in pvp matches is probably not happening any time soon. But it could be possible...
  • Fighting groups of enemies / non boss encounters in the open world is also something I would like to see. But nothing has been done for that yet.
  • Walking to the boss/fog gate is hard coded for every boss. I kind of want to create a seperate Ai that navigates the open world but I cant really think of any way to achieve that yet...
  • I'll be working more on this project with Twitch integration and some extra stuff. I do not expect that I will be pushing that to this depository. This is purely the bot that plays/trains fighting Elden Ring bosses.
  • You may use this for any of your own projects. Again, it should be fairly easy to expand on the functionality.
  • I cant upload my basic trained model to GitHub because it is too big a file. Please train your own by setting RESUME = False in train.py

Credits

Huge shoutout to Jameszampa and Lockwo for doing a lot of the ground work. I couldnt have done it without them.
If you are interested in this bot you may also like to check out their projects.

About

Reinforcement Learning for Elden Ring on Windows11

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%