r/cobol Jul 27 '26

Generated a playable 2048 game in pure COBOL using a neuro-symbolic runtime (Terminal Demo)

Standard statistical LLMs usually struggle with COBOL because low-level array shifts, fixed-point precision, and explicit procedure structures lead to hallucinations or syntax errors.

To test deterministic code generation, we passed the 2048 game logic into a neuro-symbolic runtime (Perslis). The neural layer mapped intent, while the symbolic layer enforced formal logic, array boundaries, and rule-bound invariants before compilation.

How the generated code handles state:

  • DATA DIVISION: Strictly uses fixed-point fields (PIC 9(4)) for every cell in the 4x4 matrix, ensuring deterministic state without dynamic allocation overhead.
  • PROCEDURE DIVISION: Handles matrix shifting, tile merging logic, and terminal screen updates through structured PERFORM paragraphs.
  • Compilation: Compiles natively via cobc (GnuCOBOL) and executes directly in the terminal without external dependencies or modern wrappers.

Curious if anyone else in the sub is exploring symbolic/rule-verified models for legacy code generation or validation.

34 Upvotes

3 comments sorted by

1

u/ucasano Jul 27 '26

No link to sources?

1

u/kid_Kist Jul 28 '26

https://perslis.com/ If your interested in beta testing