Post by iconPost by Zorba777 | 2020-05-22 | 11:54:33

Hi,

Having fun with VR and finding zezo very useful and well made.

Just some 1st observations, which may or may not be useful:

1 - If you make something like a "premium service" then I think it would be useful to be able to set my "current sail" (or start sail) in the inputs. Now it sometimes happens that I am sailing Jib, but on next zezo caculation it would start me one LJ, because that's 0.1 kts faster, only to change sail to LG 20 minutes later. Then it is probably better to continue on Jib until that next sail change, especially when I have no pro winches. ( I also believe this would reduce server load, because calculating with known start/current sail means the calculation for other possible start sail are not needed).

2 - The possibility to add 1 way point between starting point and destination point would be useful to explore different strategies with fewer calls to server.. I guess that may be on the to-do list already :-)

3 - For longer races it may be nice to see the orthodrome between start and destination point.

Thanks


commenticon 24 Comments
Post by iconPost by zezo | 2020-05-22 | 12:22:30
1)

The router always makes one calculation, using one "perfect" sail, combining all the polars. There is also data for the sail used, so it knows about sail changes and applies penalties along the way.

Defining initial conditions does not work very well. It's also a problem with the current tack you are sailing, and it's left at the discretion of the player.

3) That's the thick orange line, or I'm missing the question?


Post by iconPost by Zorba777 | 2020-05-22 | 13:27:36
#3 Correct. I wrongly assumed the orange line was rhumb line. All clear.

As for #1. Maybe I didn't explain myself clear enough. Using the "perfect sail" makes sense for new start of a race. Then the algo will find the best sail to start by internally trying all of them and find fastest way (~Dijkstra's algorithm).

What I am talking about is during a race. So maybe I am on Jib right now, because previous zezo route put me on that sail. If I run zezo again with my current position then it will calculate again as if this is the start of a new race. So it finds again the "perfect sail". Maybe that perfect sail is now LJ based on new calculation. But changing to LJ will cost me 50% speed penalty for next 5 minutes. This will at times not be a good idea, because the algo assumes I can "start" with any sail at no cost... Does that make sense?


Post by iconPost by zezo | 2020-05-22 | 13:39:15
"perfect sail" is a single polar diagram, describing your boat with its current set of sails.

Adding separate sails will add a new magnitude of complexity to the router.

Now, the router does not exactly give you global optimum. It uses dynamic programming - otherwise it would be running for minutes, not 2-3 seconds.

But all that's just academic discussion. It would matter if you are searching for optimum in a static wind field. But the field is not static. It changes every 6 hours, and changes are bigger than all the rounding errors, penalties and so on.

You should be looking at it as strategic decision tool - to give you the big picture. It can also help you with short-time tactics, but that's not the main purpose and it's not 100% precise there. For example it does not always sail the optimum up/downwind angles, so it's up to you to double-check the polars.
Post by iconPost by Zorba777 | 2020-05-22 | 13:52:31
I know those things. But I don't get the impression that my point is understood.
That's all right.

Thanks for answering.
Post by iconPost by zezo | 2020-05-22 | 14:35:00
If you understand those things try to estimate the problem space without pruning.

With or without sail changes.

Brute force approach: 500 steps, about 50 options from each point. 50^500 does not sound computable to me.

The actual algorithm calculates a convex hull of possible positions at each step and keeps only a fixed number of them for base of next step. That keeps the things O(n). A step using "wrong" sail would fall inside the hull sooner or later and will not even be considered for selection (the solution space is represented by a tree, not a full graph because the positions are not exactly discrete and combining two "very close" points would be prohibitively expensive).

With pruning/dynamic programming you lose the globality of the solution. And those tacks/sail changes penalties get lost in the local optimums.

Post by iconPost by Zorba777 | 2020-05-22 | 17:54:50
Thanks for those details. But I wasn't suggesting to try Dijkstra without pruning. You wouldn't change anything to the pruning rules and parameters you already have in place.
So, what would change with a "fixed start sail" (which would usually be set to the sail I am currently sailing on) as opposed to the current algo that considers all possible sails on start (p0) and then prunes away the branches that are too bad?
1- in current algo all possible start sails are considered for p0, which quickly gives a lot of branches of possible step paths, and you keep pruning away the bad ones to remain with best route.
2 - with a fixed start sail all other sails are instantly pruned away on p0 and then it is taken from there in normal way. Sail change is of course always considered on every next step, but since sail change comes with penalty those branches will get pruned more quickly, unless a given sail change leads to a better route down the road. In other words: a fixed start sail with the same pruning parameters will always be computationally cheaper.

That's as clear as I can say it. If it makes no sense to you then that's fine to me. I am not going to convince you. I saw your "about page" mentions big server load for the massive computations. So I thought you would be interested in this "fixed start sail" method..




Post by iconPost by zezo | 2020-05-22 | 19:42:47
You still don't get it. The router does not consider sails. It considers directions. TWA's actually.

It does not have any idea about sails until it notices a sail change.

What if an immediate sail change is actually the correct thing to do?

What's the difference between p0 and p1 and p2? How long do we inhibit a sail change?

Why don't you try to implement a basic router? Should take less than a week to get something working. Half of the code is available in this site .js files, unobfuscated. Feed it some data, observe the behavior, change something, show some results. Then we'll have something to talk about. I've spent a lot of time doing that.

Not saying it can't be done better - it can for sure. But maybe not exactly the way you think.
Post by iconPost by Zorba777 | 2020-05-24 | 08:45:12
Of course the router considers sails, how it couldn't? The sail come in through the boat polars, which determines how far the boat travels on each step, on a given sail, in a given direction...

But why is this turning into a kind of examination? That's not necessary.

A suggestion was posted. Not a big deal in my part of the world. I have been in software for 20 years. Users will post comments, suggestions and feature requests. That's normal. I say thanks to all of them, even though 95% of suggestions cannot get implemented, or are just bad ideas, or would simply made the program or service hopelessly complicated to use... If a suggestion sounds promising, then I may discuss it further. Simple.

It is as if you want to continue this conversation. But it's not at all clear to me what case you are trying to make..

Anyway. If, as @bmertens says, no premium paid version is being planned, then my feature request is a moot point.

It's none of my business. But curious what is the reason why you didn't take the step to expand the service? Is VR threatening you or something?
Post by iconPost by zezo | 2020-05-24 | 10:02:31
Trying one more time.

The current implementation uses SINGLE polar diagram describing the boat with its current configuration. It does not try to sail TWA 140 with a jib.

Your idea may not be bad itself, but it will take at least 7x the calculations to try every possible sail. You can optimize it a bit to avoid the very bad cases, but there are still crossover points where 3 different sails would work reasonably.

My main goal is to make the thing work below 2-3 seconds. That's important for the interactive response and also for the server load. I'm running about 20 logical cores now and can't afford doubling the capacity (at least for a free version). In the past VR versions the weather was updating 2 times/day and everyone rushed online within 10 minutes. Had to bring up amazon/google instances to handle the paks.

P.S. you have answer to the other question if you used real mail when registering.
Post by iconPost by Zorba777 | 2020-05-25 | 12:11:13
I don't know what you keep "trying". By saying which premium features I would be willing to pay for I didn't criticize the service as it is now. So, you don't really need to defend or explain it. I wouldn't make any suggestions if I didn't see any promise in the service as it is. But I appreciate your effort. I understand the reasons for keeping the calculations within reasonable time limits, but that was never the topic of my post.

I did get your mail, so discussion of a possible premium service is hypothetical. I would just say how much slower (or faster) my code would be is something I can't predict because I don't see your code. The implementation can always be done in many ways, some slower, some faster... I used to do Kaggle competitions years back, and around xmas there was always a "traveling Santa" type contest, so I know how it goes when fooling around with routing algos. The speed depends on implementation, especially the pruning.
But the speed wouldn't matter that much for a paid premium service. Some people would gladly pay for premium routing even if it takes 30 seconds or more to calculate and deliver the result. As long it makes them a few minutes quicker. No weather routing will ever be perfect as long as weather prediction is imperfect. That's part of the game also in real regattas. Some VR races are decided with less than a minute and some people pay in game for hull polish, which probably doesn't make them much quicker either.



Post by iconPost by BooBill | 2020-05-22 | 14:52:11
@Zorba777 I think your question is well understood by everyone here. The fact is, the router makes some compromises to make computation possible. The router will not sail your boat for you, nor should it. Sailor skill is required to make decisions about smoothing a route, skipping a sail change, or delaying a course change. Racing tactics can also come into play. The router knows nothing about the location and intended route of your competition.

Even though we all use the same tool you consistently see the same names at the front. As a sailor with "intermediate" experience, I see my results constantly improving as I figure out the nuances of the game and the router and ways to use them better.

I have also previously asked about a paid premium service and I accept Cvetan's reasoning for not doing it (laws and stuff.)
Thanks once again Cvetan for all you do for us.

Post by iconPost by Zorba777 | 2020-05-22 | 18:05:40
Thanks for weighing in.
But I didn't say anything about tactics, or the router will sail my boat, or the router should know where the competition is sailing, etc... That's all interesting topics for another day, but they have no direct bearing on the suggestion in this post..

Technology is a "tool", but the sailor will use his experience or intuition too. The VR game simulates that quite well.
Post by iconPost by MidnightFoiler | 2020-05-26 | 07:10:17
I don't quite follow what Zorba is suggesting but I get the concept and similarly I get what Cvetan is saying although I don't quote follow the detail of why he thinks doing what you suggest would add complexity. I'm a Software Engineer and reasonable mathematician but have never implemented this kind of algorithm but I get the rough idea of pruning etc.

I think it should be possible to modify the existing algorithm. I hadn't considered the sail change example but have often thought the tack/gybe case could be improved. I'll explain how in a moment but funnily, I am happy that it doesn't do these things because the lack of them actually means there is a little more skill and the tack/gybe one means more people take different routes rather than ending up with one solid pack.

For the tack/gybe if the router calculation adds a penalty for a tack/gybe from the initial tack/gybe then it may well delay the tack/gybe for a further period rather than suggesting an immediate tack/gybe. This plays out when approaching say a gybe that zezo has said gybe in 1 hour and still has the gybe at the same time 30 mins later, but 10 mins later (i.e. after 40 mins) it says gybe immediately because that is now the optimum ignoring the immediate gybe. Therefore surely the same algorithm just needs to know to add that gybe penalty. However I like that this happens because then some people gybe immediately and some hold on splitting us up. I might decide to gybe immediately if I want to get that side and if I do I know I am very close to the optimum anyway, otherwise I would probably stick to the original gybe time.

I think Zorba is probably suggesting the same thing but said in a more complex way ... I hope this manages to smooth the way between what seems a grateful user trying to make a suggestion and a dedicated developer trying to explain rather than dismiss or ignore the suggestion ;-)

Presumably the same could be done for current sail and it could well just say to sail a touch lower/higher with the current sail rather than double change if it factored in the immediate penalty of the change from the initial sail. If its a short duration change then it is fairly obvious to stick with the current sail and so that it not a big deal to me and adds to the skill of playing the game.

Post by iconPost by zezo | 2020-05-26 | 08:28:41
I've tried adding the initial tack to the router.

It does not really work because it does not know WHEN your last tack was.

Most of the time there are many equal/very close paths, and the exact one you take does not really matter as long as the tack penalty balances the benefits (supposedly the wind shifts)

As a matter of fact the router had small internal tack penalty (about 1% speed for one step) before the game did. Without it there would be a tack/gybe at every step when sailing dead up/downwind in a regular wind field.

There was even an 'avoid tacks' item in the right mouse menu that actually increased the penalty.

So there is a point where calling the router too often makes your boat slower.

If I add a history it would purely visual - saved predictions. Guess it would be quite useful, for comparing different GFS models and sailing a predefined course without 5-minute variations.

There is similar logic with the sails. It matters WHEN you changed to that JIB. If it was hours ago then a new sail is OK. If it was minutes ago, and there is a change expected soon - better stay with the old sail.

Post by iconPost by Zorba777 | 2020-05-27 | 11:33:00
I started the race to Goa two days late, so was thrown in at the rescue fregate, already 24 hours behind the leaders. This gave me chance to do some experiments.
I noticed at some point that certain sail changes were not optimal, as I described, but now I found a fairly simple way to get around it. Yesterday I was in final 24 hours stretch to Goa. Sailing on Jib at 70-75° TWA, which was very close to the point where LJ becomes marginally quicker. The router foresaw a 6 hour period where LJ would be quicker. I suspected that sail change would not pay off. So, I calculated the same route with "ligth sails" switched off. This forced the router to stay on Jib all the way and the result was 20 minutes faster.

At first I was puzzled why almost 20 minutes? With no pro winches I get a 5 minute penalty of 50% speed reduction. That means at 10kts boat speed I lose 0.41 NM and presumably (at that time) another 0.41 NM further down the road when I go back om Jib. That's a total 0.82 NM that needs to be recovered with the faster sail (LJ) if this sail change is to make any sense. In this case it didn't, so I stayed on Jib even though the game kept showing me "wrong sail" warnings.

The bottom line is there is an easy way to test if a given sail change makes sense or not. Calculate the rout for 1 day out, with the questionable sail turned on and off to see what is faster.

In this case staying on Jib caused a much bigger gain than expected because being 0.41 NM ahead of the LJ position gave me slightly better winds down the track. And that can make a 20 minute difference after 24 hours.

I suspect a number of top players quietly know and use this already.

Post by iconPost by Zorba777 | 2020-05-27 | 11:10:29
I am with you that the imperfection of routing systems leave something to the skill and anticipation of the sailor/player. Why play if we have no chance against a bot with unbeatable routing skill?
On the other hand, if we use full pack and other boats in the game steadily get away from us then it becomes hard not to think that they could be using better routing algos.. So, there will always be an urge to get better routing.

I am not a sailor (already happy if I don't drop off the SUP too often), but I like to crunch numbers. I have only completed two races so far, and found zezo after a few days while searching for polars for the boats in VR.

The zezo algo, as I understand it so far, is doing some compromises to get out results within seconds and not clog up the server. Nothing wrong with that, but understanding where the algo tends to err can help us use it better. Tacking/gybing is also one of those cases where the time penalty comes in and makes the math more complicated. Optimal tacking is an interesting topic of study and here is a good article on it. I haven't tried it yet, but it's quite possible that their app can be used to improve tacking in VR games also: http://www.sailtimerapp.com/OptimalTacks.html



Post by iconPost by MidnightFoiler | 2020-05-26 | 12:15:57
As I said, I don't think you need to do anything about it but I am interested in discussing the problem... so ... feel free to continue the discussion or not ...

In what way didn't it really work?

I don't see that it matters what the past was. Either changing sail or tack gybe now will get me to my destination faster or it won't according to the current forecast. Its different of course if it is a strategic decision to sail lower/higher or tack/gybe early/late but then we don't expect the router to understand that.

If i forgot to change from the LJ to C0 hours ago and now the LG change is coming up it is not any more ok to change to C0 first than if I accidentally changed sail to from C0 to LJ 10 mins ago - no doubt because of a VR bug ;-) Either the penalty is worth it or it is not. The only problem I can see here is the router does not consider sailing with a non-optimum sail according to the polars and so will not suggest changing early to LG but at non-optimal heading which could well be the best thing to do (and you don't have full pack). It could however suggest changing to LG at the changeover heading in the polars instead of C0 now and then LG in 10 mins which it currently would.

If I am on LJ and I "should" be on C0 and its a change back to LJ that's coming then it either pays to take the penalty to sail with C0 for however long or I should stick with LJ. It doesn't matter how long I have had the LJ up.

Similarly it will either be better to gybe now or it won't, as you say the penalty is worth it or not. It doesn't matter whether I have been on that gybe for an hour intentionally or just gybed intentionally or the VR bug that gybes you has just hit. Where I can see what you are saying might make sense is if I made a strategic decision to gybe before a "lay line" expecting a bigger shift in the next forecast update then you kind of want it to ignore gybing back and give you the optimum without that gybe but I don't expect it to do that, I know that it will tell me to gybe back for a period or I need to adjust my destination to account for the size of shift I expect. Just like if I decide to sail 5 degrees low than zezo says, I don't expect it to stop telling me to sail higher.

Regarding the idea of saved predictions / history. It would be nice but I just keep the dashboard reuse tabs option off and compare tabs/windows (particularly across wind updates). In fact I now route at X:30 and then duplicate tab and reload it at X:36 to compare.
Post by iconPost by zezo | 2020-05-26 | 13:22:19
There is some noise in the calculations. Because of that the router does not generate exactly repeatable results from one cycle to the next.

The physics of the wind itself help having multiple pretty much equal paths between two points.

The time step changes. Routing is done in 10 minute steps initially, then 20-minute steps in few hours, then 30- and 60-minute steps. A 60-minute step is not that bad, because a day ahead the actual weather will add more wind difference than the difference along the 60-minute line, but in a static wind field the track will change over time depending of the origin.

There are also differences between the wind the router sees and what VR uses to move your boat, so the origin point for the next calculation is not exactly the second point of the previous path.

That's why the exact gybe moment is usually varies a bit. Or a lot, in some cases.

Post by iconPost by Zorba777 | 2020-05-27 | 11:49:49
@MidnightFoiler It is pretty straightforward to calculate if a given sail change makes sense (or still makes sense when being late to set it). Toxcct polars app makes it easy. E.g. for the Goa race. Say a 10kts TWS and I am on Jib. At 70 degree TWS the calculated boat speed is 10.46kts. With LJ the speed would become 10.52kts. That's only marginally quicker and it will take many hours to make good on the sail change penalty.
In the router it would be slightly easier to test various options if I could turn individual sails on/off to compare. Now we can turn "light sails" on or off, but that disables both the LJ and LG, which also complicates route exploration.
Post by iconPost by MidnightFoiler | 2020-05-26 | 13:30:43
Ah, ok that makes a bit more sense now. thanks
Post by iconPost by zezo | 2020-05-27 | 14:50:17
@Zorba777 The penalty without pro winches is too big and may confuse the router under certain circumstances. I think it's been discussed here before.

Because it affects the tacks and gybes too, the router will tend to lose more local optimums.

I generally recommend having that checkbox checked for strategic planning even if you don't have the option.

Also, having extra sails without pro winches can sometimes be worse than not having the extra sails at all. Ideally, just get the pro winches. As you note, the equivalent 2 minutes of standstill for each maneuver quickly add up.
Post by iconPost by Zorba777 | 2020-05-27 | 17:43:08
Yes, that's more or less what I figured out so far.

I am still trying out different things and settings in zezo to squeeze more out of it. For the next race I will probably go without the full pack again, and then I will see. E.g. I have learned quickly not to trust the autosail card option without pro-winches. Depending on wind variability it may have changed sail multiple times overnight, throwing me back several NM...
Even with pro-winches that give a speed penalty for only 75 seconds it amounts to 1% loss and about 2% if it goes from Jib to LJ and then back to Jib.

There is something "pure" about going with fewer sails and not being able to afford many sail changes. I just take the light sails and maybe hull polish with the free credits I get for the race.

Post by iconPost by SPRexxii | 2020-06-01 | 03:37:50
OMG.

First of all. Thanks once again Cvetan for all you do for us.

Your patience is greater than your wizardry and that is irrefutable.

Top VSR sailors hand Pro's with extravagant pay to play routing systems their literal ass race after race after race. That sir is validation of all your sentient effort. Thank you again and I again will slip a little into the collection plate as I hope anyone you beggs your time or uses the fruits of your efforts should do.

Cheers mate.
Post by iconPost by MidnightFoiler | 2020-06-01 | 12:06:25
Last night I wondered about gybing less (not so much thinking it would be faster but that it might pay to stay in stronger wind if the later wind updates changed the strength / shift) and turned off pro winches and was amazed that this resulted in a 1 hour difference after 35 hrs judging by the isochrones. I concluded the extra gybes were worth it!
border
Topics list
Posts
border
5
border
border
Copyright 2009 by ZEZO.ORG. All Rights Reserved.