Yes, I’ve tried it. For example, this was my winning entry from a year ago [0].
The LLM only performs trivial obfuscation, not advanced transformations.
For example:
if (x == 1 || x == 2) { ...
can be transformed into:
if (!(2+x*x-3*x)) { ...
An LLM will do this if you explicitly ask it to, but not on its own.
One of the main instruments of obfuscation (and the way to get more out of the size constraints) is making the code as short as possible, so in that example you'd prefer
if (!(x/2-1)) { ...
EDIT: Oops, confused the original with x==2 || x==3. Instead, we can use !(x-1>>1), which precedence rules parse as !((x-1)>>1).
extrano84 already found some errors but also 0 will fail and if x is int (instead of unsigned int) all negative numbers will also fail (but so will the original s-macke obfuscation as well).
Just two months ago I tried to write a short K code with Claude Opus 4.6, only to find that while it had sufficient knowledge about K vocabularies it didn't try to make good use of them. K is, while slightly obscure and obfuscated, a real programming language and certainly better known than obfuscated programming. I don't have high hope for IOCCC-grade obfuscation.
For example:
can be transformed into: An LLM will do this if you explicitly ask it to, but not on its own.[0] https://github.com/ioccc-src/winner/blob/master/2024/macke/p...