chessmadra-frontend icon indicating copy to clipboard operation
chessmadra-frontend copied to clipboard

Order of sidelines in the exported pgn file

Open alexandru-duca opened this issue 3 years ago • 1 comments

I would like to suggest a different order of sidelines in the exported pgn file. Consider the following repertoire:

1. d4 f5 (1... d5 2. e4 dxe4 (2... e6 3. Nc3 Nf6 (3... dxe4 4. Nxe4) 4. e5) (2... c6 3. Nc3) (2... Nf6 3. Nc3) 3. Nc3 e6 (3... Nf6 4. f3 exf3 5. Nxf3 Bg4 (5... e6 6. Bg5 Be7 7. Bd3) 6. h3) (3... c6 4. f3) (3... f5 4. Bg5)) (1... Nf6 2. Nc3 d5 (2... g6 3. e4 d6 (3... Bg7 4. e5 Ng8 5. Bc4) 4. Bg5 Bg7 5. e5 dxe5 6. dxe5 Qxd1+ 7. Rxd1) (2... e6 3. e4) (2... c5 3. d5 d6 4. e4) 3. e4) (1... e6 2. e4) (1... c5 2. d5 d6 3. Nc3) (1... g6 2. e4 Bg7 3. Nc3 d6 4. Bg5) (1... c6 2. e4) (1... d6 2. e4 Nf6 3. Nc3) (1... e5 2. dxe5 Nc6 3. Nf3) 2. e4

Importing and exporting this repertoire in the opening builder doesn't change the order of sidelines. Notice how 1. d4 f5 2. e4 is the mainline without being the line that is played most often. I suggest to export the repertoire in such a way that the most played move (in the selected elo range) corresponds with the main line in the exported pgn file, the second most played move corresponds with the first sideline in the exported pgn file, and so on. Maybe something like this:

1. d4 Nf6 (1... d5 2. e4 dxe4 (2... e6 3. Nc3 Nf6 (3... dxe4 4. Nxe4) 4. e5) (2... c6 3. Nc3) (2... Nf6 3. Nc3) 3. Nc3 Nf6 (3... e6) (3... c6 4. f3) (3... f5 4. Bg5) 4. f3 exf3 5. Nxf3 Bg4 (5... e6 6. Bg5 Be7 7. Bd3) 6. h3) (1... g6 2. e4 Bg7 3. Nc3 d6 4. Bg5) (1... f5 2. e4) (1... e6 2. e4) (1... c5 2. d5 d6 3. Nc3) (1... c6 2. e4) (1... d6 2. e4 Nf6 3. Nc3) (1... e5 2. dxe5 Nc6 3. Nf3) 2. Nc3 g6 (2... c5 3. d5 d6 4. e4) (2... d5 3. e4) (2... e6 3. e4) 3. e4 d6 (3... Bg7 4. e5 Ng8 5. Bc4) 4. Bg5 Bg7 5. e5 dxe5 6. dxe5 Qxd1+ 7. Rxd1

This would make the exported pgn file nicer to navigate and would also put more emphasis on the most played moves (which the opening builder is all about).

alexandru-duca avatar Sep 04 '22 22:09 alexandru-duca

Ah cool idea, agree that this would be nice to have. It would require a fair amount of work actually right now, so it won't be a priority for a bit, but another task I've got planned for the next few weeks will make this easier, so may be able to knock it out then.

marcusbuffett avatar Sep 04 '22 22:09 marcusbuffett