An (experimental) chess tactics trainer with spaced repetition

Overview

better-tactics

A chess tactics trainer that with spaced repetition. New puzzles will be shown to you from the lichess puzzle db, according to your calculated rating level, and then puzzles that need reviewing wil be shown to you daily.

To run it:

  • Either grab a build from the releases page and just run it, or download the repo and cargo +nightly run --release.
  • The lichess puzzles db will be automatically downloaded on the first run and saved to the application's sqlite database.
  • Once it says it's serving the site go to http://localhost:3030 to use the app.
  • Click the 'New Puzzle' button to see some new puzzles, which will then be added to your review queue, or the 'Review' app to do your daily reviews!

Note: For a standalone/portable build use the release build, as it compiles the static assets in, but the debug build references them from the ./assets directory.

Warning

This project is pretty functional but still quite experimental. You might encounter issues that require you to reset (or manually repair) your database. In particular, the rating system is still very much WIP.

If you find you need to manually reset your rating or set it to a particular value, you can set it using the debug endpoint /set_rating/{desired_rating}, which also resets your rating variance and should allow the app to re-find your rating level at about the given level. (e.g. http://localhost:3030/set_rating/1000)

You might also like...
A Chess Engine written in Rust .
A Chess Engine written in Rust .

Kelp Kelp is a UCI compatible chess engine written in Rust Using standard chess algorithms. Kelp is work in progress. Currently, it can be used as a U

A rust chess implementation using a neural network scoring function built on huggingface/candle + rust + wasm

Rusty Chess What is it? Rusty Chess aims to be a high quality embeddable chess engine that runs entirely locally in the browser (no backend required).

Experimental type-safe geometric algebra for Rust

Projective Geometric Algebra This library is a Rust code generator, generating the mathematics you need for a geometric algebra library. I made it mos

Downdelving is an experimental roguelike written in Rust.

Downdelving Downdelving is an experimental roguelike written in Rust. It's built upon the base supplied by Bracket's Rust Roguelike Tutorial. It's a r

A tactics trainer for the command line
A tactics trainer for the command line

Chess Tactics CLI Practice some chess tactics in your terminal while you wait for your code to compile. Fetches tactics from this tactics API. Built W

Flashcards: A spaced repetition app designed around org files.

Flashcards Since it's easy to create notes in org-mode and difficult to create flashcards, this app tries to ease the process of making cards! For you

A Turing-complete but dead-simple spaced repetition CLI that helps you learn stuff.

Forne — Learn Stuff Forne is a Turing-complete spaced repetition engine to help you learn stuff your way. What does that mean? Well, there are a few p

An experimental Neural Network trainer/visualizer in Rust
An experimental Neural Network trainer/visualizer in Rust

DeepRender An experimental Neural Network trainer/visualizer in Rust Try it on your browser! https://msakuta.github.io/DeepRender/ Training on a funct

Experimental Quantum Computer Simulator + Quantum Chess Implementation
Experimental Quantum Computer Simulator + Quantum Chess Implementation

Quantum Chess A somewhat hacky implementation of this paper (made in a week over a holiday). It's not heavily tested and probably has some bugs still

A perfect smoother; A discrete time version of spline smoothing for equally spaced data
A perfect smoother; A discrete time version of spline smoothing for equally spaced data

Whittaker Smoother Aka Whittaker-Henderson, Whittaker-Eilers Smoother is known as the perfect smoother. Its a discrete-time version of spline smoothin

Aoe4 shorctut trainer made with rust!
Aoe4 shorctut trainer made with rust!

AMAVillager Train your villager shortcuts ! Now hosted here Made with Bevy. How to Run Install Rust and Cargo : instructions clone the repository : gi

An easy-to-use generic trainer for Linux, written in Rust.
An easy-to-use generic trainer for Linux, written in Rust.

An easy-to-use generic trainer for Linux written in Rust, with basic memory hacking features. Use it for your games or applications where needed, there is also the tuxtraind daemon which will probe for processes and apply matching trainers automatically.

A dependency-free chess engine library built to run anywhere.
A dependency-free chess engine library built to run anywhere.

♔chess-engine♚ A dependency-free chess engine library built to run anywhere. Demo | Docs | Contact Me Written in Rust 🦀 💖 Why write a Chess engine?

A chess engine written from scratch in Rust ♞
A chess engine written from scratch in Rust ♞

Walleye Walleye is a chess engine written completely in rust. Walleye is a UCI-compatible engine written using the classical alpha-beta style AI. It s

Walleye is a chess engine written completely in rust.
Walleye is a chess engine written completely in rust.

Walleye is a UCI-compatible engine written using the classical alpha-beta style AI. It supports loading board positions from arbitrary FEN strings, Unicode pretty printing to the console, and UCI communication logs to help with debugging.

Opening randomizer for Chess
Opening randomizer for Chess

chess-randomizer chess-randomizer is a simple opening randomizer written in Rust using WASM and the Lichess API. To build the project, you need Rust a

Blackmarlin is a chess engine fully written in Rust.

Blackmarlin WIP UCI Chess Engine Blackmarlin is a chess engine fully written in Rust. Make sure to compile the chess engine with cargo build --release

Stockfish/ - UCI chess engine

Overview Stockfish is a free, powerful UCI chess engine derived from Glaurung 2.1. Stockfish is not a complete chess program and requires a UCI-compat

Pleco is a chess Engine & Library derived from Stockfish, written entirely in Rust

Pleco Pleco is a chess Engine & Library derived from Stockfish, written entirely in Rust. This project is split into two crates, pleco, which contains

Comments
  • Implement promotion UI

    Implement promotion UI

    The only awkward part now is that chessground doesn't have a promotion UI by default when you move a pawn to the last rank, so we need to add that. Right now it just assumes auto-queen but that's especially dopy since it doesn't actually even queen lol and you just get left with a pawn on the back rank.

    Here's one that reproduces it: http://localhost:3030/tactics/single/yxW8g

    opened by catchouli 1
  • Improve ratings

    Improve ratings

    Currently your rating starts at 1000 and increases by 1 for each puzzle completion. This is an extremely simple scheme which doesn't really reflect whether your tactics skill is improving or not, as it ignores the difficulty of puzzles you're completing, and in theory just reviewing puzzles daily for long enough will result in a higher rating without seeing any new/harder puzzles.

    Additionally from testing it just increases too fast also. After 1000 reviews you'd be at 2000 rating and seeing much harder puzzles, even though you may only have seen a few hundred unique puzzles at that point and they might all be fairly easy ones.

    It might be worth treating each puzzle completion as a 'game' against an opponent of the puzzle's rating, and calculating a glicko2 rating for the player over a certain period https://en.wikipedia.org/wiki/Glicko_rating_system - that's probably what lichess is doing anyway.

    The goal would be that the difficulty increases steadily over time, but repeated repetitions of the same puzzles don't increase the player's rating artificially. Additionally, using a rating system like glicko2 would probably be good for calibrating initial rating levels, and we could implement a 'calibration' mode where each puzzle done counts towards your rating but doesn't necessarily add the puzzle to your review queue (unless you get it correct the first time.) New puzzles could then also be shown in the rating range according to your Glicko rating's uncertainty instead of the current arbitrary +-5%.

    opened by catchouli 1
  • Misc todos

    Misc todos

    The proof of concept is working really well now, the next things to do aren't really needed as much, but might be nice to do.

    1. ~~Switch database over to a dbal (like diesel) to simplify the database code, support migrations, support different backends other than sqlite etc~~ Done, but used sqlx instead of diesel, because I don't like ORMs tbh.
    2. ~~Add a config file for e.g. the bind address and port, and any other global options~~
    3. Add a settings page for any user settings e.g. the % range for new puzzles to show seems a bit arbitrary to be hard-coded
    4. ~~Reimport lichess puzzle db with all the fields (I was being lazy originally) and then we can use the puzzle's rating deviation in the rating calculation (another thing that's hardcoded with all puzzles having a rating deviation of 50, whereas newer puzzles might actually have quite a high deviation and be inaccurately rated as a result)~~
    5. Add an account system so that this thing could have a hosted version (and maybe we could also support OAuth with lichess as an option)
    6. Add e.g. graphs for a user's rating, and maybe utilise the puzzle themes from lichess's full database to have graphs for each rating. We already store all of the user's past reviews in the database, so this could be calculated as needed (or in batches), rather than having to store all of a user's previous data points.
    7. The main page could have these graphs and info as extra panels instead of just one tiny panel in the middle for stats.
    8. Add the ability for the 'random puzzles' page to show you puzzles by theme instead of just any puzzles.
    9. ~~Perhaps the standalone version could embed a browser like servo, and then it would just start like a desktop app. It could still be possible to run the 'server version' with sqlite and in local-user-only-mode anyway.~~ The feature/embedded-browser branch does this as a prototype and it was pretty easy but it needs some extra UX refinement before we actually do it for sure.
    10. Add versioning to the asset URLs so we don't have any problems with browsers caching old versions of them.
    11. It could remember the puzzle you were looking at previously when showing you a random puzzle, and it could provide a 'skip' button for cards.
    12. Technically the 'random puzzle' page could show you a puzzle you've already reviewed before and make you review it ahead of time. It's not a deal breaker but it is weird behavior we should try to make less likely (like maybe we try to get 3 puzzles and then give up and just return the one we have, it's probably best to have that as a fallback anyway in case the pool of puzzles we're choosing from is so shallow that it's likely to happen more than once or every time).
    13. Left/right buttons on the puzzle interface so you can look over the moves that have already been made, and what move the computer just made initially. The right button should be greyed out by default and enabled when you're looking at an old move so you know, and the pieces shouldn't be movable while you aren't at the latest move.
    14. ~~An about page with information about what it is, how to use it, and to credit our dependencies/provide license info.~~

    A bit of general cleanup leading to the ability to run a hosted version seems like a nice way to go, but we should maintain the ability for it to be run as a standalone app too.

    opened by catchouli 0
Releases(v1.5.1)
  • v1.5.1(Oct 6, 2023)

  • v1.5(Oct 6, 2023)

  • v1.4(Oct 6, 2023)

    Changed:

    • Made the UI a bit more clean and sleek and also make it mobile friendly.
    • Highlight when the king is in check.
    • Allow player to keep playing out the game after the puzzle is complete.
    • Added app configuration via environment variables - .env contains all of the available configuration variables and can be used to set them.
    • The server now starts immediately, and database initialision is done in the background if needed. We keep track of the lichess puzzle import using a flag in the database, so if you don't let it complete at least once, it will restart every time the application starts until it is completed.
    • Add puzzle themes to the puzzle page.

    Fixed:

    • Fixes a bug where despite the review-ahead time for the day being until 4am, after midnight it'd start to show you reviews due until the following 4am (i.e. 28 hours later)
    Source code(tar.gz)
    Source code(zip)
    better-tactics-v1.4.exe(9.35 MB)
  • v1.3(Oct 1, 2023)

    Changed:

    • Tweaked the rating sytstem once more. Once it gets a good idea of your actual rating, and your rating deviation goes low enough, it's actually producing extremely good results now, and doesn't award too much rating for repeated attempts of puzzles around your level. As a result, I've reenabled the ability for every review to update your rating level. I've found that after a while your rating stabilizes at an appropriate level and then gradually grows over time which is perfect, and that 'Easy' and 'Again' reviews are great at hinting to the system to reevaluate your current rating level, because it is too low or too high accordingly.
    • 'Reviewing ahead' of the day's reviews (so you can do all of your reviews at one time instead of waiting for them to trickle in throughout the day) has been tweaked so that it only applies to cards that are out of learning, otherwise they tend to show up again immediately before any cards due later the same day. Now, cards in learning don't show up until they're actually due (usually at most about 10 minutes after you've last seen them, giving you chance to do some other reviews before they come up again.)
    • Fixes various bugs with data access and error reporting.
    Source code(tar.gz)
    Source code(zip)
    better-tactics-v1.3.exe(7.62 MB)
  • v1.2(Sep 30, 2023)

  • v1.1(Sep 30, 2023)

    v1.1

    • Tweaks the rating system to make the rating grow a bit more appropriately.
    • Adds a debug endpoint for setting the user's rating, e.g. /set_rating/500, in case users need to fix their rating without having to modify the database manually.
    • Implements premoves in the puzzle UI, and allow the piece to continue being dragged even while the computer is making their move.
    Source code(tar.gz)
    Source code(zip)
    better-tactics-v1.1.exe(7.57 MB)
  • v1.0(Sep 29, 2023)

Owner
Caitlin Wilks
functional programmer and robot. looking for rust jobs
Caitlin Wilks
Walleye is a chess engine written completely in rust.

Walleye is a UCI-compatible engine written using the classical alpha-beta style AI. It supports loading board positions from arbitrary FEN strings, Unicode pretty printing to the console, and UCI communication logs to help with debugging.

Mitchel Paulin 95 Dec 24, 2022
Opening randomizer for Chess

chess-randomizer chess-randomizer is a simple opening randomizer written in Rust using WASM and the Lichess API. To build the project, you need Rust a

null 1 Jan 31, 2022
Blackmarlin is a chess engine fully written in Rust.

Blackmarlin WIP UCI Chess Engine Blackmarlin is a chess engine fully written in Rust. Make sure to compile the chess engine with cargo build --release

null 50 Oct 31, 2022
Stockfish/ - UCI chess engine

Overview Stockfish is a free, powerful UCI chess engine derived from Glaurung 2.1. Stockfish is not a complete chess program and requires a UCI-compat

null 7.5k Jan 8, 2023
Pleco is a chess Engine & Library derived from Stockfish, written entirely in Rust

Pleco Pleco is a chess Engine & Library derived from Stockfish, written entirely in Rust. This project is split into two crates, pleco, which contains

Stephen Fleischman 225 Dec 18, 2022
A basic web assembly chess engine written in rust.

This library is a basic implementation of a chess min-max algorithm with alpha-beta pruning (Algorithm Info). It is designed to be compiled down to WebAssembly and used for web applications.

null 2 Nov 25, 2022
Yet another shape chess game in Rust.

shape_chesss_in_rust Yet another shape chess game in Rust. Why the implementation is so slow? The main reason is performance of Vector iteration is ve

Simon Lee 1 Apr 10, 2022
Play jungle chess on the linux terminal.

Jungle-Chess This is my first project written in Rust. Happy for contributors and feedback! The code is dirty. Play Jungle Chess on an Emoji-Enabled L

Arne Winter 10 Aug 9, 2022
A Chess Engine written in Rust that runs natively and on the web!

About The Project chess-rs is a Chess Engine written from scratch in Rust that runs natively and on web! Live Demo: https://parthpant.github.io/chess-

Parth Pant 109 Apr 6, 2023
Chess implemented entirely in the Rust and TS type systems.

Type System Chess This repo contains chess implemented entirely in the (stable) Rust and Typescript type systems. Both languages feature turing comple

null 170 Jul 12, 2023