ZSR Forums
December 03, 2024, 05:16:08 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: ZSR Forums are back - read only!
 
   Home   Help Search Members Login Register  
Pages: [1]
  Print  
Author Topic: Tornado warping expected values  (Read 9765 times)
jpd236
Deku Scrub

Posts: 1


« on: May 07, 2012, 05:59:57 AM »

Hey,

The question came up on Cosmo's stream for when you are entering the random warp and hoping to land on Outset of when it makes sense to just sail from where you landed, or to reset and try again. I thought it was an interesting probability problem so I took a stab at answering it.

First, a couple of assumptions:

1) The goal is to minimize the expected total time that it takes to get to Outset Island.  This might sound obvious but it may not be the case; for example, if you're only trying to minimize the best time you ever get, and you don't care about restarting the whole run, it would make sense to do one warp and start all over if you don't get to outset.  But this takes so long that I think this goal is reasonable.

2) Each warp point is equally likely, and it always takes exactly the same time to sail from that warp point to Outset. Someone would have to check these to see if they're not true.

With that in mind, we know there are 7 possible warp locations, let's call them A through G, and say T(A) is the time to sail from A to the final goal of Outset.  Let's call T(R) the time it takes to reset the game, open the file, sail back to the warp tornado, and land at another random destination.

Once you've landed at a random destination Q, you want to know if you should sail to Outset or reset the game and try again.  Sailing takes T(Q), a constant value. If you reset, it will take time X, where:

X = T(R) + 1/7*Min(X, T(A)) + ... + 1/7*Min(X, T(G)).

Explanation: T(R) is the time to reset and try again. From there, we have a 1/7 chance of reaching each destination, and the expected time from there depends on whether it's faster to sail or try again from that new destination, which is why we have to take a minimum.

So, we just have to solve for X (since it's a function of itself).  The easiest way to do this is to plug the actual values for T(A) through T(G) and T(R) into the equation and give it to Wolfram Alpha.  I did this for some sample values (in seconds):

T(A) = 100
T(B) = 200
T(C) = 300
T(D) = 400
T(E) = 500
T(F) = 600
T(G) = 700
T(R) = 50
 
Then as per http://www.wolframalpha.com/input/?i=x+%3D+50+%2B+1%2F7*minimum%28x%2C100%29+%2B+1%2F7*minimum%28x%2C+200%29+%2B+1%2F7*minimum%28x%2C+300%29+%2B+1%2F7*minimum%28x%2C+400%29+%2B+1%2F7*minimum%28x%2C+500%29+%2B+1%2F7*minimum%28x%2C+600%29+%2B+1%2F7*minimum%28x%2C+700%29, X = 950/3 = 316 2/3.

So with these fake numbers, you would sail to outset if you land on A, B, or C, and reset otherwise. This makes sense if you think about it - A, B, and C are the closest to outset, but the others are so far that you're better off taking the 50 second hit and trying again.

Now the only thing remaining is to find the actual values for T(A)-T(G) and T(R) and plugging them in. I don't have the game though so I'll leave that to someone else if they want to figure it out.  Hope this is useful.
Logged
mugg
Regular Guay

Posts: 26



« Reply #1 on: May 10, 2012, 04:03:51 AM »

I'm not so good at math, but here's my shot at it:

Distances:
Greatfish-Outset = 3 quadrants
tingle-Outset = 4.12
windfall-Outset = 5.38
Dragonroost-Outset = 6.4
southern fairy isle-Outset = 2.23
Forest haven-Outset = 4.12
Triangle-Outset = 4.47 (if you'd ignore the cyclone altogether, ignored in this testing)

Let's say a reset and re-trying takes 45 seconds.
Crossing one quadrant takes 27 seconds.

Outcomes:
1) Outset 1/7 = OK!

2) sfi 1/7 (60 seconds till Outset) 1 more re-try until Link would have reached Outset by sailing
3) Greatfish 1/7 (81 seconds) 1 more

4) tingle 1/7 (111 seconds) 2 more
5) foresthaven 1/7 (111 seconds) 2 more

6) windfall 1/7 (145 sec) 3 more
7) dragonroost 1/7 (172.8 sec) 4 more



If you get Outset, then you're good.
If you get 2) or 3), you should sail there.

If you get 4) or 5), you can re-try:
You'll have a 1/7 chance of getting to Outset, 2/7 of getting an acceptable outcome and 4/7 of getting a bad outcome. So your chance of getting a good outcome is about 42% and you get another shot at getting to Outset.

If you get 6) or 7), you should reset.


Tower of the gods wasn't considered as a possible destination point but if it's possible to warp there, it would be a slightly worse scenario than 4) and 5).


In short:

Outset is good.
SFI, Greatfish you can sail.
Tingle, Foresthaven you can sail or re-try.
Windfall, Dragonroost you should reset.

Logged
EverAlert
Regular Guay

Posts: 68


« Reply #2 on: June 29, 2012, 05:35:52 AM »

So, I was watching Cosmo's stream yesterday, and after he kept getting bad cyclones I started to wonder if it was even worth it to get the cyclone at all. Since I'm learning TWW right now I thought it was worth going over the numbers to see. I got some interesting results, although it might be up to the player to decide what course of action to take.

Some timings I got from recordings of Cosmo/Cafde:
Save - 5s
Reset - 10s
Warp - 35s (could be maybe 2s quicker from the 2nd warp on if KoRL doesn't talk to you)
Changing Wind - 15s

Changing wind direction won't factor into these tests since you need to change the wind direction no matter where you come out, so the assumption here is you change the wind to SW before dropping off the pearl, which gives you a nice wind no matter where you come out.

So the way these tests work is I take the time it takes to save and the time it takes to warp, then add to those the distance to outset from each drop point in quadrants multiplied by the time it takes to cross 1 quad. After the first cyclone I also add another warp time and reset time for each additional cyclone. For the sake of consistency with mugg's post I am taking the distance values from him (they seem accurate enough from what I've checked) and using 27s as my default quad time. Outset drop gets a distance of 0.07 because you have to sail a bit even after the drop. Obviously, sailing straight to Outset from NT does not incur the initial save+warp cost. Here are the results:

Sailing from NT — 2:00

1clone
Outset: 0:41
Southern Fairy: 1:40
Greatfish: 2:01
Tingle: 2:31
Forest Haven: 2:31
Windfall: 3:05
Dragon Roost: 3:32

2clone
Outset: 1:26
Southern Fairy: 2:25
Greatfish: 2:46
Tingle: 3:16
Forest Haven: 3:16
Windfall: 3:50
Dragon Roost: 4:17

3clone
Outset: 2:11
Southern Fairy: 3:10
Greatfish: 3:31
Tingle: 4:01
Forest Haven: 4:01
Windfall: 4:35
Dragon Roost: 5:02

4clone
Outset: 2:56
Southern Fairy: 3:55
Greatfish: 4:16
Tingle: 4:46
Forest Haven: 4:46
Windfall: 5:20
Dragon Roost: 5:47

Baseline — 2:50 (Save+Warp+Reset+SailNT)

So basically, on the 1st cyclone you get a 2/7 (28.5%) chance of saving time vs straight sailing, and a 1/7 (14.2%) chance on the 2nd cyclone. I'm not well-versed in probability but my guess is the way you would check the overall probability after 2 cyclones is a 3/14 (21.4%) chance.

So what's the baseline got to do with anything? I figured if you actually were going to take the chance with cyclos then you would want to take 1 chance, then just sail if it doesn't work out. So the baseline is there to help you to decide whether to just sail from the drop, or to reset and sail from NT. Turns out resetting and sailing from NT is faster than Windfall and Dragon Roost (more or less to be expected).

If you want to play around with the time it takes to sail a quadrant (optimized sail pumping is a few seconds faster per quad than 27s), or see how it pans out over greater or fewer cyclones, I wrote this script to do the job:
http://stuff.everalert.net/tww/trollclone.php
It's pretty much the same story with optimixed pumping though.
Logged
cafde
Site Editor
Regular Guay

Posts: 71


FrankerZ


« Reply #3 on: June 29, 2012, 04:18:13 PM »

Helpful info, but I think that a greatfish warp saves time also since the triforce chart is straight in your path to outset, meaning you don't need to go back later. I have a feeling it makes it a faster warp overall than SFI but still... the cyclos warp has always been a big gamble (and I hate it so much -_-).
« Last Edit: June 29, 2012, 04:20:00 PM by cafde » Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!