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().
*/
I hope you have a great time and a wonderful day.
Harbour Chess
Moderator: Rathinagiri
Harbour Chess
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- serge_girard
- Posts: 3429
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Harbour Chess
Thanks Grigory, where can we download?
Serge
Serge
There's nothing you can do that can't be done...
Re: Harbour Chess
Hello Serge,
Here it is.
Have fun!
- Attachments
-
- Chess.zip
- Chess application and two manuals
- (1.36 MiB) Downloaded 34 times
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: Harbour Chess
Coincidence of life: I’m working on a very similar project.(Minigui & HMG)
(don´t forget to install chess_alpha_Font inclued in the zip)
CTRL+M: Show the IA Thinking Monitor (Don´t forge to navigate the Analisys tree)
The pieces can be moved using drag and drop.
Chess, with Human vs. Human, Human vs. AI, and AI vs. AI modes.
Theme settings
IA LAB
Tuning LAB
Can Play using external engines
It can compete in UCI mode under Arena.
Play Book with Clasicc Openings
Copy (CTRL+C) and Paste (CTRL+V) FEN Codes:
[image]
(don´t forget to install chess_alpha_Font inclued in the zip)
CTRL+M: Show the IA Thinking Monitor (Don´t forge to navigate the Analisys tree)
The pieces can be moved using drag and drop.
Chess, with Human vs. Human, Human vs. AI, and AI vs. AI modes.
Theme settings
IA LAB
Tuning LAB
Can Play using external engines
It can compete in UCI mode under Arena.
Play Book with Clasicc Openings
Copy (CTRL+C) and Paste (CTRL+V) FEN Codes:
Code: Select all
example1: 4r1k1/5ppp/8/8/Q7/8/5PPP/4R1K1 b - - 0 1
example2: 8/5pk1/4p1p1/3pP1P1/p1pP1K2/PpP5/1P6/8 b - - 3 52
example3: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
[image]
Code: Select all
ON KEY ESCAPE OF Form_Ajedrez ACTION CancelSelection() // Cancelar selección
ON KEY CONTROL+Y OF Form_Ajedrez ACTION ( Redo() )
ON KEY CONTROL+Z OF Form_Ajedrez ACTION ( Undo() )
ON KEY CONTROL+N OF Form_Ajedrez ACTION ( NewGame() )
ON KEY CONTROL+E OF Form_Ajedrez ACTION ( ExportFEN() )
ON KEY CONTROL+I OF Form_Ajedrez ACTION ( ImportFEN() )
ON KEY CONTROL+P OF Form_Ajedrez ACTION ( ExportPGN() )
ON KEY CONTROL+O OF Form_Ajedrez ACTION ( ImportPGN() )
ON KEY CONTROL+G OF Form_Ajedrez ACTION ( SaveGame() )
ON KEY CONTROL+S OF Form_Ajedrez ACTION ( SaveGame() )
ON KEY CONTROL+A OF Form_Ajedrez ACTION ( LoadGame() )
ON KEY CONTROL+L OF Form_Ajedrez ACTION ( LoadGame() )
ON KEY CONTROL+M OF Form_Ajedrez ACTION ( ShowMonitorWindow() )
ON KEY CONTROL+T OF Form_Ajedrez ACTION ( RunIntegrityTests() )
ON KEY CONTROL+C OF Form_Ajedrez ACTION ( CopyFENToClipboard() )
ON KEY CONTROL+V OF Form_Ajedrez ACTION ( PasteFENFromClipboard() )
ON KEY CONTROL+H OF Form_Ajedrez ACTION ( Test_Syzygy_Directo() )
ON KEY CONTROL+J OF Form_Ajedrez ACTION ( DownloadMissingSyzygy() )
Re: Harbour Chess
Thank you very much for your feedback!
Your project is very interesting
BTW You can see the 'About' dialog of the Harbour Chess app with the features description in the picture:
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: Harbour Chess
Thank you very much! This is much clearer now
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein