It seems my personal, didn't-look-anywhere-else material values and PSQT's do a reasonable job then
I hope QSearch will also fix the engine starting to play more defensively as depth goes up. It started out with lines such as "1. d2d4 d7d5 2.c2c4 e7e5" when playing black, and it played things like Sicilian variations against e4. With white it often played e4 and did everything it could to push d4. With the same PSQT on higher depths, it's dropping back to crap like the French opening, and then things such as d6, b6, g6, and with white it opens with e3 and d3. I've "fixed" this by giving moves with the center pawns a massive bonus.
I assume / hope that the engine is just 'afraid' of getting pieces captured because it can't see that it can capture back due to missing QSearch, and that I can use more normal PSQT's again after I add this.
Thanks. But still, which one is correct? (I'm just not sure...)For UCI you print eval relative to the side you search for.
If I'm not mistaken, the evaluation function HAS to report evaluation from the side that is to move next, hasn't it?
For example, the starting position with a rook missing... when I set up this position, and type "e", the engine prints the evaluation score as it comes from the evaluation function. (See below.) As it prints 500 if white is to move, and -500 if black is to move, I assume this is correct (because the evaluation is correct for each viewpoint). During during the search, the evaluation will thus alternate between 500 and -500 (if there weren't any other factors beside this missing rook). But still, if the engine is playing black, -500 should be sent to the GUI at any depth, right?
White to move:
Code: Select all
================================================
8 . n b q k b n r
7 i i i i i i i i
6 . . . . . . . .
5 . . . . . . . .
4 . . . . . . . .
3 . . . . . . . .
2 I I I I I I I I
1 R N B Q K B N R
A B C D E F G H
Zobrist key: 6379f48865fa79a8
Active Color: White
Castling: KQk
En Passant: -
Half-move clock: 0
Full-move number: 1
Rustic > e
Evaluation: 500
Rustic >
Code: Select all
================================================
8 . n b q k b n r
7 i i i i i i i i
6 . . . . . . . .
5 . . . . . . . .
4 . . . . . . . .
3 . . . . . . . .
2 I I I I I I I I
1 R N B Q K B N R
A B C D E F G H
Zobrist key: 7f5330d54a3b4b0e
Active Color: Black
Castling: KQk
En Passant: -
Half-move clock: 0
Full-move number: 1
Rustic > e
Evaluation: -500
Rustic >
Thanks Now that the implementation of communication between threads has settled down, it's mostly just busy-work like packing/unpacking/parsing information and sending it where it needs to go. It won't be too long now before the engine can actually be connected to a GUI.Nice progress
The only thing left to do now is dotting i's and crossing t's, and debating how much functionality I will add before I start play-testing it and then releasing it. It'll probably will be released with QSearch, a TT, and a PV, and I'll do additional sorting later in a version 1.1.