1
0
mirror of https://github.com/tiyn/yeschess.git synced 2025-10-19 06:11:22 +02:00

engine: added piece-square tables

Piece square tables are a way to encurage the engine to
put pieces on active squares.
Each piece got a corresponding table.
This commit is contained in:
TiynGER
2021-05-03 02:01:36 +02:00
parent b3c76fd2c1
commit b7480a0cd4
5 changed files with 137 additions and 28 deletions

View File

@@ -86,7 +86,8 @@ testSuite ChessTest of TestSuite:
], Color.Black)
var testBestMove = self.chess.bestMove(2)
self.check(testBestMove.start != 0)
self.check(indToField(testBestMove.start) != "g5" or indToField(testBestMove.dest) != "f4")
self.check(indToField(testBestMove.start) != "g5" or indToField(
testBestMove.dest) != "f4")
method testBestMoveTacticWhite() =
self.chess = initChess([
@@ -101,7 +102,8 @@ testSuite ChessTest of TestSuite:
], Color.White)
var testBestMove = self.chess.bestMove(2)
self.check(testBestMove.start != 0)
self.check(indToField(testBestMove.start) != "g4" or indToField(testBestMove.dest) != "f5")
self.check(indToField(testBestMove.start) != "g4" or indToField(
testBestMove.dest) != "f5")
when isMainModule: