Bare minimum CHESS VARIANTS: ENGINE & GUI implementation in vanilla JavaScript

This is the didactic proof of concept implementation of a bare minimum chess engine and GUI I’ve developed to help people learning the very gist of chess programming.

This work is dedicated to hobby programmers who eventually want to come up with their own programs playing either standard chess or chess variants.

Every chess variant presented here is available as a single stand-alone HTML file with heavily commented javascript source that runs locally in the browser on computer or mobile device.

The entire engine is the single function that takes board position as an input and outputs best move found within a fixed depth search. Every variant is a derivative of the standard chess with some modification to fit the rules of the specific variant. Some nitty gritty rules are dropped for simplicity and clarity.


00:00 Intro
00:38 What is this project all about
01:40 Current development state
02:13 Project’s goal initial definition
03:25 How the variants are arranged
04:02 How it works
08:50 “API” to set side to move & search depth
09:20 Standalone version
10:10 Standard chess source code walk through
26:25 Terms of use
28:35 Xiangqi variant source code walk through
33:11 Outro

Play bare minimum chess variants online:

Play with Wukong engine at

Play with Wukong engine online:

Chinese chess engine source code:

CCBridge Arena (GUI to play games between UCI/UCCI xiangqi engines):

Solve Xiangqi puzzles:

Download 40711 games played by Xiangqi masters in UCI format:

Xiangqi in English:

Support the channel


  1. Contents:00:00 Intro00:38 What is this project all about01:40 Current development state02:13 Project's goal initial definition03:25 How the variants are arranged04:02 How it works08:50 "API" to set side to move & search depth09:20 Standalone version10:10 Standard chess source code walk through26:25 Terms of use28:35 Xiangqi variant source code walk through33:11 Outro

Leave a Reply

Your email address will not be published. Required fields are marked *