1
0
mirror of https://github.com/tiyn/yeschess.git synced 2025-04-01 14:47:44 +02:00
TiynGER a3c48fd50c chess: chess to fen notation added
Now there is a method to turn a chess
object into a fen-string.
Additionally the enPassant handling was
changed.
There can be only one enPassant field
at a time.
So a new attribute was added to the chess
object that stores the field for the
enPassant capture.
If there is no enPassant field it will be set to -1.
2021-05-10 01:30:11 +02:00
2021-05-10 01:30:11 +02:00
2020-12-14 18:00:05 +01:00
2020-12-14 23:42:08 +01:00

ychess

Attention: The Chess engine is not finished yet.

ychess-logo

ychess is a chess implementation and engine written in nim.

Usage

To play chess in the commandline simply download the code and run nim c -r game.nim. You can either play the 1v1 hotseat mode or a single player mode vs the engine.

Lichess

ychess uses the lichess api with the python plugin berserk. An instance of the engine occasionally plays on lichess. To get into the whitelist just write a ingame message to the account.

Testing

Testing is done by einheit by jyapayne. All legal chess moves are implemented in chess.nim and tested by the TestSuite in test.nim. You can simply run the tests with nim c -r test.nim.

Documentation

Documentation is written into the code via DocGen. For this reason it is not saved in this repository. To extract it into html run nim doc --project --index:on --outdir:htmldocs game.nim

Moves

Moves are read from the commandline as pure coordinate notation. The inner program will convert this notation to a move-tuple.

Board Representation

Due to easier off the board checking a 10x12 board is used.

Engine

The engine uses a simple implementation of the NegaMax-algorithm with Alpha-Beta-Pruning. For the evaluation function each piece has a corresponding value. Additionally there are piece-square tables to encurage putting pieces on active squares.

Description
ychess is a chess implementation and engine written in nim.
Readme GPL-3.0 144 KiB
Languages
Nim 100%