Then I bought several guitar magazines. They all had tab and they all wrote it out as a second line underneath the 5-line version. In the end I decided that perhaps I should go with the flow, so that's the way that Muse does it. I'd wanted to write a program to crack the fingering problem for many years, but the combinatorial problem was so hideous. It is absolutely inadequate to consider the piece one note or one chord at a time.
Many pieces have a few places where there is a difficult stretch or something awkward.
That awkward bit has to be made as easy as possible, and if that means playing the previous six bars in a position that would otherwise be unnatural in order to arrive at the awkward bit with the hand in the right place, then that's what has to happen. I finished up with an algorithm that really does consider every possible combination. The algorithm I eventually came up with really does consider them all. An experienced guitarist with large strong hands will use many more barlocks that a beginner with small weak hands. You can tweak the output.