Harbour Chess

You can share your experience with HMG. Share with some screenshots/project details so that others will also be benefited.

Moderator: Rathinagiri

Post Reply
User avatar
gfilatov
Posts: 1116
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Harbour Chess

Post 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 32 times
replay_position.png
replay_position.png (28.14 KiB) Viewed 32 times
final_position.png
final_position.png (26.93 KiB) Viewed 32 times
I hope you have a great time and a wonderful day.
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
serge_girard
Posts: 3420
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Harbour Chess

Post by serge_girard »

Thanks Grigory, where can we download?

Serge
There's nothing you can do that can't be done...
User avatar
gfilatov
Posts: 1116
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: Harbour Chess

Post 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!
Attachments
Chess.zip
Chess application and two manuals
(1.36 MiB) Downloaded 3 times
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
Post Reply