Skip to content

Commit 107ee10

Browse files
committed
Removed PieceSquareTable.cs
Removed the UCI option that allowed loading of custom (non-tapered) PSTs from file.
1 parent 79a6902 commit 107ee10

File tree

10 files changed

+8
-494
lines changed

10 files changed

+8
-494
lines changed

MinimalChess/IterativeSearch.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private int EvalPosition(Board position, int depth, SearchWindow window)
106106
{
107107
//having no legal moves can mean two things: (1) lost or (2) draw?
108108
_pv.Clear(depth);
109-
return position.IsChecked(position.ActiveColor) ? (int)color * PieceSquareTable.LostValue : 0;
109+
return position.IsChecked(position.ActiveColor) ? (int)color * PeSTO.LostValue : 0;
110110
}
111111

112112
return window.GetScore(color);
@@ -142,7 +142,7 @@ private int QEval(Board position, SearchWindow window)
142142

143143
//checkmate?
144144
if (expandedNodes == 0 && inCheck)
145-
return (int)color * PieceSquareTable.LostValue;
145+
return (int)color * PeSTO.LostValue;
146146

147147
//stalemate?
148148
if (expandedNodes == 0 && !AnyLegalMoves(position))

MinimalChess/MinimalChess.csproj

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,4 @@
44
<TargetFramework>netcoreapp3.1</TargetFramework>
55
</PropertyGroup>
66

7-
<ItemGroup>
8-
<None Update="pst\material.pst">
9-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
10-
</None>
11-
<None Update="pst\rustic.pst">
12-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
13-
</None>
14-
<None Update="pst\simple.pst">
15-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
16-
</None>
17-
<None Update="pst\sunfish.pst">
18-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
19-
</None>
20-
</ItemGroup>
21-
227
</Project>

MinimalChess/PeSTO.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ namespace MinimalChess
44
{
55
public class PeSTO
66
{
7+
//PSTs and code based on a forum post by Ronald Friederich:
8+
//Source: http://talkchess.com/forum3/viewtopic.php?f=2&t=68311&start=10#p772515
9+
10+
public static int LostValue => -9999;
11+
712
//strip the first bit and
813
private static int PieceTableIndex(Piece piece) => ((int)piece >> 2) - 1;
914

MinimalChess/PieceSquareTable.cs

Lines changed: 0 additions & 154 deletions
This file was deleted.

MinimalChess/pst/carnivor.pst

Lines changed: 0 additions & 61 deletions
This file was deleted.

MinimalChess/pst/material.pst

Lines changed: 0 additions & 61 deletions
This file was deleted.

MinimalChess/pst/rustic.pst

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)