Skip to main content

Mathematical Functions & Optimization Calculations for OSRS

Project description

Old School Runescape Math (osrsmath)

This project houses python code that implements various equations used in the game, primarily focused on combat mechanics. Built upon this are some applications that attempt to optimize game play or otherwise apply these equations. Having these models in a powerful programming language like Python allows novel problems to be solved. The applications are currently unpolished and not very user friendly, but here is a list of apps:

Application File Description
Path apps/ For a given set of equipment: What is the most efficient way to train from a given attack and strength level to a desired level in nmz?
Optimize apps/ Use a genetic algorithm to find a near optimal equipment setup and/or opponent(s) for maximum experience rates. (In progress)
Nightmare Zone (nmz) apps/ How much experience per hour should you expect from various setups?
Single Opponent apps/ Straight forward combat analysis versus a single opponent.

At this point in time, they don't currently provide interfaces, so you would have to edit the files, then run those scripts to use them. This will change in the future.


To get the code, simply run pip install osrsmath

To check that everything is working, in the command line run

python -m osrsmath.apps.path

If your environment supports graphical displays, you should get an image like: Image of Training Scheme otherwise you should at least get the saved image in the current directory.

Alternatively, since at the moment there is not interface to access the apps, you may wish instead to download the code files, run the setup script, and explore from there:

	git clone
	cd OSRS-Combat/osrsmath
	python -e .

Then edit /apps/ (for example), and run python /apps/

Running the tests

Coming soon!

Built With

  • osrsbox - Provides Data files
  • dijkstar - Implements the dijkstra Algorithm


  • Nawar Ismail - Initial work - Palfore


This project is licensed under the MIT License - see the file for details


Project details

Release history Release notifications

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for osrsmath, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size osrsmath-0.0.1-py3-none-any.whl (630.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size osrsmath-0.0.1.tar.gz (583.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page