At Cowes week this year one of my friends reassured a Fastnet Race competitor that sailing was essentially very easy, in fact you just point the boat where you want to go and pull the sails in until they stop flapping. This made me wonder if there was a very simple but functional algorithm for sailing that could be expressed as a small flowchart. It's slightly more complicated than my friend's description because it also covers the case where you can't pull the sails in enough to make them stop flapping whilst pointing the way you want to go:
I think this pretty much covers it, at least as far as white sails go. You end up either close hauled and constantly steering to the point where the sails flap, or reaching and constantly trimming to the point where the sails flap. I know that in practice it can be more complicated that this, but not much, this flowchart certainly captures the two essential modes of sailing. I also like the fact that there is no end point, no state which you can relax in, you're doomed to constantly trim, or steer, to the edge of flapping: I think that's pretty accurate!