PraxTube / chess-ai

A chess AI that uses alpha-beta to find the best move
MIT License
0 stars 1 forks source link

Automatically generate .tex table from benchmark .csv #11

Closed PraxTube closed 1 year ago

PraxTube commented 1 year ago

It would be very useful to create the .tex (latex) file for the benchmark table automatically. We would want the following output

\begin{table}[ht!]
  \caption{}
    \centering
    \begin{tabular}{cccc}
        \toprule
        Tested Category & Early-Game & Mid-Game & Late-Game \\ \toprule
    Fen Conversion & 12 $\upmu$s / |  & 14 $\upmu$s / | & 9 $\upmu$s / | \\ %\midrule
        Legal Move Gen & 145 $\upmu$s / 3 $\upmu$s & 900 $\upmu$s / 3 $\upmu$s & 175 $\upmu$s / 3 $\upmu$s \\
        Making Move & 5 $\upmu$s / 11 $\upmu$s & 5 $\upmu$s / 11 $\upmu$s & 5 $\upmu$s / 11 $\upmu$s \\
        Evaluate Board & 21 $\upmu$s / 88 $\upmu$s & 24 $\upmu$s / 87 $\upmu$s & 20 $\upmu$s / 59 $\upmu$s \\
        Best Move Search & 1.2 ms / 9.3 ms & 2.4 ms / 34.3 ms & 0.6 ms / 2.0 ms \\ \bottomrule
    \end{tabular}
\end{table}

The .csv file that get's created from the benchmarks should be used to create the above table. See #7 for move info on the .csv file.

PraxTube commented 1 year ago

I won't have to write too many .tex tables anyways, so I am gonna close it and just write them manually.