mirror of
https://github.com/tiyn/yeschess.git
synced 2025-10-20 14:51:21 +02:00
engine: first push for engine
I created an engine, that uses a basic version of the minimax algorithm to evaluate a position. It then evaluates all the possible next moves in a given position and picks the one that has the best evaluation. Basic test cases were also added.
This commit is contained in:
@@ -24,8 +24,8 @@ type
|
||||
castleRights: CastleRights
|
||||
Move* = object
|
||||
## `Move` stores all important information for a move.
|
||||
start: int
|
||||
dest: int
|
||||
start*: int
|
||||
dest*: int
|
||||
color: Color
|
||||
prom: int
|
||||
PieceAmount = tuple
|
||||
@@ -136,7 +136,7 @@ let
|
||||
"e": 3,
|
||||
"f": 2,
|
||||
"g": 1,
|
||||
"h": 0
|
||||
"h": 0,
|
||||
}.newTable ## \
|
||||
# `FileChar` maps the files of the chessboard to numbers for better
|
||||
# conversion.
|
||||
|
Reference in New Issue
Block a user