pieces psqt

Discussion of chess software programming and technical issues.

Moderators: Harvey Williamson, bob, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
brtzsnr
Posts: 433
Joined: Fri Jan 16, 2015 3:02 pm
Contact:

pieces psqt

Post by brtzsnr » Wed Nov 11, 2015 9:24 pm

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?

mvk
Posts: 589
Joined: Tue Jun 04, 2013 8:15 pm

Re: pieces psqt

Post by mvk » Wed Nov 11, 2015 10:00 pm

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?
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:

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 &#40;fileIndex < 7&#41;
                rookScore += v&#91;rookByFile_0 + fileIndex&#93;;
Last edited by mvk on Wed Nov 11, 2015 10:07 pm, edited 1 time in total.
[Account deleted]

User avatar
cdani
Posts: 2175
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

Re: pieces psqt

Post by cdani » Wed Nov 11, 2015 10:00 pm

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.

PK
Posts: 863
Joined: Mon Jan 15, 2007 10:23 am
Location: Warsza
Contact:

Re: pieces psqt

Post by PK » Thu Nov 12, 2015 12:12 am

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.

brtzsnr
Posts: 433
Joined: Fri Jan 16, 2015 3:02 pm
Contact:

Re: pieces psqt

Post by brtzsnr » Thu Nov 12, 2015 10:42 am

Nice idea. It solves the problem of making psqt average 0.

ymatioun
Posts: 64
Joined: Fri Oct 18, 2013 9:40 pm
Location: New York

Re: pieces psqt

Post by ymatioun » Thu Nov 12, 2015 12:49 pm

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.

Post Reply