Welcome to Scratch Chess - "Game of Kings". FAQs: - "There is a bug!" Unlikely, 100k games, no probs. - "Why invalid move?" It probably puts you in check. Consult chess rules. Junior mode shows valid moves. - "Too difficult!" Switch to Junior mode (press 'j'). - "Too easy!" Play on TurboWarp: https://turbowarp.org/148769358 - "Castling doesn't work!" It does, see castling rules. - "Opponent pawn captured my pawn which had already passed it!" That's called 'en-passant'. - "I found a bug!" Please describe in detail and copy&paste 'Moves' PGN data or 'Export' PEN data. - "How to castle?" Move the king two squares; king must not be in check, none of the passed squares must be in check, and neither king nor rook must have moved before. - "How to play en-passant?" Move your pawn diagonally by one square, behind the opponent pawn which just moved two squares. - "Can you increase the engine's playing strength?" It has been tuned a lot already, and we probably reached the end of the rope now. A Scratch chess engine will never play at the level of one implemented in C / C++, Java or JavaScript. Scratch is slow due its interpreted nature, every variable access triggers a table-lookup by name, it doesn't have bitwise operations for bitboards, and uses variants with constant value conversions, etc. Standard Mode: - Easy: searches 2 plies plus subsequent captures - Medium: think time 10 seconds; searches ca. 3 plies plus subsequent captures during midgame, more during endgame - Difficult: think time 20 seconds for midgame, 15 seconds for endgame; searches ca. 4 plies plus subsequent captures during midgame, more during endgame - Difficult (competition mode, press 'c'): think time 40 seconds; searches ca. 5 plies plus subsequent captures during midgame, more during endgame Junior Mode: - Easy: random moves - Medium: semi-random moves - Difficult: searches 1 ply plus subsequent captures Press 'c' to toggle 40 seconds think time on Difficult Press 'd' for iterative deepening debug info Press 'p' for profiler mode (shows CPU time spent per function and search depth, number of transposition table hits) BUG REPORTS: Please describe exactly what happened, and if possible provide exported board data: Click "Export", then look for the FEN data, select the text by triple-clicking it, copy it to the clipboard and paste it to the bug comment. Alternatively you can also export the move list in PGN format (click "Moves"). Please also report the difficulty level, and whether you are playing in junior mode. Before you post a bug, go sure it really is a bug and not a misunderstanding, e.g. you may want to consult an experienced chess player beforehand. Thank you! I focused on playing strength and usability. Considering the speed limitations of Scratch it shouldn't be too bad It usually calculates 4 to 8 moves ahead (max. is 25 moves, only achieved on TurboWarp and during endgame), depending on selected level, board complexity and system speed. Looking forward to feedback in the comments! ========================================= WORKING ON PROGRESS
This game can be found in this studio:https://scratch.mit.edu/studios/28068085/