It's not quite that easy. For the simplest example, look at https://enclose.horse/play/dlctud, where the naive solution will waste two walls to fence in the large area. Obviously, you can construct puzzles that have lots of these "bait" areas.
Like the other comment suggested, running a loop where you keep adding constraints that eliminate invalid solutions will probably work for any puzzle that a human would want to solve.
I don't believe this works in general. If you have a set of tiles that connect to neither the horse nor to an exit, they can still keep each other reachable in this formulation.
That's only if you are using pure predicates.
From a quick glance, the code makes liberal use of assert, retract, and the cut operator, so you can't write a query that solves the problem automatically.
Up and down quarks have names that make perfect sense, they are derived from the isospin which in turn derives from spin (spin-1/2 was the only other well-known object in physics that had the same symmetry properties). Which one is up and which one is down is the only arbitrary choice.
Using "positive" and "negative" would have been a disaster. What charge does a positive antiquark have?
Like the other comment suggested, running a loop where you keep adding constraints that eliminate invalid solutions will probably work for any puzzle that a human would want to solve.