Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Chess Engine (GNU COBOL)

This workspace translates the Java engine at /Users/mathieuacher/SANDBOX/chess-java-cc/ into GNU COBOL while preserving module structure and behavior.

Build

make build

Run

make run

Smoke test

make smoke

Polyglot smoke test

make smoke-polyglot

Elo assessment

scripts/assess_elo.py runs a two-engine match with cutechess-cli, parses PGN results, and reports:

  • score, W/D/L
  • Elo(A-B)
  • confidence interval
  • LOS (probability A > B)

Quick self-check:

make elo ELO_GAMES=20 MOVETIME_MS=50

Against another engine command:

make elo ENGINE_A="./chess_engine" ENGINE_B="java -jar /path/to/opponent.jar" ENGINE_A_NAME=COBOL ENGINE_B_NAME=OPP ELO_GAMES=200 MOVETIME_MS=100

Current translated modules

  • Engine bootstrap
  • UCI command loop (uci, isready, ucinewgame, position, go, perft, setoption, stop, quit)
  • board/Bitboard masks and attack-table initialization
  • board/Board core bitboard + mailbox state model
  • board/Board make/unmake + undo + null-move make/unmake
  • board/Board repetition/draw checks
  • board/FEN parsing
  • board/Zobrist deterministic key tables + incremental key maintenance
  • move/Move encode/decode + UCI conversion/parsing
  • move/MoveGenerator pseudo/legal move generation (including castling, en passant, promotions)
  • move/MoveGenerator capture-only legal generation path for search
  • move/MoveList scoring + pick-best ordering path (integrated in current COBOL data structures)
  • move/MagicBitboards precomputed magic attack tables + O(1) rook/bishop/queen lookups
  • move/SEE static exchange evaluation helper
  • move/AttackTables pawn/knight/king attack precompute
  • search/SearchInfo PV/search stat tracking
  • search/TranspositionTable store/probe
  • search/KillerMoves + search/HistoryTable heuristics
  • search/Search iterative deepening alpha-beta + quiescence core (stack-based translation)
  • search/Search root aspiration-window pass with full-window fallback
  • search/Search PVS-style null-window re-search path
  • search/Search reduced-depth null-move pruning (R = 3 + depth / 6) with fail-high clamp
  • search/Search LMR-style late quiet-move reduction/re-search path (Java log-based reduction formula + killer/history adjustments)
  • eval/EvalConstants + eval/PieceSquareTables tapered MG/EG evaluation tables
  • eval/Evaluation mobility terms (knight/bishop/rook attack-count mobility)
  • eval/PawnStructure doubled/isolated/passed pawn terms
  • eval/PawnStructure pawn hash cache path (Java-style keyed lookup table)
  • eval/KingSafety pawn-shield + open/semi-open king-file terms
  • book/PolyglotBook .bin loading, Polyglot key computation, weighted book probe, and Polyglot->internal move conversion

Detailed mapping and pending classes: /Users/mathieuacher/SANDBOX/chess-revisit-java-toRust-codex/chess-revisit-java-toCOBOL/PORTING_NOTES.md.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages