by ArnoHu
See inside

Welcome to Scratch Chess - Game of Kings! To start playing, simply click the white piece you want to move, then click the target field.

Next version preview:


JavaScript version (runs faster, works on mobile devices):

For bug reports please attach exported board data (the one before the black move took place). Simply click "Export", then look for the next-to-last board list entry and copy it to the clipboard (or export all entries to a file and copy the one entry from there). Alternatively you can also export he move list (click "Moves").

I focused on game experience and AI. Considering the speed limitations of Scratch it shouldn't be too bad (it calculates up to four moves in advance, depending on selected level).

Known issues:
- Mobility evaluation should be weighted per piece type and game stage
- Only wins accidentally (if at all) at level "Easy"
- Missing feature: PGN import / export (currently only customer format)
- Missing feature: FEN import / export (currently only customer format)

Fixed issues:
- Pawn jumps to wrong field in dutch opening
- Opening book is rudimentary (fixed by Grijfland)
- Evaluation functionality needs cleanup (currently cluttered code, with implicit dependencies)
- Bug: Disappearing piece due to wrong en-passant application during checkmate check (thanks to Itharius for reporting this)
- Bug: Wrong algebraic notation on H column (thanks to Itharius for reporting this)
- Bug: King passive in endgame due to latest performance tuning
- Feature: Performance tuning by evaluating position less frequently
- Bug: Allows castling through checked fields
- Feature: En-passant support
- Feature: Move ordering via hash move (speedup)
- Feature: Isolated pawn evaluation
- Feature: Algebraic move list
- Feature: Undo move
- Feature: Import/export board data
- Bug: Queen moves too early
- Bug: Cannot move h2h4
- Feature: Opening book initial implementation
- Feature: Provide several difficulty levels
- Bug: Does not detect draws on repetitive positions
- Bug: Black move might lead to black king being checked
- Bug: Missing double pawn evaluation
- Bug: Thinks one side's check can be compensated by other side's check
- Bug: Does not consider check on castling
- Bug: Does not consider draw in move evaluation
- Bug: Applies pawn promotion too late
- Bug: Target piece not restored after invalid white move when checked

Notes and Credits

If you like the game, please click ★ and ♥. Your feedback is welcome in the comments section.

Opening book by Grijfland


Intro screen picture:

Quicksort implementation:

Chess programming resources:

Tutorial (in German):

Shared: 8 Mar 2017 Modified: 24 May 2017
Favorite this project 58
Love this project 68
Total views 1398
View the remix tree  27
More projects by ArnoHu