Marjon Cajocon

Home › Engine

The shared core

One C engine, seven games, six neural networks.

Every app on this site is a thin Flutter shell around the same C engine. The search, the move generator and the network evaluator are shared; the rules and the trained net are what differ.

Search

Bitboard move generation, alpha-beta with iterative deepening, a transposition table, late-move reductions and futility pruning. Each variant compiles its own move generator from a shared template, so Turkish draughts — which moves orthogonally across all 64 squares — reuses the same search without special-casing it.

Evaluation

Six of the seven engines evaluate with an NNUE network compiled directly into the binary. The draughts nets use an antisymmetric formulation: the network is evaluated for the position and for its mirror, and the difference is the score. That guarantees the engine values a position identically from either side, which a plain network has to learn approximately and never quite gets right.

Weights are quantised to 16-bit integers, so evaluation is integer-only — no floating point in the search at all.

Input features and hidden width per engine.
EngineInput featuresHidden unitsEvaluation
Chess Ta!768256NNUE
Dama Ta!128512NNUE
Brazilian Checkers128256NNUE
International Draughts20032NNUE
Russian Checkers128128NNUE
English Draughts128128NNUE
Turkish DraughtsHand-crafted

Turkish is honest about what it is. Its shipped build uses the hand-crafted evaluation. The diagonal-board nets could not be reused — Turkish draughts plays on all 64 squares — and the nets trained for it so far have not beaten the hand-crafted baseline in gated testing, so none has been promoted.

Training

Nets are trained by a Go trainer against positions generated by self-play. The engine plays itself at a fixed depth, positions and their search scores are written out in shards, and the trainer fits the network to those labels. New nets are gated: a candidate only ships if it beats the current one over a match, which is why some trained candidates were never promoted.

Endgame tablebases

Late positions are answered from perfect-play tables rather than searched. The engines generate their own tablebases for small piece counts and probe them during search, so an endgame that a search would misjudge is played exactly.

Portability

The engine is plain C with no third-party dependencies. It compiles to a shared library for Android and Windows, and the Flutter apps call into it directly — the same code runs on a phone and on a desktop.

Marjon Cajocon

Software engineer · Talibon, Bohol, Philippines

I build game engines in C and the apps that ship them. Seven board-game engines, six of them running NNUE neural networks I trained myself, plus a from-scratch LLM engine written in dependency-free C.

Developer
MMC Solo Dev — the name my apps ship under on Google Play and the Microsoft Store
Primary
C — engines, evaluation, search, the LLM stack
Then
Go · Flutter (Dart) · Python · TypeScript / JavaScript
Certification
EDP Specialist — Civil Service, rated 94.65% (80% to pass)
Published
Six apps on the Microsoft Store, five on Google Play
Contact
marjoncajocon08@gmail.com
Code
github.com/marjoncajocon