Jump to content

Dromedarii

Members
  • Posts

    3
  • Joined

  • Last visited

Reputation

0 Neutral
  1. Don't bother. I already know what you're likely to say. You could be thinking of two things: 1) Since the opponent very likely has low current HP ( 2) When combat calculations are conducted, your damage amount may be determined before it is determined whether your opponent regenerates HP or not. In which case, an otherwise lethal blow could have only damaged your opponent to 1 HP. That means your last hit will almost certainly be 1 damage. This effect increases the frequency of 1-damage killing hits. I did not model this because I do not know the exact nature of monster HP regeneration in combat. It is a legitimate research area if you choose to delve into this. My code has some features that show its effects but does not model it. Let me show you the damage.m text output of the data set I just gave you: [hide=damage("data.txt",6)] Columns: Damage Done per Opponent, Frequency, Relative Frequency (%), Min Combat Time (s), Mean Combat Time (s), Max Combat Time (s), Relative Frequency of 1-Damage Killing Hits (%) hpanalysis = 35.0000 166.0000 85.1282 7.2000 13.8072 26.4000 8.4337 36.0000 29.0000 14.8718 7.2000 14.5012 31.2000 13.7931 Columns: Damage, Frequency, Relative Frequency (%), Predicted Relative Frequency (%), Absolute Difference (%) damanalysis = 0.00000 247.00000 21.14726 21.14726 0.00000 1.00000 72.00000 6.16438 7.03149 -0.86710 2.00000 81.00000 6.93493 6.75106 0.18387 3.00000 72.00000 6.16438 6.47064 -0.30625 4.00000 62.00000 5.30822 6.19021 -0.88199 5.00000 80.00000 6.84932 5.90979 0.93953 6.00000 57.00000 4.88014 5.62936 -0.74922 7.00000 61.00000 5.22260 5.34893 -0.12633 8.00000 65.00000 5.56507 5.06851 0.49656 9.00000 66.00000 5.65068 4.78808 0.86260 10.00000 52.00000 4.45205 4.50766 -0.05560 11.00000 46.00000 3.93836 4.22723 -0.28888 12.00000 47.00000 4.02397 3.94681 0.07717 13.00000 55.00000 4.70890 3.66638 1.04252 14.00000 41.00000 3.51027 3.38596 0.12432 15.00000 30.00000 2.56849 3.10553 -0.53704 16.00000 34.00000 2.91096 2.82511 0.08585 Hit Attempts = 1168 Opponents Killed = 195 Average Damage Done per Opponent = 35.15 Average Opponent HP Regeneration Rate = 0.87 HP/Minute Average Combat Time = 14.38 Seconds Total Combat Time = 0 Hours, 46 Minutes, 43.2 Seconds Average DPS = 2.45 Predicted Average DPS = 2.40 Semi-Ideal Average DPS (Infinite HP) = 2.79 Ideal Average DPS (Infinite HP & Zero Defence) = 3.33 Damage Efficiency = 73.35% Predicted Damage Efficiency = 71.86% Model Accuracy = 97.97% Chance to Miss = 16.22% Chance to Hit = 83.78% Chance to Hit and Do Zero Damage = 4.93% Chance to Hit and Do Positive Damage = 78.85%[/hide] I did not show the graphs because I do not have access to MATLAB right now and gnuplot graphs look ugly.
  2. Yes, they are right before the 99's. Did you actually read much of what I posted? It seems like we're going too far off on a tangent on Java client randomness. Some things to keep in mind: (a) Jagex very likely does the combat-related calculations on its servers and only sends the results to the client (B) Jagex may not use SecureRandom on its servers as its RNG © Nonetheless, any RNG Jagex uses will likely be a PRNG (d) PRNG's are, for our analytical purposes, good enough And instead of trying to see whose Java knowledge is greater, how about actually getting something done? Install GNU Octave, learn the ropes and have a go with the stuff I posted. It should at least give you a few ideas. If you want you may port the code to Python or R and modify it as you please.
  3. Hello all, I have been researching this phenomenon for awhile now although right now I'm retired. Here are some results from some previous research: http://runescape.wikia.com/wiki/User:Dromedarii http://runevillage.com/ThePub/viewtopic ... 0&t=424658 I have not spent the hundreds of hours that compfreak847 has spent collecting data and I've always assumed practically random number generation. However I do have a few thousand data points to back some results up (not shown in the links above). The MATLAB code I used for analysis is somewhat outdated and is not fully accurate for some data sets I have. But it's good if you can work with MATLAB/GNU Octave. Since the above two links were last updated, I've wrote some small tidbits of MATLAB code in order to better understand things: [hide=Simple Combat Simulation]function combatsim(cth,maxhit,speed) % Simulates combat against infinite-HP opponent if nargin==0 cth=80; maxhit=12; speed=7; end clc pth=cth/100; delay=6-0.6*speed; data=0; for i=1:1000 pause(0) if rand <= pth data(i)=ceil((maxhit+1)*rand)-1; else data(i)=0; end plot(1:i,data,1:i,mean(data)*ones(i,1),1:i,pth*maxhit/2*ones(i,1)) end realmean=mean(data)/delay; predmean=pth*maxhit/2/delay; acc=100-100*abs(realmean-predmean)/realmean; fprintf('Actual ADPS: %.3f\n',realmean) fprintf('Predicted ADPS: %.3f\n',predmean) fprintf('Accuracy: %.2f%%\n',acc)[/hide] [hide=Thing that addresses concerns in RV topic]function probthing(maxhit) % Assumes 100% Chance to Hit and no HP regeneration % From 1 to max hit damage dealt only if nargin==0,maxhit=19;end triangle=fliplr(pascal(maxhit)); prob=zeros(1,maxhit); for damage=1:maxhit combovec=diag(triangle,maxhit-damage); probvec=(1/(maxhit+1)).^[1]'; prob(damage)=1-prod((1-probvec).^combovec); end plot(1:maxhit,prob,'-o') grid on xlabel('Total Damage Inflicted') ylabel('Probability')[/hide] Some sample data to wet your taste buds: [hide=Sample data set for "damage.m" Total Attack Skill]12 7 5 7 4 99 0 5 11 16 3 99 0 5 15 0 8 7 99 14 12 8 1 99 14 11 0 2 0 0 8 99 5 0 16 0 3 1 10 1 99 0 7 0 5 0 12 11 99 10 3 1 0 12 0 0 8 1 99 16 2 12 4 1 99 4 0 13 16 3 99 0 10 2 11 8 4 99 2 13 0 12 8 99 14 0 6 1 11 0 3 99 2 0 1 10 12 10 99 0 14 14 5 2 99 13 3 1 10 8 99 0 10 0 4 10 1 6 5 99 8 7 14 5 0 2 99 0 1 0 12 0 9 10 4 99 0 14 6 15 99 0 11 8 0 5 6 5 99 13 6 2 0 5 3 7 99 7 2 0 5 7 12 3 99 8 2 13 5 7 99 13 4 3 10 0 5 1 99 10 13 0 0 0 12 99 1 0 12 1 2 13 1 5 99 12 2 11 10 99 8 13 10 4 99 3 10 15 7 99 1 12 7 8 7 99 13 15 7 99 0 5 6 0 16 0 1 4 3 99 0 0 14 6 15 99 0 13 0 13 9 99 5 0 2 15 0 3 0 0 11 99 7 0 11 9 6 2 99 0 6 0 7 14 0 2 6 99 14 0 0 0 2 15 2 2 99 2 15 10 3 5 99 2 3 0 16 2 3 3 7 99 16 0 10 8 0 1 99 13 5 14 3 99 10 7 8 10 99 9 6 12 8 99 9 1 10 11 5 99 2 16 9 1 2 5 99 5 2 14 9 5 99 13 14 8 99 13 10 1 8 3 99 0 5 0 13 13 4 99 3 0 13 7 0 5 0 0 7 99 1 0 0 7 4 8 0 0 5 10 99 13 1 5 16 99 13 0 0 5 0 10 0 0 7 99 9 0 12 0 9 5 99 12 0 16 7 99 10 1 2 0 0 8 0 9 0 3 2 99 0 2 14 7 1 11 99 0 9 11 0 5 5 5 99 0 3 9 14 0 0 9 99 16 13 0 5 0 1 99 5 0 3 7 8 10 0 2 99 8 7 0 11 4 5 99 0 12 0 13 2 8 99 10 8 13 0 4 99 15 8 9 0 3 99 10 6 2 15 2 99 12 11 3 1 7 1 99 7 9 9 5 0 0 3 2 99 0 15 15 3 0 2 99 15 9 6 5 99 0 8 0 7 0 7 13 99 0 13 0 7 0 9 3 0 3 99 14 11 0 6 4 99 3 9 13 10 99 7 16 11 0 0 1 99 1 10 16 8 99 0 7 0 7 13 4 5 99 0 10 2 5 6 12 99 5 13 12 5 99 2 0 10 11 0 0 12 99 11 4 0 0 13 2 4 2 99 7 1 11 0 0 7 8 0 1 99 0 10 0 9 13 3 99 16 0 15 0 4 99 14 15 6 99 3 1 4 12 12 3 99 5 0 6 9 12 0 3 99 0 8 0 14 0 14 99 13 13 9 99 0 1 12 11 1 11 99 5 10 0 16 4 99 15 16 4 99 13 0 6 0 11 0 0 5 99 12 0 15 0 8 99 3 2 3 15 11 1 99 3 12 8 12 99 4 12 10 1 8 99 14 13 8 99 2 3 0 9 15 0 6 99 6 11 13 5 99 3 4 9 6 14 99 9 0 0 6 14 6 99 4 5 13 12 1 99 2 2 14 9 0 8 99 4 14 0 10 7 99 5 7 16 7 99 8 0 7 8 8 4 99 3 14 11 2 5 99 6 14 9 0 6 99 6 3 7 0 2 0 2 9 6 99 7 4 1 6 14 3 99 12 9 6 8 99 8 0 5 2 0 0 3 2 15 99 9 2 10 11 1 0 3 99 0 1 0 6 10 8 6 3 0 2 99 5 16 0 10 4 99 0 6 3 15 11 99 13 7 0 11 4 99 14 9 8 0 5 99 0 0 6 0 1 0 0 3 2 4 9 4 7 99 7 0 13 2 12 2 99 13 0 0 0 5 3 5 0 4 1 4 99 2 4 0 0 1 3 10 0 1 10 4 1 99 16 2 7 1 2 1 0 0 2 3 2 99 15 12 4 4 99 13 5 5 2 6 4 99 6 8 10 11 99 4 2 9 0 8 12 99 1 9 0 16 3 0 3 0 3 99 11 1 0 7 8 8 99 11 16 0 8 99 14 12 5 4 99 6 0 15 12 2 99 13 0 0 1 12 9 99 13 11 3 0 2 6 99 16 16 3 99 13 16 1 0 6 99 2 13 16 4 99 1 1 7 14 4 8 99 16 9 10 99 0 8 11 16 99 0 6 6 0 1 16 1 0 3 2 99 5 13 16 1 99 8 10 15 2 99 1 8 4 0 14 9 99 9 0 7 9 7 3 99 8 8 16 3 99 14 0 2 9 0 8 2 99 5 0 0 7 0 3 12 0 9 99 13 4 12 6 99 16 0 1 0 9 9 99 4 15 6 10 99 3 1 11 16 4 99 9 13 9 4 99 11 0 10 12 0 2 99 7 15 4 8 0 1 99 4 8 12 6 5 99 0 5 0 7 15 9 99 2 4 13 4 12 99 0 3 9 6 8 9 99 5 7 16 2 5 99 0 10 11 9 5 99 3 13 9 6 5 99 0 9 1 0 16 6 3 99 0 13 0 0 14 8 99 0 14 9 1 11 99 5 11 11 8 99 14 3 5 10 3 99 10 9 3 9 0 4 99 1 9 6 5 9 0 5 99 4 8 0 5 6 4 8 1 99 5 0 12 13 0 5 99 2 10 1 0 11 3 8 99 4 11 8 0 2 0 9 0 1 99 9 5 0 3 0 7 9 0 0 2 99 13 0 0 2 15 5 99 0 14 11 10 99 0 6 2 3 12 5 7 99 1 10 10 13 0 1 99 1 8 0 2 6 0 4 0 12 2 99 6 11 9 9 99 7 2 0 5 14 5 2 99 0 12 14 0 6 3 99 0 14 2 4 7 2 0 6 99 2 6 0 13 6 4 4 99 8 9 11 7 99 14 8 3 10 99 5 7 0 0 0 14 9 99 8 15 9 3 99 0 13 0 0 3 4 15 99 7 4 1 11 0 2 4 0 0 6 99 9 11 1 5 9 99 5 12 6 5 7 99[/hide] It's an old data set but a very good one. If you are going to use your own analysis code, I would not suggest you remove the 99's because the diminishing damage effect is significant and the 99's are important placeholders. BTW it's going to be nigh impossible to produce a complete, practically accurate Chance-to-hit calculator unless you end up being a Jagex Developer or somebody pays you very good money to do it.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.