maksimKorzh wrote: ↑Wed Sep 30, 2020 1:35 am
Marcel, I'd love to, I just don't want to take things like double pawn penalty or passed pawn bonus either from my head or blindly grabbing it from someone's code. I want to learn where the relations between evaluation params are coming from - that's it. And when I understand that I would then want try to compose my own instead of using someoneelses's.
I pretty like the idea of PeSTO - this is in my spirit, but I want to get my own PST values and not grabbing them from Ronald's engine like it is now.
Ah, like that... I also don't know what values should be in there. Maybe I'm going to try some pre-made PSQT tables from another engine to get the search and evaluation going, and then alter them. Maybe I'm going to create some "generic" ones with my own values. For example, for a white king (in the opening, with A1 at the top left):
Code: Select all
0 10 0 -10 0 5 10 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
If you don't do anything else, in a PSQT like that, the king on G1 will have a +20 value compared to one on E1, and +15 on C1 compared to E1. So the program will try to castle short; if it can't, it will castle long. If it goes long, B1 has a +5 compared to C1, so if there's nothing else to do (nothing that gains the program more than +5), it will make the Kc1-b1 move.
Making your own PSQT's and piece values is not hard; and you can always start with something from another engine and then start tinkering with those to make them to your liking.
This is what I meant in other threads: by playing with these values, you can give your program personality. You can, for example, urge it to castle long instead of short. Castling short is the most common move of the two. I wouldn't be surprised if some engines are tuned to play well against a king that is castled short, and go down the drain if the king happens to be on the queenside because those engine's don't know what to do in that case.
Same for bishops and knights; you can make your program prefer knights, and then give it a bonus if those knights cover one another. This will probably create a pair of knights that, if one moves, the other moves next to cover it again. Is that good chess? I don't know, but it would give the engine a distinctive quirk that may lead to interesting games. As an experiment, you could try to make PSQT's for the bishops that avoid the center; you could make PSQT's for any piece to not BE in the center, but to control it from one of the wings, trying for a 1920's hypermodern style.
You could try to add an evaluation called "Steinitz mode", that looks where knights can move, and then give a bonus if such a square can be controlled by a pawn. (Also give it bonuses when you can bash a knight onto a weak square.) A very fun mode would be "Anderssen mode": You just give away all of your pieces, and then hope your opponent will give you the chance for a spectacular mate
If you tune your evaluation function automatically, your engine probably will become stronger, but it won't have any style or personality left.
That's the reason why I'm planning on having either two evaluation functions, or one evaluation that is tuned by default, but can load a personality file with its own values, just like Rodent can.