Using Excel to Help Create Piece-Square Tables

I’ve been thinking about Piece-Square tables.  They’re not the most exciting part of computer chess but they seem quite important (based on Ed Schroder’s experiments), so I thought I’d put some time into thinking about reasonable values.  I’ve created a simple spreadsheet in Excel to help create them.  You can download it here (Piece-Square-Tables.xlsx).  It assumes your board representation starts with A1 = 0 and H8 = 63.

Here’s how to use the Excel spreadsheet:

  • The worksheet is protected to prevent accident overwrites.  You can unlock it easily as it’s not password protected
  • Enter the values in the yellow squares on the left.  The gray squares are the mirror image of the yellow squares.
  • The table in the middle is adjusted to make the average table value zero.   This means if I set the value of a bishop to be 350 centi-pawns and put it on a random square,  the value returned by the Piece Square Table will average out to 350 centi-pawns.  The idea is to minimize interaction with other evaluation terms.
  • The column to the far right is the table formatted as a “C” array.  You can copy and paste this code.

Here’s a screenshot:

Screenshot_060113_043614_PM

  • Nice. Excel is sometimes quiet helpful. I also use it to control my weights but I even took it a bit further. I wrote some Visual Basic code that outputs a complete header file on a separate worksheet.

    Thomas…

  • Emilio

    Thanks Steve, it seems quite useful, especially the part with the creation of the C arrays, which is quite a bore an error prone task.

    Emilio

  • Anurag Sanyal

    Hi, thank you for the table.Can you please elaborate on how did you come up with these particular values ? Did you use learning methods or any other techniques?