GithubHelp home page GithubHelp logo

minac's Introduction

minac - minac Is Not A Chessboard

What minac is

A text-based middleware to Lichess's board API, written in Rust.

Currently, the minac binary waits for input from stdin:

  • moves are inputted as SAN (Standard Algebraic Notation). E.g. d4, Nf4, Qxf7...
  • chess game status is recorded using the chess crate
  • lichess API is used via the lichess_api crate for online games and for saving copies of offline games into a study
  • you can play against another human or against Stockfish via the commandline

Installation and usage

To compile it locally, you need my fork of the chess crate and my fork of the lichess-api crate.

Most changes are merged upstream for the Lichess API (hopefully all when I clean up this PR and submit upstream). For the chess crate, I need support for PGN that I added in this PR, however it doesn't seem like this PR will be merged (has been open for literally years with no feedback).

You hence need to clone both my forks and put them somewhere minac can find them. By default, this is next to the minac folder you cloned, see Cargo.toml.

Because I need a custom chess crate version, you also need to clone the vampirc-uci crate even though I did not modify it. Clone it from here and modify its Cargo.toml as follows:

-chess = { version = "3.2", optional = true }
+chess = { path = "../chess", optional = true }

Finally, a Lichess token with the challenge:read/write, board:play and study:write permissions is needed: get it from here and write it in the token.secret file at the root of the project, before running cargo run.

This software is still in alpha, and I don't have experience with Rust. You've been warned ;).

What minac wants to be

A 3D printed chess clock that makes it easy to play on a physical board connected to Lichess, and can serve as a game notation device that create studies, analyzes games etc.

The final object will probably be:

  • A Raspberry Pi
  • A speaker
  • A 3D printed casing
  • Small LCD screen
  • Buttons connected to the a GPIO pin (voltage dividers)
    • two clock buttons
    • ranks: from 1 to 8 included, optionally 0 and 9 also for time settings
    • files: A to H included
    • pieces: king, queen, rook, bishop, knight
    • online mode button (lichess logo), offline mode button (stockfish logo)

All the buttons, except the clock buttons, could be replaced by a touchscreen. Everything should be handled by the minac binary.

Wanted features:

  • Audio clips (confirm inputted moves, error when wrong move is pressed...).
  • Online mode
    • Lichess Board API to play using an online account
    • Choose ranked or friendly and time settings
    • Play against online bots
  • Offline mode against bot
    • Play against Stockfish and setting its level, possibly other bots
    • Choose side, time settings
  • Offline 2 players mode
    • Standard chess clock features
    • Save game as PGN
    • Open studies on Lichess

This is v5 I'd say, we're not exactly there.

Licence

This project is licensed with the Affero GPLv3. See LICENSE.md for the full license, or this page for a quick recap.

Contributing

Feel free to send your enhancements and patches as PRs, or open issues.

Roadmap

Currently working on:

  • Stockfish integration: initial version is merged, we know need position evaluation on games when they are over, move by move, to identify errors/blunders and output them. This page has all the info I need.
  • Lichess studies API: part of it is implemented in this PR for my fork of the lichess_api crate, code needs cleaning before submitting a PR upstream.

On the hardware side:

  • Compiling for Raspberry Pi 3B+, same steps as described above: everything works, tested on Raspberry Pi OS Lite 64bit (i.e. ARMv8/AArch64). To compile, Rust (ofc) and the openssl-dev package need to be installed. Stockfish needs to be built from source for the ARMv8 architecture: download the sources for Stockfish 16 from here and run make build ARCH=armv8.
  • Interfacing with buttons. First display voltage recevied by a GPIO pin: I'll need a basic circuit with a bunch of buttons and a voltage divider to differenciate between the buttons pushed.
  • For the sake of simplicity and since Stockfish needs some computing power, this project will probably not run on a weaker controller than Raspberry Pis. I'll probably use directly the rppal crate, instead of going the embedded-hal route.

Starting to thinker about:

  • 3D case design with Blender: something like this to be 3D printed.

About me

Lichess: @zoug

Mastodon: @[email protected]

Github: yzoug

https://zoug.top

minac's People

Contributors

yzoug avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.