Train a neural network to PvP in Old School RuneScape using reinforcement learning.
Java
185
470 commits
updated Feb 11, 2024
This project leverages deep reinforcement learning, specifically PPO, and self-play techniques to develop an AI agent capable of mastering 'no honor' player versus player fights in Old School RuneScape (OSRS) (such as in Last Man Standing).
Project Components:
The training system launches and manages the simulation when training, though the simulation can be run on its own too. The training system also contains an API to serve trained models.
Note: A third component for evaluating the models in the live game as a third-party client plugin was developed but is not publicly available to prevent affecting the real game.
The most recent model version shows incredibly promising results. FineTunedNh maintained a near perfect win rate on the real game in LMS, primarily losing only due to the inherent randomness of the game.
Evaluation session stats:

Evaluation footage:

Win rate against scripted baseline throughout training

LMS! (note: this account was used for testing/data collection too, the final trained model has ~99% win rate)

First to 10k+ PvP Arena rank, and reached #1

In-game PvP Arena rank (the game really says this)

git clone https://github.com/Naton1/osrs-pvp-reinforcement-learning.By following these steps, you'll be able to set up the environment and start training your own AI agent. You'll also be able to serve the pre-trained models via an API.
This Python-based component encompasses the core machine learning system. It's the primary interface for training, orchestrating the entire training workflow, and facilitating connections to the simulation RSPS for training sessions. The system also includes a socket-based API for real-time predictions.
The Simulation RSPS project provides a platform for conducting simulated PvP fights, enhancing the training efficiency of the agent. It's built on top of a pre-existing private server: Elvarg RSPS.
Environment contracts are defined in contracts/environments, using JSON files that describe the actions and observations within each environment. These contracts are used by the two components listed above.
You can train a customized model on the simulation for any defined environment. To train on a new environment, you can add one (see below).
Experiment parameters are defined in a YAML file. There are several provided configurations. These configurations can be customized to produce train new and unique models.
See start a training job for more detailed information.
You can define a new environment in addition to the pre-existing environments. Use the already-implemented environments as a reference.
env-name.To use an existing model via API:
To play against the trained models on the simulation:
679 followers · starred Feb 2024
1,169 followers · starred Jan 2026
40 followers · starred Feb 2024
Train a neural network to PvP in Old School RuneScape using reinforcement learning.
Java
185
470 commits
updated Feb 11, 2024
This project leverages deep reinforcement learning, specifically PPO, and self-play techniques to develop an AI agent capable of mastering 'no honor' player versus player fights in Old School RuneScape (OSRS) (such as in Last Man Standing).
Project Components:
The training system launches and manages the simulation when training, though the simulation can be run on its own too. The training system also contains an API to serve trained models.
Note: A third component for evaluating the models in the live game as a third-party client plugin was developed but is not publicly available to prevent affecting the real game.
The most recent model version shows incredibly promising results. FineTunedNh maintained a near perfect win rate on the real game in LMS, primarily losing only due to the inherent randomness of the game.
Evaluation session stats:

Evaluation footage:

Win rate against scripted baseline throughout training

LMS! (note: this account was used for testing/data collection too, the final trained model has ~99% win rate)

First to 10k+ PvP Arena rank, and reached #1

In-game PvP Arena rank (the game really says this)

git clone https://github.com/Naton1/osrs-pvp-reinforcement-learning.By following these steps, you'll be able to set up the environment and start training your own AI agent. You'll also be able to serve the pre-trained models via an API.
This Python-based component encompasses the core machine learning system. It's the primary interface for training, orchestrating the entire training workflow, and facilitating connections to the simulation RSPS for training sessions. The system also includes a socket-based API for real-time predictions.
The Simulation RSPS project provides a platform for conducting simulated PvP fights, enhancing the training efficiency of the agent. It's built on top of a pre-existing private server: Elvarg RSPS.
Environment contracts are defined in contracts/environments, using JSON files that describe the actions and observations within each environment. These contracts are used by the two components listed above.
You can train a customized model on the simulation for any defined environment. To train on a new environment, you can add one (see below).
Experiment parameters are defined in a YAML file. There are several provided configurations. These configurations can be customized to produce train new and unique models.
See start a training job for more detailed information.
You can define a new environment in addition to the pre-existing environments. Use the already-implemented environments as a reference.
env-name.To use an existing model via API:
To play against the trained models on the simulation:
679 followers · starred Feb 2024
1,169 followers · starred Jan 2026
40 followers · starred Feb 2024