Re: compiling stockfish with more options
Posted: Mon Jan 14, 2019 7:02 am
The #define changes the constant during compilation, no loss of speed, no size change of the executable.syzygy wrote: ↑Sun Jan 13, 2019 2:03 pmNot at runtime, as you seem to admit yourself.Rebel wrote: ↑Sun Jan 13, 2019 4:57 amActually QueenValueMg can be changed without loss of speed and change of code,syzygy wrote: ↑Sun Jan 13, 2019 3:09 amQueenValueMg is a compile-time constant. Compile-time constants cannot be changed at runtime.majkelnowaq wrote: ↑Sat Jan 12, 2019 8:21 pm Here is my problem. I can add new tuning option just visually by adding something like "o["X"] << Option(100, 0, 100);" in ucioption.cpp but i cant actually connect it in proper way to some value. For example i want for "X" to change parameters in types.h file, we can say "QueenValueMg".
You would have to turn QueenValueMg into a global variable. This is not trivial, since other places in Stockfish expect its value to be known at compile time. It would also slow Stockfish down a bit.