pieces psqt
Moderators: hgm, Rebel, chrisw
-
- Posts: 433
- Joined: Fri Jan 16, 2015 4:02 pm
pieces psqt
What's a good way to generate pieces psqt without having one weight per cell per piece? One option I'm considering is using 16 vars per psqt (rank, file). Any other ideas?
zurichess - http://www.zurichess.xyz
-
- Posts: 589
- Joined: Tue Jun 04, 2013 10:15 pm
Re: pieces psqt
16 is slightly overdetermined and that can make it slightly harder to tune (or at least to understand the results). I tune 7 for files and 7 for ranks, apart from the piece value. Example of 7 parameters to give 8 file offsets as follows:brtzsnr wrote:What's a good way to generate pieces psqt without having one weight per cell per piece? One option I'm considering is using 16 vars per psqt (rank, file). Any other ideas?
Code: Select all
* The 8 coefficients for file scoring are built from 7 tunable
* parameters as given by:
*
* parameter
* 0 1 2 3 4 5 6
* fileA 1 - - - - - -
* fileB -1 1 - - - - -
* fileC - -1 1 - - - -
* coefficient fileD - - -1 1 - - -
* fileE - - - -1 1 - -
* fileF - - - - -1 1 -
* fileG - - - - - -1 1
* fileH - - - - - - -1
E.g., for rook files:
// Parameters:
P(rookByFile_0, -72), // fileA
P(rookByFile_1, -76),
P(rookByFile_2, -50),
P(rookByFile_3, -12),
P(rookByFile_4, 32),
P(rookByFile_5, 51),
P(rookByFile_6, 89), // -fileH
// Application:
if (fileIndex > 0)
rookScore -= v[rookByFile_0 + fileIndex - 1];
if (fileIndex < 7)
rookScore += v[rookByFile_0 + fileIndex];
Last edited by mvk on Wed Nov 11, 2015 11:07 pm, edited 1 time in total.
[Account deleted]
-
- Posts: 2204
- Joined: Sat Jan 18, 2014 10:24 am
- Location: Andorra
Re: pieces psqt
For rooks is interesting the same value for each column, and some bonus for 7th rank. Some engines like Andscacs has a bonus also for 6th and 8th.
Other pieces maybe you can generate them with some formula that gives a logical distribution and then search the optimal variables of the formula.
Other pieces maybe you can generate them with some formula that gives a logical distribution and then search the optimal variables of the formula.
Daniel José - http://www.andscacs.com
-
- Posts: 893
- Joined: Mon Jan 15, 2007 11:23 am
- Location: Warsza
Re: pieces psqt
Ask yourself three questions regarding each piece:
- do you want it to go towards the center?
- do you want it to go forward and to what extent (hint: a knight is great on the 6th rank, but bad on the 7th)
- do you want it to move sooner or later (hint: knights before bishops, minors before majors, 1.e4 on par with 1.Nf3 or before it)
This will explain most of what has to be done.
- do you want it to go towards the center?
- do you want it to go forward and to what extent (hint: a knight is great on the 6th rank, but bad on the 7th)
- do you want it to move sooner or later (hint: knights before bishops, minors before majors, 1.e4 on par with 1.Nf3 or before it)
This will explain most of what has to be done.
Pawel Koziol
http://www.pkoziol.cal24.pl/rodent/rodent.htm
http://www.pkoziol.cal24.pl/rodent/rodent.htm
-
- Posts: 433
- Joined: Fri Jan 16, 2015 4:02 pm
Re: pieces psqt
Nice idea. It solves the problem of making psqt average 0.
zurichess - http://www.zurichess.xyz
-
- Posts: 64
- Joined: Fri Oct 18, 2013 11:40 pm
- Location: New York
Re: pieces psqt
i do use separate PST value for each square, with left-right symmetry. So that each piece gets 32 values. This works well with automatic coefficient generation, with exception of king mid-game, where there are just not enough situations where king is away from its starting position.
Youri.
Youri.