I was bored today so I decided to do the math on Gambler’s Fate behavior. Here is a photo of my results:
The behavior of Gold decaying to Silver and then decaying to nothing is a very simple Markov Chain, which I then represented as a binary tree (as every state can change into 2 different states every second).
Each state is a node on the tree (G for Gold, S for Silver, X for not existing anymore, I didn’t draw all X nodes as I found it unnecessary). Every second Gold can either remain as gold or become silver, each of its children nodes reflect that; Silver on the other hand can remain as silver or “die”; and a “dead” node can remain dead or continue to not exist (the same thing, but making it have 2 children nodes as the others keeps things consistent). This behavior makes the tree of possibilites grows exponentially, in base 2.
To calculate the probability of a decoy lasting at least N seconds, we need to get the ratio of “alive” nodes to the total nodes on the tree at depth N. As explained on the previous paragraph, the tree has 2N-1 nodes at depth N, meanwhile the total amount of alive nodes grows linearly, one node at time, as only the lone G node can spawn 2 more alive nodes. Thus, at depth N, the ratio alive/total is N / 2N-1. Let’s refer to this ratio as TN, N being the depth of the tree as well as a time in seconds.
I remind you that TN is the probability of the decoy surviving at least N seconds, not of it surviving exactly N seconds (this value would be TN - TN+1, for example: the decoy has a 25% chance of lasting exactly 2 seconds).
As you can see, the average duration of the decoy is 4 seconds, as half of the time it will last 4s or more and the other half it will last 3s or 2s.
Just to make sure, I wrote a lua script to simulate the behavior of the decoy and, indeed, my calculations seem correct. Here are the results for 100 million rolls:
02s: 25003719
03s: 24996025
04s: 18746892
05s: 12502522
06s: 7806597
07s: 4691625
08s: 2737143
09s: 1562021
10s: 879513
11s: 487487
12s: 269118
13s: 146308
14s: 79366
15s: 42789
16s: 22878
17s: 12174
18s: 6523
19s: 3399
20s: 1797
21s: 999
22s; 503
23s: 290
24s: 157
25s: 82
26s: 38
27s; 14
28s: 10
29s: 5
30s: 4
31s: 2
average duration: 4.00011294 s
and here is the script:
reps = arg[1] or 1000
function roll()
local state = 2
local count = 0
while state ~= 0 do
if math.random(2) == 1 then
state = state - 1
end
count = count + 1
end
return count
end
totals = {}
for i=1,reps do
local c = roll()
if totals[c] == nil then
totals[c] = 0
end
totals[c] = totals[c] + 1
end
total = 0
for i,v in pairs(totals) do
total = total + i*v
print(i,v)
end
print("\naverage duration: "..total/reps.." s")
In conclusion, this prism is pretty bad. The mana efficiency of this prism is terrible, 90 mana (cost of T6) for 4 seconds on average (duration of T1) is utterly pathetic, the only things this prism has going for it are perfect control over the position of the decoy - which you only really need on extreme situations or if you can’t eyeball it normally (git gud) - and a fairly small chance of it lasting for a decent amount of time (I find this inconsistency annoying, but that’s just me).
(By the way, can anybody tell me how to format code in this forum? I tried <code></code>
, but it didn’t do anything. The format on the while and if seems to be automatic.)