ZeroCode: On-demand Error-Correcting Code Construction from the Zero Matrix via Reinforcement Learning
This study addresses the challenge of adapting parity-check matrices of error-correcting codes to diverse scenario-specific requirements by proposing a unified construction framework based on reinforcement learning. The matrix generation process is formulated as a discrete sequential decision-making problem, where edges are incrementally added to an all-zero matrix. An action masking mechanism is introduced to flexibly embed structural constraints, enabling the generation of code libraries across multiple complexities through a single policy rollout without retraining. Experimental results demonstrate that for (32,16) short codes at a bit error rate of $10^{-4}$, the proposed method achieves approximately 1 dB gain over existing genetic, differentiable, and classical approaches, thereby realizing on-demand design of high-performance error-correcting codes.