Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --totally irrelevant formula for calculating average length of time to cook a bag in rats / cook off
- --when i'm modding, it's easier to slap this stuff in a mod and run it in-game than try and execute it on its own
- --[[rats numbers
- local startP = 0.05
- local incP = 0.10
- local delay = 25]]
- --cookoff numbers
- local startP = 0.07
- local incP = 0.15
- local delay = 22.5 --20 to 25... or is it 21 to 25?
- local sanitycheck = 0
- local expectedvalue = 0
- local baseodds = 1
- local numdelays = 0
- for i=startP,2,incP do
- if (i > 1) then i = 1 end
- baseodds2 = baseodds
- numdelays2 = numdelays
- for j=i,2,incP do
- if (j > 1) then j = 1 end
- numdelays2 = numdelays2 + 1
- baseodds3 = baseodds2
- numdelays3 = numdelays2
- for k=j,2,incP do
- if (k > 1) then k = 1 end
- --three ingredients added!
- numdelays3 = numdelays3 + 1
- local theodds = baseodds3 * i * j * k
- sanitycheck = sanitycheck + theodds
- expectedvalue = expectedvalue + theodds * (numdelays3 * delay)
- log(sanitycheck .. ", " .. expectedvalue)
- baseodds3 = baseodds3 * (1 - k)
- if (k == 1) then break end
- end
- baseodds2 = baseodds2 * (1 - j)
- if (j == 1) then break end
- end
- baseodds = baseodds * (1 - i)
- numdelays = numdelays + 1
- if (i == 1) then break end
- end
Advertisement
Add Comment
Please, Sign In to add comment