-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Asymmetrical 8x8 Pawn PSQT #1839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Very nice work here !!👍👊 |
|
Very cool!. . . it will be fun to try to get it back down to symmetric 4x8 without losing elo. :) |
|
Just a question... why isn't this being committed? I thought it passed both STC and LTC? Or am I missing something here? |
Maintainers do not like adding much new code or many new parameters. |
|
Most likely they just do not always have the time to merge patches within three days or are just waiting to allow people to comment on a patch before merging it. Please be patient, I am pretty sure no maintainer is intentionally ignoring this PR. |
|
now when http://tests.stockfishchess.org/tests/view/5c05020e0ebc5902bcee390c this patches passing SPRT I think the most logical thing to do will be next steps:
|
|
OK, I'll wait with my tuning values |
official-stockfish#1839 bench: 3612555
|
I scheduled http://tests.stockfishchess.org/tests/view/5c0880200ebc5902bcee7d76 to gather more information. |
|
The result was: |
|
Maybe I misunderstand, but there is IMO no strong reason that pawn square tables should be symmetrical (also for other pieces I suppose but maye it is stronger for pawns) because pawns can not move freely from file to file, it mainly is a bonus to move forward more for one pawn then another and pawn storms are more likely against short castled kings. (I don't know if you can see that in the bonuses I have not checked that, the bonuses can either encourage or discourage pawnstorms on one side of the board), |
|
IMO, these tables should be symmetric. However, since this proves to gain elo, it can be committed. If pawns truly could be symmetric, then certainly someone can simplify it back to 4x8 without losing the elo gain. If not, then the pawns table is better left asymmetric. |
|
In theory since all pieces apart from pawns can move forward and backward PSQTs should be 4x4. |
Assuming this is the case isn't a huge issue, but it's nonetheless suboptimal. Chess is not symmetric between kingside and queenside. Of course, depending on if the kings end up castling kingside and/or queenside, the dynamics will be different and even having the full 8x8 table is suboptimal as it mostly covers the most common situation. But the way to handle these different dynamics better is certainly not to entirely ignore them. PSQT as a whole are a bandaid to patch limitations of eval heuristics. |
|
when is this getting merged? its been already more than a week |
|
With symmetrical psqt, i guess the psqt holds the default case to
encourage the pawns away from the king to move forward (usually qside), and
the shelter / storm scores modify that for the pawns near the king.
Perhaps the asymmetric psqt here can give us clues to weaknesses in those
modifying scores? I tried a test that adjusted the shelter storm bonus
values based on the asymmetry found here but it didn't get anywhere.
|
|
@xoto10 |
|
@mcostalba I think this one should be merged. At least people will have codebase to simplify it and it's a pretty clean elo gainer :) |
|
@Vizvezdenec patch looks good for me. |
|
If it is merged, I hope people don't try and simplify it away immediately. There should be a chance for it to bed in, a chance to tune other parameters now that this is present, and make other adjustments to take advantage of this new feature, not just get rid of it asap. |
|
@xoto10 I agree since the simplification attempt was already tested and failed. See my test above. |
|
What's happening here? |
|
OK, I have merged the patch by popular request in 883367d, congrats :-) But I would say that I didn't like the new values at all, especially the asymmetrical endgame values: |
|
@snicolet well, look at rook endgame PSQT mess now... It also makes 0 sence. Some black magics, what I can say :) |
|
More chaos is not the way to go I think... We should take some effort and try to make these values more sensible. |
|
The point of SPSA tuning is that automating value tuning is much more efficient than trying to hand-tweak it. Trying to change PSQTs by hand to make it satisfy our feels is a terrible idea. We are missing the patterns that make the tuned values more sensible.
Likely because the e7 pawn will typically be more vulnerable to the black king than the d7 pawn, and at the very least would require one more tempo for a kingside castled black king to attack it. So trying to get a d file passed pawn will usually be more advantageous than trying to get an e file passed pawn. Of course, these values are more adapted to the typical kingside castling game and are probably not that great against queenside castling ; but on average they perform better. PSQT are very useful, because they offer a usually decent approximation with very little computational overhead. But they lack generalization and there will always be positions where they simply fail. If some tuned PSQT values seem weird to us, this is an indication that they are trying to compensate for something that the rest of the evaluation function is missing. This apparent weirdness for d6/e6 and d7/e7 should not be seen as a failure of the PSQT, but as a failure of the code trying to evaluate passed pawns. It should drive attempts to improved passed pawns evaluation, not to simplify away the assymetrical PSQT. Also, we should keep in mind that a good patch improving how e.g. passed pawns are evaluated would risk to not work as well as expected because the PSQT and the evaluation change would add up and overshoot. Hence, logically sound patches addressing an issue pointed out by a PSQT weirdness should use a small SPSA tuning session before being tested at STC/LTC. This is a general issue at this point of StockFish's development : a genuine improvement may not be able to pass without some retuning because another piece of code is somewhat compensating the weakness and would conflict with the better way of addressing it. |
STC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 13323 W: 3015 L: 2818 D: 7490 http://tests.stockfishchess.org/tests/view/5c00a2520ebc5902bcedd41b LTC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 52294 W: 9093 L: 8756 D:34445 http://tests.stockfishchess.org/tests/view/5c00b2c40ebc5902bcedd596 Some obvious followups to this are to further tune this PSQT, or try 8x8 for other pieces. As of now I don't plan on trying this for other pieces as I think the majority of the ELO it brings is for pawns and kings. Looking at the new values, the differences between kingside and queenside are quite significant. I am very hopeful that this a llows SF to understand and plan pawn structures even better than it already does. Cheers! Closes official-stockfish#1839 Bench: 3569243
STC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 13323 W: 3015 L: 2818 D: 7490 http://tests.stockfishchess.org/tests/view/5c00a2520ebc5902bcedd41b LTC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 52294 W: 9093 L: 8756 D:34445 http://tests.stockfishchess.org/tests/view/5c00b2c40ebc5902bcedd596 Some obvious followups to this are to further tune this PSQT, or try 8x8 for other pieces. As of now I don't plan on trying this for other pieces as I think the majority of the ELO it brings is for pawns and kings. Looking at the new values, the differences between kingside and queenside are quite significant. I am very hopeful that this a llows SF to understand and plan pawn structures even better than it already does. Cheers! Closes official-stockfish#1839 Bench: 3569243
STC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 13323 W: 3015 L: 2818 D: 7490 http://tests.stockfishchess.org/tests/view/5c00a2520ebc5902bcedd41b LTC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 52294 W: 9093 L: 8756 D:34445 http://tests.stockfishchess.org/tests/view/5c00b2c40ebc5902bcedd596 Some obvious followups to this are to further tune this PSQT, or try 8x8 for other pieces. As of now I don't plan on trying this for other pieces as I think the majority of the ELO it brings is for pawns and kings. Looking at the new values, the differences between kingside and queenside are quite significant. I am very hopeful that this a llows SF to understand and plan pawn structures even better than it already does. Cheers! Closes #1839 Bench: 3569243
STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 13323 W: 3015 L: 2818 D: 7490
http://tests.stockfishchess.org/tests/view/5c00a2520ebc5902bcedd41b
LTC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 52294 W: 9093 L: 8756 D:34445
http://tests.stockfishchess.org/tests/view/5c00b2c40ebc5902bcedd596
Some obvious followups to this are to further tune this PSQT, or try 8x8 for other pieces. As of now I don't plan on trying this for other pieces as I think the majority of the ELO it brings is for pawns and kings.
Looking at the new values, the differences between kingside and queenside are quite significant. I am very hopeful that this allows SF to understand and plan pawn structures even better than it already does. Cheers!
(Updated with fully tuned values which passed STC)
Bench: 3826765