IlanIwumbwe / Ylva

UCI chess engine
2 stars 0 forks source link
chess-engine

YLVA

Welcome to Ylva

Ylva will see improvements over time.

A subset of the UCI commands have been implemented, enough to be able to connect to a UCI GUI and test.

Run make to compile into a ylva executable, which you can then run in your terminal. Alternatively, add the engine to a UCI GUI.

Current move generation speed is ~2.5million nodes/second.

Notable techniques

Move generation

Ylva uses bitboards as the data structure that stores information about a board state.

Bitboards are great because when used right, they speed up move generation significantly, because most operations required during move generation are reduced to bitwise operations. 12 bitboards are used for each of the 6 chess pieces, for each colour. The bitboards are also used to quickly get information such as whether certain squares are occupied (set_bit(sq) & all_pieces) , whether king is in check (checkers != 0).

Slider piece move generation is done using the magic bitboards technique.

Evaluation

The engine favours positions where the side to move has a material gain after the move is made. A PSQT score for white and black is kept for each position that is reached, which is also considered in the evaluation. This allows Ylva to favour positions where pieces are placed in more natural squares.

Search

Todos

Future plans for Ylva

Acknowledgements

Huge thanks to the resources I have used so far while developing this engine!

License

MIT