Jump to content

Welcome to Rune Tips, the first ever RuneScape help site. We aim to offer skill guides, quest guides, maps, calculators, informative databases, tips, and much more to help you get the most from the Massive Online Adventure Game, RuneScape, by Jagex Ltd © 2009.

Report Ad

Welcome to Forum.Tip.It
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

RuneScape Experience Formula


  • Please log in to reply
12 replies to this topic

#1
Jard_Y_Dooku
[ Display Name History ]

Jard_Y_Dooku

    Hobgoblin Killer

  • Members
  • 1,700 posts
  • Gender:Male
  • Joined:5 September 2006
  • RuneScape Status:P2P
  • RSN:Jard Y Dooku
As you all know, with the release of dungeoneering, the maximum level we can now reach is 120. For many years, we have used the following formula to calculate the experience required for a particular level:

Posted Image

This formula can be written in a C-based computer language (C, C++, C#, Java, etc.) as follows (minor things may need to be changed depending on the language, this is just pseudocode):



and in PHP (since a lot of RuneScapers seem to be familiar with PHP more than any other language... probably due to the software most fan-sites use):



The above formula works perfectly for levels 1 through 100 (and 102). However, on levels 101 through 120, there are some inaccuracies... levels 101, 103-110 and 113-120 are 1 XP too high, and levels 111 and 112 are 2 XP too high. I find this a bit strange mathematically, but I am hoping that if we do some work, we can come up with a new formula that is accurate for all levels. The following code will calculate 100% accurate experience for all levels 1 to 120, but it is not defined mathematically. It just checks to see if the levels are the problematic ones I just mentioned, and subtracts 1 or 2 XP as needed.



So let's see what we can do about creating an accurate formula!
  • Never trust anyone. You are always alone, and betrayal is inevitable.
  • Nothing is safe from the jaws of the decompiler.

#2
Wingless
[ Display Name History ]

Wingless

    Hobgoblin Killer

  • Members
  • 1,707 posts
  • Gender:Male
  • Location:pl_upward
  • Joined:14 November 2007
  • RuneScape Status:Retired
  • RSN:Nephilim
inb4 http://runescape.wik...ship_with_Level

Otherwise:

Really good job! Did you find those by yourself? Looks like there was alot of insight going on - to much for my small brain ;^;
Can't wait to see what you come up with.

Posted Image


#3
Bier
[ Display Name History ]

Bier

    Bear Fur

  • Members
  • 433 posts
  • Gender:Male
  • Joined:8 June 2005
  • RuneScape Status:Semi-Retired
  • RSN:Bier
How do you know that the formula isn't accurate for the higher levels?
Posted Image

#4
Jard_Y_Dooku
[ Display Name History ]

Jard_Y_Dooku

    Hobgoblin Killer

  • Members
  • 1,700 posts
  • Gender:Male
  • Joined:5 September 2006
  • RuneScape Status:P2P
  • RSN:Jard Y Dooku

How do you know that the formula isn't accurate for the higher levels?


You can use the objectives interface to find the experience required for any skill level from 2 to 120, that's how we know the real XP right now.
  • Never trust anyone. You are always alone, and betrayal is inevitable.
  • Nothing is safe from the jaws of the decompiler.

#5
Nyosuht
[ Display Name History ]

Nyosuht

    Website Crew Alumnus

  • IRC Channel Staff
  • 1,821 posts
  • Gender:Not Telling
  • Joined:17 February 2007
  • RuneScape Status:P2P
  • RSN:Omnipotence
  • RSN2:Nyosuht


How do you know that the formula isn't accurate for the higher levels?


You can use the objectives interface to find the experience required for any skill level from 2 to 120, that's how we know the real XP right now.

Yeah, what he said.
Here is a table with the accurate data, along with the screenshots if you're interested.

rnHJQwZ.png
In a state of tranquillity, wealth, and luxury, our descendants would forget the arts of war and the noble activity and zeal which made their ancestors invincible. ~Samuel Adams; 1 August, 1776
There are men, in all ages, who mean to exercise power usefully; but who mean to exercise it. They mean to govern well; but they mean to govern. They promise to be kind masters; but they mean to be masters. ~Daniel Webster; 15 March, 1837


#6
ArtemisCatal
[ Display Name History ]

ArtemisCatal

    Unicorn Horn

  • Members
  • 183 posts
  • Gender:Female
  • Location:Arkansas, USA
  • Joined:6 June 2009
  • RuneScape Status:P2P
  • RSN:ArtemisCatal
I almost hate to say this, but we all know about Jagex and their crazy rounding problems (see exp weekend). Could the differences be acounted for by some compounding rounding error? Just throwing that out there.

#7
pulli23
[ Display Name History ]

pulli23

    Moss Giant Whipper

  • Members
  • 2,601 posts
  • Joined:9 March 2006
still the part
$ 2^level/7 $
Should be correct (as we clearly know the amount of experience doubles every 7 levels)

First they came to fishing
and I didn't speak out because I wasn't fishing

Then they came to the yews
and I didn't speak out because I didn't cut yews

Then they came for the ores
and I didn't speak out because I didn't collect ores

Then they came for me
and there was no one left to speak out for me.


#8
Toad
[ Display Name History ]

Toad

    Dragon Slayer

  • Members
  • 6,886 posts
  • Gender:Male
  • Joined:19 June 2004
  • RuneScape Status:Retired
That formulas old it's been on a site for a while here.. http://rsdo.net/RSDO...ce formula.html

It has tables to 200 there but we all know max is 126
Posted Image

#9
Jard_Y_Dooku
[ Display Name History ]

Jard_Y_Dooku

    Hobgoblin Killer

  • Members
  • 1,700 posts
  • Gender:Male
  • Joined:5 September 2006
  • RuneScape Status:P2P
  • RSN:Jard Y Dooku

I almost hate to say this, but we all know about Jagex and their crazy rounding problems (see exp weekend). Could the differences be acounted for by some compounding rounding error? Just throwing that out there.


I initially guessed that, but levels 111 and 112 are off by 2 XP, so it can't be that. It would have to be off by 1 and only 1 for it to be a rounding problem. Plus we'd have most probably noticed it in levels 1 through 100.
  • Never trust anyone. You are always alone, and betrayal is inevitable.
  • Nothing is safe from the jaws of the decompiler.

#10
greenmelf
[ Display Name History ]

greenmelf

    Bear Fur

  • Members
  • 276 posts
  • Joined:29 April 2007


I almost hate to say this, but we all know about Jagex and their crazy rounding problems (see exp weekend). Could the differences be acounted for by some compounding rounding error? Just throwing that out there.


I initially guessed that, but levels 111 and 112 are off by 2 XP, so it can't be that. It would have to be off by 1 and only 1 for it to be a rounding problem. Plus we'd have most probably noticed it in levels 1 through 100.

Not necessarily.

The problem is that the values for (1/4)(floor(n + 300 * 2^(n/7))) are 1 high for n equals 100, 102, 110 and 1 down for n equals 101 and 112. The rest of the values are off because of inclusion of the wrong values in their summation.

#11
Jard_Y_Dooku
[ Display Name History ]

Jard_Y_Dooku

    Hobgoblin Killer

  • Members
  • 1,700 posts
  • Gender:Male
  • Joined:5 September 2006
  • RuneScape Status:P2P
  • RSN:Jard Y Dooku



I almost hate to say this, but we all know about Jagex and their crazy rounding problems (see exp weekend). Could the differences be acounted for by some compounding rounding error? Just throwing that out there.


I initially guessed that, but levels 111 and 112 are off by 2 XP, so it can't be that. It would have to be off by 1 and only 1 for it to be a rounding problem. Plus we'd have most probably noticed it in levels 1 through 100.

Not necessarily.

The problem is that the values for (1/4)(floor(n + 300 * 2^(n/7))) are 1 high for n equals 100, 102, 110 and 1 down for n equals 101 and 112. The rest of the values are off because of inclusion of the wrong values in their summation.


I'm beginning to wonder if they intentionally messed up a few of the values to screw us up - meaning it's not a different formula at all.
  • Never trust anyone. You are always alone, and betrayal is inevitable.
  • Nothing is safe from the jaws of the decompiler.

#12
greenmelf
[ Display Name History ]

greenmelf

    Bear Fur

  • Members
  • 276 posts
  • Joined:29 April 2007
I think that I figured it out.
(Didn't test for all values, but worked right for all that I tried.)

Code in Java.
  public static int experienceForLevel(int level)
  {
    int total = 0;
    for (int i = 1; i < level; i++)
    {
      total += i + 300 * Math.pow(2, i / 7.0);
    }

    return (int)(total * 2.5);
  }

The experience values are stored as int type and just printed as experience/10 to truncate the 'decimal'. It makes sense to do it this way; it's just the most straight forward and efficient way to do it.

Edit:
Nevermind.
I just put my version, your peusdocode and the runescape.wikia code into my Java compiler, and all three got the same answer for every level and are all equal to the listed experience values given for each level on runescape.wikia.
I'm confused now, are those posted values wrong, or are all the formulas right?

#13
Jard_Y_Dooku
[ Display Name History ]

Jard_Y_Dooku

    Hobgoblin Killer

  • Members
  • 1,700 posts
  • Gender:Male
  • Joined:5 September 2006
  • RuneScape Status:P2P
  • RSN:Jard Y Dooku

I think that I figured it out.
(Didn't test for all values, but worked right for all that I tried.)

Code in Java.

 public static int experienceForLevel(int level)
 {
 int total = 0;
 for (int i = 1; i < level; i++)
 {
 total += i + 300 * Math.pow(2, i / 7.0);
 }

 return (int)(total * 2.5);
 }

The experience values are stored as int type and just printed as experience/10 to truncate the 'decimal'. It makes sense to do it this way; it's just the most straight forward and efficient way to do it.

Edit:
Nevermind.
I just put my version, your peusdocode and the runescape.wikia code into my Java compiler, and all three got the same answer for every level and are all equal to the listed experience values given for each level on runescape.wikia.
I'm confused now, are those posted values wrong, or are all the formulas right?


Last I checked, RS Wikia posted the wrong answers (the values that are off by 1 or 2 points).
  • Never trust anyone. You are always alone, and betrayal is inevitable.
  • Nothing is safe from the jaws of the decompiler.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users