piece values, scale factor stuff and phase is eval. all the other stuff is support code used in both the move generator and search, so I did not include them in either Komodo or Stockfish line counts. If you are going to include that in the Stockfish line count for eval, a similar number of lines would need to be added to Komodo. In general, types.h should define the types of variables/structures used. I find putting basic piece values in there a bit strange. Doubtless, Stockfish programmers would find a lot of things in Komodo strange too.Lyudmil Tsvetkov wrote:I see types.h including more eval-related stuff than otherwise.mjlef wrote:Komodo has a kind of KPK database in it, which is like the rules Stockfish uses to generate the same information that is in bitbase.cpp. So I left them both out. Komodo's version had both data and code, which would unfairly increase the line count for Komodo. So I left it off of both of them. I could recount with them if you want but the ratio would increase.Lyudmil Tsvetkov wrote:I did not include bitboard.cpp, which is very large in SF too, but bitbase.cpp, which is another thing.mjlef wrote:Komodo does scale opposite color bishop endings and ppxxx vs pxxx endings. I have not compared how much we scale by compared with Stockfish, but I assure you it is in there.
I did not include the bit board code in Komodo or Stockfish in my line counts since it is not part of the regular eval. Including the Komodo equivalent would greatly increase the K linecount.. And only a small part of types.h is eval related, although I see Stockfish puts piece values in there. You are right endgame file should have been included. Counting the same the ratio would be more than 2 to 1.
well, somehow I don't quite unerstand that: one the one hand you would not claim Komodo has more terms than SF, on the other you still insists line count is more than 2/1.
really difficult for me to make precisely sense of what is going on, but maybe it is better to leave things like that now, anyway Komodo is not public domain and you reserve the right to reveal or not sensitive information.
[d]8/5kp1/4r3/2R5/5PP1/6K1/8/8 w - - 0 1
Komodo: +100cps, looks like not scaling this
types.h has almost no eval code in it (just the piece values for opening and endgame, whihc is just a couple of lines). The rest is general function prototypes and definitions used more in the move generator and search than in the eval. So that is why I did not include it.
Mark
enum rank, enum file, enum scale_factor, enum phase, enum piece, enum score, enum castling, enum castling right...
also, most inline functions, inline fileof(square s), inline colourof(piece pc), relative rank(colour c, piece pc)...
so, basically, should be included.
I don't know why you want to make it a factor of more than 2, when this would contradict a couple of related conditions.
If I included some tables used in the eval defined elsewhere in Komodo, the line count of the eval would grow again. When you talked about the eval, I assume you mean code that actually calculates the evaluation. This is a lot bigger in Komodo than in Stockfish. In Komodo, this code is in a file named pop.cpp. Special evaluations for some endgames, table filling code and the like is in eval.cpp and elsewhere. The code that is run on 99.9% of the positions searched is in pop.cpp, and that is simply much bigger than in Stockfish. But we do this in a way that does not take up a lot more time than Stockfish. Comparing like nodes and dropping lazy eval from the programs, and Komodo gets around 16% less nodes per second. The reason it is not worse, is Komodo uses precomputed values, caches more information, and has I think a slightly faster magic multiplication system than Stockfish uses. Of course, Stockfish's PEXT based sweep attacks is faster still. I should write that one day, but I want to see if I can find a way to do it so it is autodetected, so users do not need a =to pick the right version.