Early AI hype cycles, after all, is where Prolog, like Lisp, shone.
Prolog would be how I would solve puzzles like that as well. It is like calling someone weak for using a spreadsheet or a calculator.
Abductive Commonsense Reasoning Exploiting Mutually Exclusive Explanations https://arxiv.org/abs/2305.14618
It's unfortunate that for all the people who work in AI most of them barely even know what Prolog is.
(All current commercial LLMs are badly overfit on this puzzle, so if you try changing parts of it they'll get stuck and try to give the original answer in ways that don't make sense.)
Specifically, it usually decides it knows what the answer is (and gets it wrong), then optimizes out the part of the program that does anything.
If the puzzle generator is hosted anywhere, I'd love to have a look at it.