thank you for the stockfish evaluation linkmsarchet wrote: ↑Fri Oct 01, 2021 6:50 pmdangi12012 wrote: ↑Thu Sep 30, 2021 2:02 pm You have this code a lot: bitboard queens = c == WHITE ? board.GetWhiteQueens() : board.GetBlackQueens();
If you move WHITE to a template parameter - and have a constexpr function like this:
So the answer is: Adding soft negative moveterm to the queenmove (-0.5?) that depends on the movecount and approaches zero on move 12.Code: Select all
template<bool IsWhite> static constexpr map Queens(const Board& brd) { if constexpr (IsWhite) return brd.WQueen; return brd.BQueen; }Still working on upping some of my C++ skills so this is very helpful. There are a lot of things I still need to learn and implement to clean up my code. In terms of my overall eval speed, it's okay. I've been using valgrind to profile and my eval time is quite a bit of my search time (which makes sense?). I'm not super worried about search times right now so this hasn't been my focus. I'm doing fixed depth search for the time being since it lets me better compare a change to my code against the prior version.
Yeah I've assumed this was part of the case, I made use of the PST from the CPW for starting out (which I think is commented in my code).Mergi wrote: ↑Thu Sep 30, 2021 6:13 pm You have mid and end game tables but they are both exactly the same, and they both prefer queen in the middle of the board. Why don't you try changing that? I'm confused ... what exactly is the issue here? Bringing out queen early is what you coded into your queen PST.
https://github.com/msarchet/panzer/blob ... res.h#L173
I'm still trying to get through all of the eval bits I would like to implement. After that I need to do some work on properly understanding Static Exchange Eval. I've been slowly going through the CPW Eval code and some of the deeper suggestions on the wiki. I recently have been exploring some of the code sample in here as well. Which is helpful for me understanding what the heck I am doing.Code: Select all
https://hxim.github.io/Stockfish-Evaluation-Guide/
----
Eval is definitely a very difficult problem, and I'm finding that I probably need to implement it more completely before I start trying to parse why certain things are happening. Really appreciating these suggestions.
btw, do you know what the << 0 are for? they don't change anything
Code: Select all
function main_evaluation(pos) {
var mg = middle_game_evaluation(pos);
var eg = end_game_evaluation(pos);
var p = phase(pos), rule50 = rule50(pos);
eg = eg * scale_factor(pos, eg) / 64;
var v = (((mg * p + ((eg * (128 - p)) << 0)) / 128) << 0);
if (arguments.length == 1) v = ((v / 16) << 0) * 16;
v += tempo(pos);
v = (v * (100 - rule50) / 100) << 0;
return v;
}