Anafunctor Member
Posts : 17 Join date : 20160615
 Subject: A Comparative Analysis of Iron Mining  Dwarven Mine vs Rimmington Mine Sun Jul 31, 2016 8:26 am  
 I feel that not enough thought has been put into finding the best location for mining and banking iron ore. As such, I sought to find out the optimal rates for each location and various strategies at each. My results follow. Broad Conceptual DifferencesRimmington MinePros
 It's possible to always get most of a full inventory every trip (minus urns)
 There are four iron rocks in close proximity
 The location is often less crowded
Cons
 There was once a bot epidemic at this location. It's been sorted out now, but it could happen again
 The optimal rotation leaves no standing still time. This means both less afk time (for those inclined to afk) and that players with lower mining levels may miss a rock and not be able to catch up
 On more populated worlds, the rocks will spawn before you can get to them. This means that you don't gain any time from having a faster spawn rate.
 The bank is farther away
 Goblin Raids occasionally spawn at this mine. If you're low combat, only Hollowtoof is leftclickable. At higher combat, all the goblins are leftclickable. (Hopefully someday soon Jagex will add the option to only right click attack NPCs, as has been implemented in OldSchool).
Dwarven MinePros
 The deposit box is very close by
 The optimal rotation has a long waiting period. This means that players with lower mining levels can only potentially lose time by failing to get ore from a single rock in the rotation, rather than from every rock. This gap can also be filled by doing things which take minimal inventory space, such as high alchemy or mining the nearby coal, mithril and adamantite rocks.
 The gap time also means that if the respawn rate of the ores is increased, the gathering rate is also increased, because the gap diminishes.
Cons
 This location is often crowded.
 The bank is very far away (this is irrelevant if you don't use urns)
 If you're using urns, the early trips to the deposit box are very inefficient
 There are only 3 rocks in close proximity (if you know a way to integrate a fourth or fifth rock into a rotation without losing too much time, don't hesitate to comment)
 The scorpions here are aggressive to low level players. At higher levels, it's possible to misclick on a scorpion, which wastes some time.
Analysis of Optimal RatesRimmington Mine With UrnsFirst we'll figure out how much time it takes for one loop. Here, a loop is
 Teleporting with the clan vexillum
 Banking
 Running to the iron
 Filling an inventory with iron
Teleporting with the clan vexillum takes 5 ticks*. This will land you randomly in a 5x5 square whose northeast corner is the southernmost ritual stone (south of the citadel portal). It then takes an average of 6.6 ticks (averaged over these 25 squares) to get to the bank. I'll assume it takes 2 ticks to bank (it can take longer if you lag a lot when opening the bank). From the bank, there are 58 squares to the northern iron rock. This then takes 29 ticks to run. You will almost always mine 27 ores per inventory here (see my guide on urn management). Starting by standing at the northern rock, it will take 139 ticks to fill your inventory, assuming no loss (4 ticks for the first ore, then 6 loops of 4 ores and 21 ticks each, then finally two more ores, which takes 9 ticks  two running and 7 mining). You would then teleport with the clan vexillum, completing the loop. In all, it takes an average of 181.6 ticks to complete a loop, assuming no misclicks, gems etc. During this, you gain 27 iron ores, or an average of 1134 mining experience (remember that we're using urns). This amounts to 892 ores per hour and 37,467 experience per hour. *A tick is when all the action of Runescape takes place. If you click to move somewhere, you may notice a delay before you start moving. This affects movement (two squares per tick if running, one if walking), mining, and just about everything else in Runescape. A tick occurs roughly every 0.6 seconds, so in an hour there are 6000 ticks. Rimmington Mine Without UrnsHere, a loop is very similar, but you mine 28 ores per trip instead. It will thus take an extra 6 ticks to fill your inventory (2 ticks running + 4 ticks mining). In all, it takes 187.6 ticks on average to complete a loop. This amounts to 896 ores per hour and 31,343 experience per hour. Dwarven Mine Without UrnsA loop here is only slightly different than the above.
 Mining the iron
 Entering the resource dungeon and deposit the ores
 Returning to the iron rocks
Mining here depends heavily on the respawn time for iron rocks. The time it takes for iron to respawn depends on the population of the world you're on. For most f2p worlds. this is 17 ticks. However, if the world gets to 100 people or more, this will decrease to 16 ticks. If the population increases further (to somewhere between 388 and 589 people), the respawn time will decrease to 15 ticks. This last one typically only applies to World 3. In the first case, mining 28 ores takes 193 ticks (4 ticks for the first ore, then 9 loops of 3 ores and 21 ticks each). In the second case, in the first case, mining 28 ores takes 184 ticks (4 ticks for the first ore, then 9 loops of 3 ores and 20 ticks each). In the third case, in the first case, mining 28 ores takes 175 ticks (4 ticks for the first ore, then 9 loops of 3 ores and 19 ticks each). Running to the deposit box takes 8 ticks (including the 3 tick animation when entering. Once you're in, you can immediately click on the deposit box and skip the rest of the animation). I'll assume it takes 2 ticks to deposit the ores. It then takes 5 ticks to return to the iron rocks (there's no exit animation). This is then a total of 15 ticks to deposit the ores and return. In all, it takes 208 ticks to mine 28 ores for 808 ores per hour and 28,269 experience per hour. If the world population is more than 100, it'll take 199 ticks per inventory, for 844 ores per hour and 29,548 experience per hour. If the world population is more than 500(ish), it'll take 190 ticks per inventory, for 884 ores per hour and 30,947 experience per hour. Dwarven Mine With UrnsThis is the complicated one. To help us out, I wrote some code. The idea is that at each step, your current state is determined by how many ores are in your inventory, how many urns you have left, how full your current urn is, which iron rock you're standing at, and which iron rock is the next to spawn. This state completely determines your next action and what your state will be after that action. Using this idea, we can completely simulate an optimal loop, starting and ending with a clan vexillum teleport. The two basic strategies I'm testing determine how long you stay after you finish your last urn. The first says to finish off that inventory. The second says to bank right away. The time it takes for iron to respawn depends on the population of the world you're on. For most f2p worlds. this is 17 ticks. However, if the world gets to 100 people or more, this will decrease to 16 ticks. If the population increases further (to somewhere between 388 and 589 people), the respawn time will decrease to 15 ticks. This last one typically only applies to World 3. The code, should you wish to try it yourself, is below. It requires Python3 to be installed on your computer (available for free) as well as the matplotlib and itertools modules. When you install Python3, you should be able to find information on how to install modules.  Some Code:

 Code:
from itertools import product import matplotlib.pyplot as plt
def mining_test(strategy = 'End with Last Urn', respawn=17, initial_urns = 0): # strategy is 'Finish Inventory' or 'End with Last Urn' # respawn is the time in ticks it takes for the iron to respawn # initial urns is the number of urns you take with you # sorry for the FORTRAN style variables; I just wanted to make # it clear that these are hardcoded values, but they can be manually # changed if you disagree with them # start with the potentially contentious stuff # banking info TELEPORT_TIME = 5 # this is the clan vex teleport animation LAND_TO_BANK_TIME = 6.6 # Average number of ticks to the bank, # based on the 5x5 square that the clan vex # can land you in BANKING_TIME = 2 # I strongly believe this is actually somewhat # longer for the typical user, but it depends on # how much lag you experience when opening the bank BANK_TO_MINE_TIME = 45 # 89 or 90 squares to the ladder depending on # which side of the bank chest you start on # Either way it's 45 ticks INTO_MINE_TIME = 1 # assumes no loading time. Possible in NXT, # but unlikely in Java MINE_TO_GATE_TIME = 16 # 31 squares to the gate THROUGH_GATE_TIME = 1 GATE_TO_ROCK_TIME = 9
# deposit box info TO_DEPO_TIME = 8 # interestingly, this seems to be the same regardless of # which rock you start at, due to a little shortcut DEPO_TIME = 2 FROM_DEPO_TIME = 5 # The major reason this is shorter is that there's no # animation for exiting the resource dungeon
# mining rocks info # since the first two rocks are adjacent, you can save a tick by # clicking the second at the right time STARTING_ROCK_TIME = 4 SECOND_ROCK_TIME = 3 THIRD_ROCK_TIME = 5 RESPAWN_TIME = respawn # note: This is 17 if the world you're on has # 099 people. It decreases to 16 at 100+ people # on the world # decreases again at (something greater than 388, # less than 589).
# and now the indisputable stuff TOTAL_INVENTORY = 28 # the space you have for ores+urns # it could be decreased if you need extra space for # nature runes or something # average banking time # 85.6 ticks total # note: if you use the stairs entrance, this time is 90.6 # and you will start at the northern rock, rather than the southern two # Thus, it's recommended to already have at least 60 mining before doing # this, so you can go through the mining guild BANK_AVERAGE_TIME = TELEPORT_TIME+LAND_TO_BANK_TIME+BANKING_TIME\ +BANK_TO_MINE_TIME+INTO_MINE_TIME\ +MINE_TO_GATE_TIME+THROUGH_GATE_TIME\ +GATE_TO_ROCK_TIME TICKS_PER_HOUR = 6000 # This is actually typically less, # due to server lag IRON_XP = 35 # this is the time between when you get an ore from the third rock # and when you get an ore from the first rock # if the respawn time is too low, this switches to the time to walk # to the first rock and mine it FIRST_ROCK_TIME = max(RESPAWN_TIME+STARTING_ROCK_TIMESECOND_ROCK_TIME THIRD_ROCK_TIME, STARTING_ROCK_TIME + 5)
TOTAL_DEPO_TIME = TO_DEPO_TIME+DEPO_TIME+FROM_DEPO_TIME URN_XP = 325 URN_FILL_XP = URN_XP*5
# initialize the state state = dict() state['inv_space'] = TOTAL_INVENTORYinitial_urns # your current # available inventory # space if state['inv_space'] <= 0: return 0,0,BANK_AVERAGE_TIME,0 # if you don't have any space state['urn_xp'] = 0 # start with an empty urn state['total_xp'] = 0 # running total of xp state['urns'] = initial_urns # number of urns remaining state['ores'] = 0 # running total of ores mined state['time_taken'] = 0 # running total of ticks taken state['rock_at'] = 0 # which rock you're standing at (0, 1, or 2) state['rock_on'] = 0 # which rock you're going to next # these are all the possible actions def rock_time(at, on): # returns the amount of time from standing where you are # to the time that you get the next ore if (at, on) == (0, 0): return STARTING_ROCK_TIME elif (at, on) == (0, 1): return SECOND_ROCK_TIME elif (at, on) == (1, 2): return THIRD_ROCK_TIME elif (at, on) == (2, 0): return FIRST_ROCK_TIME else: return 1000000 #shouldn't ever happen. # This value is here so I know if it does # mining def add_iron_no_urn(state): # adds an iron under the assumption you have no urns state['time_taken'] += rock_time(state['rock_at'], state['rock_on']) shuffle_rocks(state) state['ores'] += 1 state['total_xp'] += IRON_XP state['inv_space'] = 1 def add_iron(state): # adds an iron and fills an urn state['time_taken'] += rock_time(state['rock_at'], state['rock_on']) shuffle_rocks(state) state['ores'] += 1 state['total_xp'] += IRON_XP state['inv_space'] = 1 state['urn_xp'] += IRON_XP tele_urns(state) def shuffle_rocks(state): # when you move and mine a rock, things change state['rock_at'] = state['rock_on'] state['rock_on'] += 1 state['rock_on'] %= 3 def tele_urns(state): # remove urns, get xp, get inventory space while state['urn_xp'] >= URN_FILL_XP: state['urns'] = 1 state['urn_xp'] = URN_FILL_XP state['inv_space'] += 1 state['total_xp'] += URN_XP def still_going_sequence(state): # where you are if you're still mining and you have urns if state['inv_space'] <= 0: depo_trip(state) else: add_iron(state) def no_urns_sequence(state, done): # where you are if you don't have urns if strategy == 'Finish Inventory': # finish inventory first inv_full = False while not inv_full: if state['inv_space'] <= 0: inv_full = True else: add_iron_no_urn(state) done = True return to_bank(state) elif strategy == 'End with Last Urn': # immediately bank return to_bank(state) else: return to_bank(state) # banking def depo_trip(state): # go to the deposit box and back state['time_taken'] += TOTAL_DEPO_TIME state['inv_space'] = TOTAL_INVENTORYstate['urns'] state['rock_at'] = 0 state['rock_on'] = 0 def to_bank(state): # go to the bank, tally up totals state['time_taken'] += BANK_AVERAGE_TIME return (state['ores'], state['total_xp'], state['time_taken']+0, state['ores']/state['time_taken']*TICKS_PER_HOUR, state['total_xp']/state['time_taken']*TICKS_PER_HOUR) # our actual simulation loop done = False while not done: if state['urns'] <= 0: return no_urns_sequence(state, done) else: still_going_sequence(state) if __name__ == '__main__': # we want graphs for both strategies and for respawn = 17, 16, or 15 strategies = ['Finish Inventory', 'End with Last Urn'] respawn_times = [17,16,15] for strat, resp in product(strategies, respawn_times): data = list((k, mining_test(strat, resp, k)) for k in range(28)) maxim = max(data, key = lambda x:x[1][3]) print('Maximum ores: ', 'Urns: '+str(maxim[0]), 'Ores per hour: '+str(maxim[1][3]), 'XP per hour: '+str(maxim[1][4])) maxim = max(data, key = lambda x:x[1][4]) print('Maximum xp: ', 'Urns: '+str(maxim[0]), 'Ores per hour: '+str(maxim[1][3]), 'XP per hour: '+str(maxim[1][4])) plt.plot([y[3] for x,y in data]) plt.xlabel('Number of starting urns') plt.ylabel('Ores per Hour') plt.title('Strategy: '+strat+\ ' and Respawn Time: '+str(resp)) plt.show() plt.plot([y[4] for x,y in data]) plt.xlabel('Number of starting urns') plt.ylabel('Experience per Hour') plt.title('Strategy: '+strat+\ ' and Respawn Time: '+str(resp)) plt.show()
Using that, we get some graphs.  Graphs:

 13 Urns, 799 ores per hour, 33,404 experience per hour:

 13 Urns, 832 ores per hour, 34,786 experience per hour:

 (for max xp) 13 Urns, 868 ores per hour, 36,288 experience per hour
(for max ores) 11 Urns, 868 ores per hour, 36,285 experience per hour: 
 13 Urns, 798 ores per hour, 33,532 experience per hour:

 13 Urns, 831 ores per hour, 34,909 experience per hour:

 13 Urns, 867 ores per hour, 36,404 experience per hour:

As you can see, all of these optimal rates are under the optimal rate for Rimmington Mine. ConclusionEfficiencywise, Rimmington Mine is unquestionably better. The only cons that have an unquantified effect are the spawning of goblin raids, the fact that Rimmington is less forgiving of missed ticks, and the possibility of another bot epidemic. If f2p were to become much more popular and a sufficient number of worlds had populations of 750 or more, this would swing around back to the Dwarven Mine (the optimal xp rate is 39,745 xp/hour if there are 900+ players on the world and does not increase beyond this). Additionally, you can see that using urns increases the experience rate significantly, while not dropping the ore rate by very much. Some calculations (which you can do yourself! ) would show that it's always better to use urns, even if you include the time required to make them. As always, feel free to point out any errors or things that you think you could do better. I'm in search of the truth; I'm not trying to prove something I already think is true. I'm especially interested in the possibility of integrating the other two iron rocks in the Dwarven Mine. If you can tell me your rotation, I can test it in a similar manner. UPDATE: Added more graphs, showing both ores/hour and xp/hour. Also added more analysis for Dwarven Mines without Urns.
Last edited by Anafunctor on Sun Jul 31, 2016 7:24 pm; edited 3 times in total 
