Wednesday, April 22, 2015

Persistent Shifts Part 4

Shifts are often modeled and thought of as sudden changes of direction, but this is not necessarily the case.  In the Sail Racer game we have a scenario where the wind shifts from the weather input are smooth and continuous.  So how do you decide when is the time to tack during a smooth shift?

If you dig out your strategy books you should find somewhere in there that you are supposed to tack when the wind passes the median wind direction.  For example, let's say that you are sailing on an exceptional shift, you are very lifted, pointing almost straight at the mark, but then then you get a slight knock.  You are probably still lifted overall (ie. you are above your median), so don’t tack yet.  Only tack when you have been knocked so far that you are pointing below your median heading because being below your median on one tack means being above your median heading on the other tack.

For a good illustration of how to tack on the median in a smooth shift, check out  this Speed and Smarts article posted on the Destination One Design website from which I pulled the picture below:

This image is not mine, I found it by following the above link.  Please consider subscribing to Speed and Smarts if you like it:

The above picture shows how a boat tacking on the median would make gains on a boat tacking on the maximum.

It is nice to be able to put this theory into practice by playing the wind game immediately after reading it instead of having to wait for the race on the weekend (or for the lake spring to heat up to put it into practice.

I don't know exactly what Sail Racer's algorithm is, but while playing the game the instantaneous wind trace line and a damped-down wind trace line are drawn out in grey.  The damped line is apparently averaging out the wind direction from the last little while.  With some exceptions, like approaching laylines, the Sail Racer algorithm seems to make the computer’s boat tack whenever the line that represents the wind direction crosses this damped average wind trace line.  This essentially means that the algorithm tacks on the median, but we don't know how the algorithm calculates the median.

I have noticed that for whatever reason, that in this game, the wind has tended generally to come back to North and to swing more or less evenly around the direction of North.  If I sail/play the game with that information in the back of my mind, my memory is going back much farther than the wind algorithm’s memory.  So when there are longer phase oscillations and the game begins with the wind direction off to one side, well to the East or West of North, I am usually able to win by being more patient or longsighted than the algorithm.  The algorithm gets impatient (so to speak) by deciding that the current wind direction must be the new normal and so it sets it as it's median and starts tacking on it.  On the other hand I sail the lift to get inside the next shift, that means taking deep breaths and waiting with fingers crossed for the wind to normalize back to North.  

In the screen shots below I am the red boat and black is the algorithm.  I took a screen capture of these races because they show an example of playing the long phase oscillation as a persistent shift by sailing on the lifted tack and waiting for the wind to (hopefully) come back to North (my long term median) before the end of the leg.  The computer in the black boat, blindly following the algorithm, assumes that the initial wind direction is here to stay and that that should be the median.

Looking more closely at the first screen capture you can see that when the race started the wind was already to the right of the rhumb line (slightly East of North) by looking at the grey wind trace lines.  I made a plan based on my theory that the rhumb line (North) was the true median.  The computer’s boat (black) took the North-Northeast direction to be the median wind direction and so she tacked on the short phase oscillations thinking it was a neutral phase.  Over the course of the leg, the wind eventually returned to my predicted Northerly direction, so my strategy of treating this scenario as a persistent shift paid off, I got well inside the long phase persistent shift.  However I want to emphasize that then crazy shifts came through (shown by the squiggly faint wind trace line), I tacked on them, I didn't just blindly follow my plan with no regard for the short phases that were extreme enough to pay for their tacks.  This is what I have been building up to with these blog posts, the idea that overall you may have a persistent shift strategy based on the big phase, but superimposed on that, you can still tack on the extreme oscillations that come through in the small phases as long as you get back to your plan as soon as possible and as long as your tacks pay for themselves (remember the bit in the previous blog about how costly tacks tend to be).

In the first example where the persistent shift was more subtle, I still tacked on the big shifts, but I made sure to get enough separation from black to be able to cash in my left side advantage if my prediction came true.  When the prediction did come true, I did not know exactly how long this big phase would last, so once I had big paper gains, I crossed back in front of the other boat then tacked directly to windward of her to make it more or less impossible to come back and pass me.  You can tell more clearly that I did the same defensive cashing in move in the second screenshot race.  This is an effective move not because of my wind shadow (no wind shadow in this game), but because tacking to windward of black removes leverage that she needs in order to gain or lose on wind shifts.

Paper gains mean the theoretical advantage that you have if nothing changes.  Until you have cashed in your paper gains, because of your leverage, a change in the form of a bad shift could make your gains vanish.  Cashing in means reducing your leverage: sailing ahead (or behind) your competition.  Once you have cashed in you have reduced your leverage and so you are not as susceptible to undesirable shifts.

What I have been trying to illustrate is that in situations with combined long and short phase oscillations, that is, with real world messy persistent shifts, you often have competing strategies: to get inside the (big) persistent shift and to tack on the (small) oscillations.  The trick first to identify whether there is a high likelihood of a persistent shift that could be capitalized on.  Next you need to get a feel for which oscillations are big enough that tacking on them pays for itself and which ones are a waste of time and leverage.  Another thing to keep in mind is where you need to go next so that if you find yourself in a neutral (macro) phase, you can act purposefully.  If you are happy with your placement on the course during the neutral phase you could spend your time tacking on small shifts.  If you are ahead your time in the neutral phase might be well spent cashing in any gains you may have by reducing your leverage.  If you have losses rather than gains, leverage is your only hope of recovery and it is laylines that are the enemy as time runs out waiting for the miracle shift to get you back in the game.  In that case you could decide in the neutral phase either to eat your losses by cashing in/consolidating your loss or to double down and go for more leverage.  Another use for the neutral phase particularly at the beginning of the leg is to start executing the overall strategy.  That could be getting inside the persistent shift, getting out of bad current or sailing to where there is better wind, for example.

Monday, April 6, 2015

Persistent Shifts Part 3

Oscillating Shifts

In the first two persistent shift posts I presented some scenarios that were pretty much geometrically perfect, but in the messy real-world boats rarely sail on arcs of perfect circles.  So I want to take some time to cover oscillating shifts with the aim of eventually combine oscillating and persistent strategies.  In the next blog post and by following the link to the game at the bottom of this post, we will get into using some real wind data.

In the below, I have drawn the courses of boats A and B, let’s say they are sailed by prairie sailors from a small lake or coastal sailors who sail exclusively on a small bay in Victoria out of the way of the current.  Either way, they find themselves on a big race course competing against the sailor in boat C who is more used to big courses on bigger water (though conveniently still with negligible current).  Boats A and B know to tack on the shifts, why wouldn’t you?

In this strange diagram, I have colour coded the tacking angles of four different wind directions with a legend of sorts in the bottom right: 4 degrees left, four degrees right, 10 degrees left and 10 degrees right.  I then built the courses of the three boats based on whether they were on starboard or port during which of the phases

Back Stories and Scenarios
To make sense of this diagram, I have made up some back stories...

Boat A came out to the race course a couple of minutes early and figured out that of the two oscillating wind directions, when the wind is in the direction that I have coloured orange, it is a veer (lift on starboard) and when the wind is in the yellow direction the wind has backed (port is the lifted tack).  In the time that A has been paying attention, she does not encounter the red or maroon wind directions.  Naturally A starts on the lifted tack and every time A gets knocked, she tacks: fair enough.

B looked at the windward mark and realized that in the orange phase she was pointing closer to the windward mark on port, so maybe B started on port or maybe she started at the barge on starboard and then immediately after the start she tacked onto port.  B would have been happy after the first shift when she was lifted onto the yellow course even closer to the mark, but then when she was knocked back onto the orange course, B tacked to stay in phase with the shifts.  So B continues tacking on the shifts which usually works back home on small courses on say, Chestermere Lake or Cadboro Bay.
Maybe C had been out on the course checking the wind for 45 minutes before the start which let her notice that although there are bunch of 6 degree oscillations that come and go, there are bigger 14 degree oscillations that come and go more rarely (C didn’t need to know those exact numbers, just the feeling of bigger and smaller shifts and a sense of where they come from).  So C builds a strategy that she should only play the big oscillations and forget about the little ones: stay in phase with only the big shifts.  Maybe C didn’t even do 45 minutes of research with a compass, maybe C just eavesdropped on the race committee channel that was playing at high volume from the pin boat or a coach boat and C overheard the following conversation: 

“Markset, are you happy with the position of Mark 1?  You look a little right to me“

“Affirmative, we have been doing a wind trace and as well as some small shifts, there are 14 degree oscillations perfectly about our rhumb line at this bearing”

“Good work Markset, then, we will leave Mark 1 there”

So C thought: ‘…perfect oscillations about the rhumb line eh?  In that case, I’ll just try to stay on whichever tack takes me closer to the windward mark’

When I showed this diagram to my partner Maura, who is a strong Radial sailor, she was uncomfortable because she thought that I was in danger of encouraging people to bang corners.  For this reason I have not drawn in the windward mark.  With some imagination, we could put this diagram and scenario in different contexts.

Firstly we could have the windward mark just at the top of thr diagram with C on or just below the layline getting ready to round.

Secondly we could say that the diagram only shows the first third of the beat and C continues on to cross A and B for another four minor oscillations before she tacks again on the next major oscillation.  In this case C would continue to make similar gains as the big phases roll through.

Alternately, if we put the windward mark half way up the diagram for a short course, A and B would win because C would have to tack back onto the layline before making it to the big right shift that she had been calling for and without the benefit of having tacked on the small shifts.

Segue about Sailing in the Middle of the Course
There are many (primarily tactical) reasons not to sail in the middle of a big fleet (as A and B would have done with this strategy).  Some of the reasons are that: 

     -The combined effect of dirty air from many boats makes it generally slower if you are not well out in front

     -Puffs and shifts often come in from a side and dissipate and can’t be used by the time they make it to the middle

     -In the middle, with boats to both sides of you, no matter which way the wind goes, lose to someone

     -In the case of the above diagram especially, the boats in the middle have tacked a lot.  In the diagram I have made tacks cost nothing, but A and B have done 7 or 8 more tacks than C so in reality they should be even further behind.  In almost all boats in almost all conditions, tacks are significantly slower than sailing straight unless the tactical gain from playing the shift pays for the cost of slowing down through the tack.  However in the above diagram, you see that A and B’s strategy actually hurt them even before taking into account the cost of the tacks.

To continue on with that train of thought for a bit… a tack often has a double cost if you had been purposefully executing a strategy.  For example:

You had been sailing out towards pressure or out of some adverse current, but then you tack on a nice shift.  After tacking on that shift you have to throw in another tack to get back to heading out towards the puff or current relief.

The cost of tacking can be even bigger if you bring in the tactical consideration that while you throw in this ‘hitch’ (tacking and tacking back) the rest of the boats around you that didn’t tack will be continuing out towards the favoured side.  This lateral separation on the race course becomes leverage against you if you are sailing towards a shift.  If you were sailing to a puff, throwing in the hitch means you spend less time out in the stronger wind of the puff at the edge of the course.  If you were sailing out of adverse current, the hitch keeps you in that current for longer.  So if you throw in the hitch, it had better gain you a bunch of ground to pay for all those disadvantages.

The Payoff

To emphasize the slight difference in course position resulting from the different strategies in the above diagram, at the top of the diagram, I have drawn thin black ladder rungs.  I drew these ladder rungs perpendicular to the rhumb line because according to the race committee the course is perfectly square.  But there are other ways of thinking about the relative position of the three boats.  If we don’t take the rhumb line into account and stay in the present, we have the red ladder rung (red for the red wind phase) corresponding to the instantaneous wind direction which shows that C is even further ahead of any boats to the left of her.  I have also drawn in a brown ladder rung corresponding to the average of the red and maroon wind directions, because C is not differentiating between these smaller wind fluctuations and is calling them one phase.  According to this brown ladder rung corresponding to the major right phase, A is even further ahead of the boats to her left.  It is worth noting that because C is directly upwind of B, she has no leverage on B, so the different angles of the ladder rungs have essentially no effect.

A Last Scenario

In a fourth and final scenario for the diagram, we can imagine that there is no major phase, that is, there is no back-and-forth to the larger oscillations, instead the 14 degree right shift was a one-time event.  For example C saw a wind line on the right that A and B overlooked and so C ignored the oscillations, put all her eggs in one basket and pinned it out right.  The wind line magically came in at the right time and C just beat A and B to the mark.  In this scenario where the 14 degree wind shift was a one-time event this is effectively a persistent shift (and this scenario would make C is a corner banger).  One of the big things that I am trying to illustrate is that by comparing the fourth scenario with the first, you can see that that the winning strategy for a persistent shift is the same as for a long phase oscillating pattern that takes longer to oscillate through its major phase than the length of one beat: here we come back to the importance of time scale.  Often in a very slow oscillating shift, the legs of the race must be raced like persistent shifts.  This one of my justifications for talking so much about oscillating strategy in a series supposedly about persistent shifts.

For your homework today try playing this game:

When I was searching around for online software or games that could help me illustrate these racing scenarios, I came across this interesting site.  It claims to use a real weather station as the input for the game’s wind:

“Wind oscillation is real from ultra-sonic weather station at NannyCay marina BVI. So, no wind - no game.”

The point of the game is to try to beat Sail Racer’s strategy algorithm.  There is no dirty air, no Racing Rules of Sailing or collisions, the boats are always sailing close hauled at the same speed except for out of a tack, but tacks are very inexpensive, a mere 10% of boat speed for one second.  So it is almost completely a strategy game, though you do have the computer’s boat to check in with and copy if you are a defensive-minded tactician.

Enjoy!  The next blog will use an example from this game.

Wednesday, April 1, 2015

Persistent Shift Q&A

Here are some questions and answers about the first two blogs.  Please feel free to contact me with more questions and I will see if I can find time to make the answers into more posts. 

1  What is the definition of a persistent shift?  Is it a shift that persists going in one directional (with some pauses perhaps) throughout one upwind leg of a course, (and can include some minor oscillations during the leg?)

Yes I would say that hits the nail on the head for a definition.  The wind could be moving gradually, in bits and pieces, even oscillating, but as it oscillates it generally trends more to one side.  I would even include big one time shifts that don’t come back as persistent shifts because the strategies are similar.   

A difference with the one time event is that if you miss it, it is harder to come back, whereas often in gradual persistent or oscillating-persistent shifts, you can make a small mistake at the beginning of the leg treating it as purely oscillating, but then realize your mistake and pick your time to dig in fairly hard to the side that the shift is coming from.  This way you may be able to recover your losses by getting to that side before the worst of the shift comes through.   

The key thing for a persistent shift is that if the wind goes one way, it does not come back in the time before you round the next mark or sail back to the middle of the fleet (consolidate you losses or gains).  So it is obviously a persistent shift if the wind was never going to come back like with the transition from a gradient driven wind to a thermal driven wind, but if the wind is oscillating on a long time scale and there is potential for it to come back then it matters how far away the next mark it.  If it doesn’t come back before the next mark then over the course of the leg, the long time scale oscillating shift was effectively a persistent shift, or another way to say it would be to say that the oscillating shift was so slow that persistent shift strategy works  By persistent shift strategy I mean: getting to the side towards which the wind is going to shift before that shift happens (for a one time shift), or getting to the side towards which the wind will continue to shift (for a gradual shift).  I will get to oscillating-persistent shifts in upcoming blogs.

2  In your basic advice about oscillating shifts in Part 1 of the Persistent Shift Blogs, what is the difference between the basic advice "tack on knocks" and "tack on knocks past the median"?

The second strategy is just a more sophisticated version of the first strategy.  Often in oscillating breeze, there are just two directions that the wind oscillates between, so if you tack every time you get knocked (which is the result of the first and second strategy) you will do fine.  If on the other hand there are multiple wind directions, then when the wind is in the extreme right you need to be on starboard and if the wind is in the extreme left you have to be on port, but if the wind is in the middle it is more of a judgement call and you can play out your boat-on-boat tactics or if tacking on an extreme shift takes you away from your plan, you can use the next shift to a middle wind direction to get back to executing your overall strategy.

Here are some ideas for what to do with a middle phase, that is, if the wind shifts to the middle of the course (blowing down the rhumb line).  If you are closer to the top of the course you probably want to sail towards the rhumb line to avoid risking overshooting the layline.  If the wind shifts to the middle direction at the beginning of the leg you can do whatever you like: if the course is skewed, I would recommend spending your time during the median phase sailing the longer leg or sailing into the current if there is cross-course current, since you will have to spend more time sailing on that tack over the course of the leg anyway.  To convince yourself of that, think of the consequence of doing the opposite.  If you sailed the shorter tack on the middle phase (especially at the beginning of a beat), you might use up that tack (be very close to the layline) and not be able later in the beat to tack on an extreme shift that puts you on the short tack without sailing over the layline while your competition could make big gains on the extreme shift if they are well clear of the layline.

Other decisions for what to do with your middle phase at the beginning of the leg would be sailing towards the side that you think is favored: tide or current, wind speed, any other factors.   

If you have already made some gains from a good start or some good shifts etc.  You can spend your median phase tacking back across to windward of your competition.  This reduces the leverage between you and your competition so that it is not easy for your competition to find a way to take your gains back from you.  Two terms to describe that decision are: ‘cashing in’, or ‘consolidating’.

If the wind is smoothly pivoting right and left to varying degrees it is more difficult to decide what the middle wind direction is.  This is where you have to make a judgement call on what is the median.  One strategy is to take the mathematical median from your compass bearings and call the middle of the two most extreme right and left wind shifts the median.  If you do this, how far do you think back before forgetting your old extreme shifts?  Another strategy is to just make a judgement call on which general wind direction tends to reoccur most, call that the median and then tack whenever the wind heads you past that heading.  At any rate, somehow use observations and judgment to you chose your median wind direction.  If you have a compass, and depending on which model of compass you have, you will need a number for the heading you should have when sailing the median on Starboard and a number for your heading when sailing the median on port.  These numbers should subtract to make up a credible tacking angle.  Many people, though, are doing this by intuition:
“Hmm yes, this feels like the normal wind direction"
"Okay I am headed, but not as far as before, I'll say it feels like the middle wind direction" 
"My bow looks like it is pointing on a line that is roughly 45 degrees to the rhumb line, so I figure I am close to the median."

If you get lifted from whatever you are calling your median heading then you just continue to sail.  If you get headed back down to that same heading you just continue to sail, don’t tack unless you have some other reason to tack (as mentioned in the ideas for what to do in a middle phase).  This is what separates the first simple strategy from the second, because the first strategy of tacking on the knocks suggests that you should tack when the wind heads you down to to the median which is not necessarily your best move.  However if you get knocked below that median heading, only then do you tack.  You have to be pretty confident in that median to make the call of not tacking when you get headed down to it.  I will post an online sailing game in an upcoming post that is great for trying to pick a better median than the computer algorithm picks.   

To bring this back on topic:  in a persistent shift you have to realize that there is no median, that is, there is no direction that the wind will eventually come back to or shift back and forth about fairly reliably, at least not on this leg.  Once you realize that, you throw out your median and just try to get inside the shift (persistent shift tactics).

3  From the previous blogs, your advice about oscillating shifts was clear, simple, and easy to remember.  Your advice on persistent shifts is a bit buried, but I think it is:

get to the side that is going to be (more) upwind before the worst of the shift happens

If you start a leg believing it to be a persistent shift I guess the advice is go to the side that is more upwind?  Is there a snappier kind of advice that might be easily remembered?

Your rephrasing of the advice to "go to the side that is more upwind" is close, but actually that makes it incorrect in many cases.  It is important that the advice be: get to the side that is GOING to be (more) upwind.  The key with a persistent shift is that you are acting on what is GOING to happen in the future.  That is why I emphasize that you should really only act on persistent shift strategies if you are very confident about what is going to happen.  If you are unsure, stick to the fleet, stay safe (less leverage) and try to collect more information.  I throw in the (more) because the wind does not always go back, it is also possible that the wind starts slightly to one side and then it goes more to that side, the (more) is in brackets because that is not always the case as in the scenario below.

Here is a scenario where the "side that is more upwind" is actually the side you want to sail away from:

If you have a long phase oscillating shift and you are rounding the leeward mark in the farthest right of a right phase or you round just as the wind shows the first hints of coming back left, then even though the right is currently noticeably upwind, the left will soon become upwind.  So in here you want to get to the left side now while it is easy to get to because the left side is GOING to be upwind as the wind shifts that way.  If you make it to the left of the fleet then as the left becomes upwind you make it upwind of your competition.

In this scenario someone using the oscillating wind strategy of tacking when the wind first knocks you would start going left on the lifted tack, but then would tack as soon as they realize that they are being knocked.  

In the same scenario someone using the more refined strategy of eating the knock until the wind direction crosses the median might wait until the wind direction has shifted left past the rhumb line (if that is a credible median direction) and then they would tack.

However the sailor in this scenario who realizes that the wind will not have time to oscillate back to the right on this leg because of the long phase of the oscillation will keep on sailing left on the knock until they think that by tacking now, they will get lifted up to the layline.  A safer approach would be to give that layline a bit of safety and just tack once you have a lot of leverage on the fleet – play the fleet not the course- to be safe.

How is this for snappy advice: 

If you REALLY think it is persistent, get inside the shift.

Unfortunately that involves understanding the jargon 'get inside the shift,' but it is just another way of saying the long-winded “get to the side that is going to be (more) upwind before the worst of the shift happens and put some leverage on the fleet.”
Notice that for brevity we have forgotten to add that you should do this without overshooting the mark.

4  Could you define "lifted tack" for the glossary?

Lifted Tack:    The tack that takes you closer to the median, or when there is no discernible median, it is the tack that brings you closer to the mark.

It is tempting to say that the lifted tack is the tack whose angle is closer to being lined up with the rhumb line, but since windward legs are often skewed, especially if you are dealing with persistent shifts which are hard to set courses for, the lifted tack (the tack that takes you closer to the median wind direction) could end up being the tack that takes you away from the mark and in that case it would actually be closer to being perpendicular to the rhumb line.  If you find yourself in the skewed course situation where the lifted tack takes you away from the mark, you have to decide when is your best time to sail the tack that takes you closer to the mark.  Your options are to spend some time sailing on the headed tack (opposite of the lifted tack), or to wait for another favourable oscillation to take you towards the mark but to risk sailing to the layline in the meantime.  If a median phase came along, this would be a good time to use it to go to the mark since sailing the header back to the mark could be costly.

5  Assume the wind has shifted a couple of times — oscillating — on an upwind leg and I am in the last third of the leg — should I treat that last third as a persistent shift if I do not think the wind will shift back again before I get to the windward mark?

Two answers depending on the prediction for what will happen next.  Firstly if you think the wind will continue shifting more to the left for now, but will go right after you have rounded.  In this case get left for the last part of the leg: get inside the shift.  This is if we are speaking only of strategy and it is safe to ignore boat-on-boat tactics.

On the other hand it is a different answer if the wind has already shifted left and you are confident that the wind will stay that way for the rest of the leg.  In this case there is no upcoming shift for you to get inside for the persistent shift strategy.  In this case you are expecting no more changes on the leg, so it is as if we are considering the rest of the leg as a small, skewed leg in stable breeze.  There would be no more advantages to be gained by wind shift strategy so putting yourself in a position to win the tactical battles becomes the only factor.

As I say above, this talk of strategy of the last third of the leg is all based on the usually invalid assumption that there are no boat-on-boat tactics.  In the last third of the beat tactics usually overrule everything else especially in larger and larger fleets.  I was going to say that tactics might not come into play if you were alone out in front, but even then you should usually tack to windward of your competition to deny them leverage.  Maybe I can think up a scenario where there would be negligible tactics on the last bit of the beat, though:

If you were in second place, well ahead of third in the last day of the regatta and nobody can catch you on the scoreboard, but points-wise you can catch first place if you beat them, then first place will just be tacking on you and staying between you and the mark, so it is your job as the second place boat to call the strategy.  However if it is the first place boat that can’t be caught in the standings, the second place boat might just be covering the fleet (reducing leverage) and more or less ignoring strategy.