Algorithmic Autogram Generation: A Programmer's Word Game
2025-05-31
This article details an algorithm for generating autograms—sentences that describe their own character counts. The author first explains the underlying principle: iteratively creating a sequence of sentences, each describing the character counts of the previous one, until a cycle is formed containing the autogram. The algorithm is refined by randomly updating a single character count at each iteration, improving efficiency. Several generated examples are showcased, including birthday greetings and pangrams, along with code and resource links.
Development
autogram