Knight Online

Knight Online

That One Orc Apr 9, 2016 @ 12:06am
I made an Anvil Simulator :D
Hello everyone! There seems to be a lot of question regarding the anvil. I have taken a bit of my time to create an anvil simulator. I used matlab as my platform, and for background I am a Mechatronics engineer with minors in math & business from Colorado State-University. Number theory and data manipulation is a fun hobby of mine and I enjoy putting numbers to visuals. I made this simulator this evening in about 8 hours.

Assumptions:
Each upgrade is subject solely to RNG (burns before have no effect)
Initial Investment is divided statistically to a correct ratio of items and scrolls.
For example:

Rates are:
+1-2: 1.0
+2-3: 1.0
+3-4: .90
+4-5: .85
+5-6: .60
+6-7: .30
+7-8: .10
+8-9: .05
+9-10: .01

What is this for exactly?
This program can run simulations of upgrading items on the anvil, and then simulations of those simulations resulting in an NxN matrix of upgrading possibilties. Taking the averages, or trends, of these resulting matricies will yield us a fairly average upgrade path, whether profitable or not. All calculations are done with array or matrix operations to save calculation time and memory.

1)


For an example, I will begin with upgrading Chitin +5 to +7 since this was a very popular thing. I assume that:

Each scroll used is 90,000
I buy all the chitin +5 at 1,200,000
I sell all the chitin at +7 at 10,000,000
All money after sale is re-invested.
Initial investment is 50,000,000: The algorithm concludes that 38 chitins (45.6m) and approx 1.2240 scrolls for each chitin to reach +7 which comes to 1.2240*38*.09=4.186 which added to the chitin cost of 45.6 is 49.786 million which is very close to our initial investment cap. Anyways, all numbers are in "millions" to save calculation power and make it easy on the eyes.

Results (Millions):

Cycle_Profit =

-10.4600 10.8500 40.5300 -10.0900 -9.7700 19.4400 -10.2700 29.3300 0.6800 29.5700


End_Money =

139.8100

What this means:

The first column of Cycle_Profit is -10.46. I lost 10.46 million after upgrading the 38 pauldrons. This put me at 39.54 million noah for the second time. The second time I reinvested 39.54 million, and I made a profit of 10.85 which put me at 50.39. So on and so on, after 10 reinvestments I began to make some money. Ultimately, I walked away with 139.81 million after reinvesting all my money 10 times into this scheme for a total profit of roughly 90 million noah ontop of my initial 50.

Here's the output graph for this simulation

http://i465.photobucket.com/albums/rr16/Gaudinman/ChitinUpgrade_zpsup5eibic.png

2)


Now, this was one single simulation. Taking this to the next step further means I will run a series of simulations of 10 reinvestments resulting in a 10x10 matrix. I will overlap the graphs so we can see a trend of whether or not this upgrade route is profitable and worth out time:

Results (Millions):

Profitout =

-18.8500 -0.6700 30.2300 59.9300 -19.5000 48.5900 -38.6900 -1.5200 52.1100 -0.1200
9.6200 0.9500 -20.1600 -9.8200 29.7800 -20.1600 -18.8900 9.4400 19.2400 19.7100
-7.6800 -2.3700 40.5700 30.4900 -58.8200 28.5100 20.1300 18.5900 39.7200 21.7400
41.0600 9.0000 11.0500 78.9300 98.8000 71.3300 49.5700 43.5500 87.3500 -89.5900
20.1600 9.9100 -9.9600 -29.1900 29.4600 -10.2700 9.7500 -28.8300 -29.4600 19.9400
40.3400 38.1900 -27.7800 -10.0600 -0.0100 -40.7300 -58.7600 29.2900 30.0100 21.4200
20.7900 -32.1900 -17.4200 -10.5600 39.3100 -19.8400 -30.1300 29.6300 10.2600 -8.5300
10.7000 -18.9000 8.2600 10.5200 -30.2500 20.2300 0.2500 0.2500 29.0500 -8.6100
-19.3900 0.0500 -19.3200 -30.1500 29.5200 9.2200 40.0100 -48.7800 -0.1500 -20.4200
-0.2900 31.2400 -20.0500 -40.2500 0.6400 39.9800 10.1100 38.1700 19.8600 -16.7000


Each row is what we did in the earlier step, now it is that simulated differently each time 10 times. The graphs of the above came out as:

http://i465.photobucket.com/albums/rr16/Gaudinman/ChitinUpgrade10x_zpsjpvj3sds.png

Sure I could run more simulations. I could attempt a 10x50 output matrix to see a much larger scale trend, which I did for the sake of this post, the picture of which is below; we can conclude that upgrading chitins from +5 to +7 at those prices is not the most profitable thing we can do, however, it will make money.

3)


10x50 Results (Millions):

Profitout =

19.9800 -8.7400 -0.3400 0 0 0 0 0 0 0
-19.0300 -49.4100 -21.6800 0.9700 -10.0500 0 0 0 0 0
-19.7500 20.8600 77.7000 33.0300 9.9700 48.3000 68.5900 -37.2300 -12.1900 31.0700
20.4300 -58.4700 8.5600 -9.4500 -10.6000 -30.1900 10.5600 0.2400 -19.6700 19.4100
30.1600 49.7700 89.4000 41.9500 88.0600 -96.3000 15.8000 82.6600 -11.9400 50.0300
0.9700 29.1400 0.5800 29.7700 -0.3500 -39.1800 -12.1900 12.0600 20.9600 18.4300
29.2600 -18.3100 18.7600 -19.5100 29.0300 -17.8200 -20.3900 -19.9600 -8.7800 27.0700
30.2500 -20.0500 -29.9800 -0.1300 0.2300 9.7800 1.1100 -30.9000 9.6700 58.8400
10.2500 29.1200 -38.9900 21.2400 0.8700 -51.5900 -30.1100 28.7500 -10.2600 11.5900
-19.3000 9.6900 41.2000 38.5700 -39.2900 30.7600 47.7300 -59.8800 -9.8500 -18.8100
30.3400 120.2200 77.7600 81.5600 -29.0500 -8.4200 -12.3000 2.3100 68.4700 10.7600
30.4300 19.9500 0.2400 39.4300 10.9700 61.5500 67.4100 -0.5400 59.8200 9.9400
19.5300 -19.4600 20.5200 8.9800 11.5100 -0.5500 29.2700 -9.3800 69.2900 -18.7200
40.1600 11.8200 -22.7900 -17.8600 29.1200 -11.0900 32.1400 28.9000 -10.8300 -29.3400
0.3400 -10.2900 20.2100 -39.7100 30.0100 -20.0200 -9.7700 19.0800 -18.1700 9.3500
-18.6700 38.5800 10.0900 -28.4300 48.9600 -29.2200 29.9700 28.3200 -68.8900 69.9300
11.2400 -10.5200 -0.0200 31.2400 -40.2600 38.2900 79.6800 9.4600 -37.7700 18.8300
48.9000 -17.3900 98.2100 0.2000 0.8300 38.3700 11.8600 29.6200 138.3300 78.8300
10.1600 28.8500 -47.6400 -10.2700 -0.1300 -30.6700 39.0900 10.6600 19.7100 49.6400
0.9700 9.4100 9.8400 40.9900 8.9000 -28.5700 77.2600 10.7000 0.5600 -38.7200
30.1600 10.1300 -39.0200 -31.0400 10.6400 0.5900 -21.1500 29.4000 0.3900 -18.8900
-20.0200 -10.3100 20.4600 -18.9800 -0.9200 10.0100 0.0500 -10.3100 -9.0900 9.2200
50.5200 -30.2100 1.1700 10.4200 38.0300 39.2700 -18.2600 9.8000 8.2200 -37.7200
-59.1200 -21.0700 -19.3500 0 0 0 0 0 0 0
-9.3900 39.4600 -79.9600 -9.7400 -19.4200 0.6500 -10.5500 -0.4100 -0.2300 -9.1200
-9.8400 -8.2600 8.7600 -50.4500 40.3100 0.4100 -19.4100 10.4800 -11.2800 -0.4200
20.7900 19.3400 -7.6400 27.4600 58.8400 12.6200 -1.2700 40.7400 -0.7800 -70.0600
10.6100 48.1300 70.5800 -18.7200 10.8100 29.6800 21.0000 -1.5300 20.1200 90.5900
1.2400 -1.4900 9.6200 11.3100 28.9800 29.6100 -26.4300 -60.5400 -1.5600 29.3700
-8.6700 -10.2700 -28.8700 -9.9500 7.9100 10.6200 0.1200 29.5800 19.6400 9.7500
30.6100 69.6800 29.8700 51.3700 -56.6900 45.4500 40.3900 89.2300 -119.3000 -19.4800
-9.4800 0.4500 8.2900 -38.1000 0.1200 -39.8800 -1.3600 0.7400 -9.4400 -0.5900
-19.4800 0.4100 9.5100 -20.1800 20.5500 18.9200 -7.5200 67.2200 -0.8200 30.8300
9.5300 39.9600 -18.3200 -50.4400 19.6900 21.1500 -20.7500 -29.3900 9.4400 -9.6800
70.0700 11.7000 8.8300 30.3400 -11.7600 -8.0800 -40.0700 19.5600 22.0100 -30.8200
50.5200 60.2400 20.6300 11.0700 -2.1600 -9.5800 0.5300 20.8000 8.9900 -10.6700
0.6100 0.5200 -1.3100 19.0800 22.2800 30.0800 -29.8600 9.6300 -51.0500 29.4400
-39.6600 9.4900 0.5500 40.8200 48.4900 50.7600 19.0100 20.7400 -57.8900 -31.4000
41.2400 48.5500 42.2600 -1.6600 50.0200 -49.0300 39.5400 11.9200 -11.5800 96.6700
20.5200 20.6300 39.0900 -48.9800 -10.2600 39.9700 50.1900 18.5300 90.0200 -20.3400
40.3400 -21.0000 39.4600 1.9300 19.4700 -18.3500 18.6300 10.6600 -0.8300 -9.9300
69.8000 30.5300 -18.0600 59.4300 77.1500 21.2200 2.4700 47.9100 -28.0200 88.1100
-39.9300 -8.8600 17.9800 62.2900 -10.8900 29.6100 30.7800 -0.9000 32.1000 8.1700
-29.3900 10.1900 29.3300 -59.1700 0.0800 10.6200 17.7500 -7.1300 17.7000 -19.2500
-18.9400 -29.9500 8.7000 -18.4100 8.7500 -38.9300 -0.6800 -10.4100 0 0
20.2500 -39.3700 20.3200 -31.8500 1.9300 19.5300 9.1000 20.4300 -8.1100 -11.2700
-28.9400 38.2700 51.6700 58.9300 -39.3900 -18.6200 -10.4700 29.8500 19.6400 30.6500
10.8800 -9.8900 48.1500 -17.0300 9.1100 -20.1000 -31.7400 -18.8900 -19.0000 9.0600
0.6100 -28.7600 18.9000 19.4600 -49.8900 9.4900 0.5500 -9.0000 -10.6000 9.7200
19.8900 -28.4700 60.4500 10.3900 48.7200 108.5300 -47.6100 89.1000 18.5900 31.5200

Associated graph

http://i465.photobucket.com/albums/rr16/Gaudinman/Chitinupgrade50x_zpsuyvzgkdo.png

There is a little more clarity from the 10x50 results which is 50 simulations of reinvesting your money 10 times. We can see a clear trend that there is absolutely money to be made here.

4)


Running these tests again with different numbers however will dramatically change results. Let's imagine that these +7 chitins now sold for 15 million instead of 10 million! The associated results 10x10 (and graph) is:

Profitout (Millions) =

1.0e+03 *

0.0953 0.1353 0.2434 0.3272 0.6431 0.9280 1.5790 1.8054 3.9253 5.4156
0.0361 0.0461 0.1031 0.0785 0.3107 0.4525 0.6272 1.3067 1.7812 2.2103
0.0508 0.1496 0.2553 0.1647 0.5229 0.8234 1.5143 2.3732 3.7922 5.9624
0.0656 0.0744 0.0149 0.1515 0.3268 0.4664 0.6008 1.1396 2.1888 2.8488
0.0507 0.0892 0.0760 0.2089 0.2232 0.5591 0.9134 1.4427 2.0721 3.6344
0.0203 0.0769 0.1190 0.2221 0.3801 0.3577 0.7622 1.4907 2.3173 3.8400
0.0803 0.0760 0.2390 0.3759 0.3169 0.6729 0.6484 1.3927 2.1582 3.7568
0.0797 0.0467 0.2538 0.2113 0.4217 0.6585 1.0798 2.1395 2.6587 4.0737
-0.0242 0.0750 0.1188 0.2412 0.3757 0.4059 0.4819 1.0801 1.9166 2.7645
0.0648 0.0754 0.1948 0.2555 0.4659 0.5687 0.9270 1.3604 2.3980 2.8799

These numbers were very large, so they are a base of 1/1000th. For reference 1.36 is 1,360, or 1.36 billion.

An interesting graph is associated with this however, showing that sometimes initially maybe you get very unlucky and lose all your money to re invest by burning everything. Anything is possible, but if you were fairly lucky your profit is exponential. We can conclude that if this were the case ,upgrading chitins would make you very Adonis rich, very fast.

http://i465.photobucket.com/albums/rr16/Gaudinman/ChitinUpgrade15m_zpsr7xef1bf.png


There are a variety of other uses of this simulator, I can simulate anything regarding the anvil. Here is an array of me upgrading 10 shards +1 to failure. I got lucky here and made a +8! Not all of the calculations from this program are finance based, some are just simple anvil simulations of upgrading with 1s indicating a successful upgrade

items12 =

1 1 1 1 1 1 1 1 1 1


items23 =

1 1 1 1 1 1 1 1 1 1


items34 =

1 1 1 1 1 1 1 1 1 1


items45 =

1 1 1 1 1 1 1 0 1 1


items56 =

1 1 1 0 0 1 1 0 0 1


items67 =

0 1 1 0 0 0 0 0 0 0


items78 =

0 1 0 0 0 0 0 0 0 0


items89 =

0 0 0 0 0 0 0 0 0 0


items910 =

0 0 0 0 0 0 0 0 0 0





So what is this simulator useful for?

Do you have upgrade ideas or curiosities? Would you like to see your upgrade(s) simulated or find out the number of attempts you will realistically need to succeed? There is so much information that can be gathered from these results all of which is useful in its own way. However I cannot guarantee you that your exact results will yield simulation, there is no way to predict results over a discrete time or upgrade period however we can safely expect results from a trend.

Would anybody be interested in expanding on this with myself or would like to get simulation results for your own applications? I will help depending on the volume of attention this gets. I would like to help anyone else interested in this or the theory behind the anvil. I will expand on any and everything about this if asked.




p.s. AlliedArmy an all english speaking clan is recruiting on pathos, let me know if you would like to join!

Donations are accepted and appreciated if this helps at all! :)


-SassySenpai // SassySauron
Last edited by That One Orc; Apr 9, 2016 @ 12:55am
< >
Showing 1-13 of 13 comments
JeaMoN Apr 9, 2016 @ 12:40am 
Pretty sick work, Thanks for it :)
StayBackNL Apr 9, 2016 @ 12:45am 
No life to make this but its pretty help full :D
Rozene (Banned) Apr 9, 2016 @ 1:22am 
holy sh1t dude haha
Anonymouse Apr 9, 2016 @ 4:36am 
Tl:dr...

how many relogs?
xTrack (Banned) Apr 9, 2016 @ 4:39am 
You can try this, http://knightanvil.com/
shiZik Apr 9, 2016 @ 4:47am 
I was always thinking to do something similar but the lack of confirmed rates for the anvil always been major problem.

How did you come up with these rates for the anvil?
while (hopefully) u had fun doing it, this is completely insignificant because these statistics only work with high numbers, and in reality u ll hit the limit of buying chitin+1 or selling chitin+8 way before (and time used should become an issue as well).

Bottom line is u can get lucky, or unlucky, and the only thing u can do to be smart is recognize a good risk/ratio when u see it
Rozene (Banned) Apr 9, 2016 @ 6:42am 
Agnor you are so mistaken...
Statistics are proven to be true , and what u just have said, u can tell it about everything...
Doodle Apr 9, 2016 @ 8:41am 
I agree with Angor here. There are no official anvil rates. The only information is other players, who have the same knowledge, have came up with. But those numbers are not known to be true. In order to make a successful simulator you would have to know the rates of upgrade for all item classes.

This can be used as a basic guide, but I would not bet the farm on these calculation because you will more than likely be disappointed!
Rozene (Banned) Apr 9, 2016 @ 9:05am 
It might be true that the success of unique +7 to +8 isnt same as high class +7 to +8 (for example)
That One Orc Apr 9, 2016 @ 10:24am 
Originally posted by Angor:
while (hopefully) u had fun doing it, this is completely insignificant because these statistics only work with high numbers, and in reality u ll hit the limit of buying chitin+1 or selling chitin+8 way before (and time used should become an issue as well).

Bottom line is u can get lucky, or unlucky, and the only thing u can do to be smart is recognize a good risk/ratio when u see it

Well, yes, exactly, it is statistics. I even stated it does not predict an upgrade over a discrete time period, however it can show a trend of essentially an average upgrade patern from which you can be sure that over a period of time you can hopefully see results. Which I can personally confirm works as I've been making money with this approach.


My upgrade rates were gathered from a lot of sources and I have also done my own documentation of every upgrade I do and store it in a database, the rates I have received are about 1-3% lower than what I listed above but for the sake of simplicity I just rounded up!
Man, wow ..nice work:) I really appreciate your work and thanks for sharing . Greetings, from Eretreia..we`re in the same Alliance btw (i`m in Patriots clan)
Ressa Apr 9, 2016 @ 2:40pm 
Don't reveal our all secrets Sassy :P
Last edited by Ressa; Apr 9, 2016 @ 2:40pm
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Apr 9, 2016 @ 12:06am
Posts: 13