Get the latest tech news
Propositional Parlor Puzzle
I've recently been playing Blue Prince, which is a great time if you are a fan of puzzle games like Return of the Obra Dinn or Outer Wilds and also a fan of...
This might be useful, if, say, you were making this game and writing a lot of them and wanted some kind of mechanical assurance as part of a test suite that you hadn't made a mistake. Let's start by coming up with a way to represent true, false, and variables (excuse my JavaScript style, I haven't written it professionally in like ten years): We're going to see a fun consequence of making our constructors self-simplifying in the way we did: we can just walk our tree and replacing variables with their true-or-false-ness, and then let simplification clean everything up.
Or read this on Hacker News