MrPiada / ChessRepertoireGenerator

MIT License
1 stars 0 forks source link

output formatting #12

Closed MrPiada closed 1 year ago

MrPiada commented 1 year ago

Example of the actual output:

(1m49s) ------- 10 c7c5 3% (395) -- 0.89 -- 62/3/34

r n b q k b . r
p p . . . p p p
. . . . . n . .
. . p . p . . .
. . . p P . . .
. . . . . N N .
P P P P . P P P
R . B Q K B . R

white %                                 engine eval                             log10(depth freq)
 ∧                                       ∧                                       ∧
 │+63                     o              │                          o            │                          ∘
 ┼                 o o  o   o            │+1.1                                   │+48
 │            o  o                       ┼                                       ┼
 │      o o o                            │                                       │
 │-- o------------------- -              │                                       │
 -                                       │                      o                │
 │                                       │                                       │
 │                                       │                                       │
 │                                       │                                       │
 │                                       │                        o              │
 │                                       │                 o                     │
 │                                       │                                       │
 │                                       │                                       │
 │                                      ─│───o────o──────────o──────┼>           │                        ∘
 │                                       ┼0                       12             │
 │                                       │               o                       │
 │+1.3                                   │-0.34 o     o                          │+1                  ∘ ∘
─┼──────────────────────────┼>           ┼          o                           ─┼────────∘─∘─∘─∘─∘─∘───────┼>
 ┼0                       12             │                                       ┼+0.0053                 +1
                           ply                                     ply                                     ply

TODO list:

MrPiada commented 1 year ago

For the information formatting.

from tabulate import tabulate

data = [
    ["Elapsed time", "1m49s"],
    ["Ply", "10"],
    ["Move", "c7c5"],
    ["Move freq", "3%"],
    ["#Games", "395"],
    ["EngineEval", "0.89"],
    ["MoveScore", "62/3/34"]
]

table = tabulate(data, tablefmt="plain")

print(table)
MrPiada commented 1 year ago

https://github.com/MrPiada/ChessRepertoireGenerator/issues/12#issuecomment-1674393872 Would be great if the "Move" field could be expressed in "standard" #notation.