It requires a loop, because you have to step down the PV and display/make each move in succession. Look at how "FormatPV()" is used in annotate.c, it will probably do what you want...
I already had :
fprintf(pgn_file, " %s", FormatPV(tree, wtm, player_pv));
It doesn't seem to do anything...
I'm looking for all variations, not just the best currently searched... Basically, what goes on behind the scenes of the best_line.
current_line.... <--- this is what I'm looking for.
best_line... <--- this is what I have.
I stripped Crafty's display down to just the move_number, PV. Here is what I have for output:
1. Nf3 Nc6 2. Nc3 Nf6 3. e3 e6 4. Bd3 Bd6 5. Nb5 O-O 6. Nxd6 cxd6
1. Nf3 Nc6 2. Nc3 Nf6 3. e3 e6 4. Bd3 Bd6 5. Nb5 Bc5 6. O-O O-O 7. Nbd4
1. Nf3 Nc6 2. Nc3 Nf6 3. e4 e5 4. d4 Bb4 5. d5 Bxc3+ 6. bxc3 Ne7 7. Nxe5 Nxe4 8. Qd4
1. Nf3 Nc6 2. Nc3 Nf6 3. e4 e5 4. Bb5 Bb4 5. O-O O-O 6. d3 d6 7. Bg5 Be6 8. Nd5
1. Nf3 Nc6 2. Nc3 Nf6 3. e4 e5 4. Bb5 Bc5 5. O-O O-O 6. Nxe5 Nxe5 7. d4 Bd6 8. dxe5 Bxe5
If I print the buffer for this I get:
In Utility.c:DisplayPV();
sprintf("s \n",buffer);
(This was all on one line)
. Nc3 Nf6
3. e3 e6 4. Bd3 Bd6 5. Nb5 O-O 6. Nxd6 cxd6Nc3 Nf6
3. e3 e6 4. Bd3 Bd6 5. Nb5 O-O 6. Nxd6 cxd63 Nf6
3. e3 e6 4. Bd3 Bd6 5. Nb5 O-O 6. Nxd6 cxd6. Nc3 Nf6
3. e3 e6 4. Bd3 Bd6 5. Nb5 Bc5 6. O-O O-O 7. Nbd4Nc3 Nf6
3. e3 e6 4. Bd3 Bd6 5. Nb5 Bc5 6. O-O O-O 7. Nbd43 Nf6
3. e3 e6 4. Bd3 Bd6 5. Nb5 Bc5 6. O-O O-O 7. Nbd4. Nc3 Nf6
3. e4 e5 4. d4 Bb4 5. d5 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ves...
This is for the first 30 secs after a "go"
Hmmmm... I'd be drawing dead if I were playing poker.