The middlegame PST for kings seems to be wrong, it seems to favor moving the king to higher ranks instead of discouraging that.
if the piece type is in the range [1 .. 6]. The factor "6" can of course be any number >= 6.
What about the raw speed of this engine? For instance, your move ordering implementation appears to be quite slow since you calculate the ordering scores for each moves within the comparison operator so you calculate it many times for the same move. What about making the ordering score a member of the move and calculating it only once?
I wonder why you set the hash move as killer move, I can imagine a negative impact on the quality of your move ordering.
I also wonder why you check for "king capture" within the move loop even though you also have an explicit legality check when making a move so that you can never reach a position where the enemy king can be captured. Furthermore, when ignoring that redundancy, the correct score for a position where the king can be captured should be higher than MATE-ply in my opinion since a "mated" position where all pseudo-legal moves lead to capturing the king would already have occurred one ply earlier.
If you would like to know why this engine is so weak I would suggest to disable all pruning code and test that against the original version. Maybe the problem is somewhere within the pruning?
Maybe, as a 2000 lines c++ code, it may also become an entry point for beginners.
Not sure whether a 2-days work is always suitable for that purpose Once you know there are no serious bugs and it has an acceptable strength then go for it, otherwise I suggest first to fix the code before proposing it to beginners.
Thanks for the comment. I Will simplify mvvlva table and piece type accessor. move score is already backuped.
A neat little engine to play with indeed. It lost rather quickly to the 1600-Elo rated Monochrome and obtained a big advantage vs. 1060-rated Soberango, only to go unexpectedly for a threefold repetition.
Note that the execs require -xboard on the command line to enable the Winboard/Xboard mode.
Minic can win a KRK endgame. Amazing! I can name at least a dozen engines many hundreds Elo higher that can only draw.
Well using rofchade PST it can even win against fairy-max sometimes ... Thanks for testing it.
100 of 100 games finished.
But it's 2200+ lines now, you cheat.