Page 1 of 1

Harbour Chess

Posted: Sun Sep 13, 2026 12:09 pm
by gfilatov
Hello everyone,

I would like to express my sincere gratitude to Marcos Jarrin for implementing this chess game using Harbour and MiniGUI Extended.

It had long been a dream of mine to have a full-fledged chess engine in MiniGUI.

Here is the application's main header and a few screenshots.
I am also attaching the technical documentation and user manual for your reference—in case you are a chess enthusiast like me.

/*
Program : chess.prg — Harbour Chess
Author : Marcos Jarrín · BadaSystem · badasystem.com
Toolchain: Harbour + MiniGUI Extended (Win32) + BCC 32-bit
Version : 2.34 · 13/09/2026
License : MIT (see LICENSE.md)

Purpose
-------
Single-module chess application supporting Human vs Human, Human vs Machine,
and Machine vs Machine. Implements core FIDE chess rules including castling,
en passant, promotion, checkmate/stalemate, claimable 3-fold and 50-move
draws, automatic 5-fold and 75-move draws, and insufficient-material cases.

AI engine: Alpha-Beta search with quiescence, iterative deepening, PVS,
killer/history/countermove ordering, Zobrist transposition table (with
mate-distance normalization and draw-context exact-cutoff suppression),
and a phased evaluation (material, piece-square tables, mobility, pawn
structure). Time-controlled iterative deepening with partial-depth commit
policy (Mode A soft-finish / Mode B full-depth only). Root-parallel
multi-threaded search with worker I/O isolation.

Architecture
------------
GUI (MiniGUI) → controller (DoMove, timers, menus)
→ engine (GenLegalMoves, ApplyMove / MakeMove-UnmakeMove)
Legal-move validation uses the same in-place MakeMove/UnmakeMove path as
search. Search undo state is a compact fixed array; repetition counts are
maintained incrementally. Engine state is a hash mutated in place.
AI search is started by a timer. Root-parallel workers use THREAD STATIC
state and never perform console/logfile I/O (routed via ChessDebugOut).

Encoding: UTF-8 (optional Unicode piece glyphs).
UI strings go through T(cKey); hash reads through _HGetSafe().
*/
start_position.png
start_position.png (18.83 KiB) Viewed 38 times
replay_position.png
replay_position.png (28.14 KiB) Viewed 38 times
final_position.png
final_position.png (26.93 KiB) Viewed 38 times
I hope you have a great time and a wonderful day.

Re: Harbour Chess

Posted: Sun Sep 13, 2026 3:34 pm
by serge_girard
Thanks Grigory, where can we download?

Serge

Re: Harbour Chess

Posted: Mon Sep 14, 2026 3:34 pm
by gfilatov
serge_girard wrote: Sun Sep 13, 2026 3:34 pm Thanks Grigory, where can we download?
Hello Serge,

Here it is. 8-)

Have fun!