Other

gambit

Chess engine in Scala 3

A chess engine written in Scala 3 and built with the scala-cli tool. It generates moves, evaluates positions and picks the move to play on its own.

gambit

About the project

gambit is a chess engine in Scala 3, that is a program that picks the move to play for a given position on the board. It has three parts: a move generator that lists the legal moves, a position evaluation that gives an arrangement of pieces a numeric value, and a search that examines successive lines and points to the best one. Together they make up everything needed to play chess. The project is built with scala-cli, a command-line tool for compiling and running Scala code.

The challenge

A chess engine is three hard things at once: flawless move generation, meaningful position evaluation and a search that picks a good move in reasonable time. In gambit all three had to work together for the engine to play at all.

What we did

  1. 01

    A generator of moves that follow the rules of chess

  2. 02

    A position evaluation function

  3. 03

    A search that picks a move in reasonable time

  4. 04

    Scala 3 code built with scala-cli

Related projects

Describe your project.

A free quote comes back within an hour during working hours.

Tell us what you want to build.

A free quote comes back within an hour during working hours. You talk to the person who writes the code.