Skip to content

clauswrm/stonksfish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stonksfish

A fast and simple chess bot written in Rust.

Play me on Lichess.

Rust CI

How to run

RUSTFLAGS="-C target-cpu=native" cargo run --release

Dependencies

The bot uses the Chess crate for keeping track of the game state as well as fast move generation during search and evaluation. For communication with Lichess APIs, the Licheszter crate is used.

How it works

The bot listens for events from Lichess and responds accordingly.

sequenceDiagram
    participant Stonksfish
    participant Lichess
    actor Opponent
    Stonksfish->>Lichess: Listen for events
    loop Running
        Opponent->>Lichess: Create challenge
        Lichess-->>Stonksfish: New challenge
        Stonksfish->>Lichess: Accept challenge
        Lichess-->>Stonksfish: Game started
        rect rgb(130, 75, 20)
            loop Playing game
                Opponent->>Lichess: Make move
                Lichess-->>Stonksfish: Updated game state
                Stonksfish->>Lichess: Make move
                Lichess-->>Stonksfish: Updated game state
                Note right of Lichess: Assuming opponent is playing <br> White. If not, Stonksfish <br> makes the first move.
            end
        end
        Lichess-->>Stonksfish: Game over
    end
Loading

Releases

No releases published

Packages

No packages published

Languages