Removing a block was a bit fiddly on FireFox (Floorp) due to the right click menu appearing when I tried to click on a tile.
Looking forward to tomorrows!
I took a screenshot of my solution and the optimal one - and then I could compare like this.
Video: https://www.youtube.com/watch?v=-r6CnPzTXKE
Damn, the good old days when games didn't have loot boxes, ads, etc...
https://enclose.horse Day 8 PERFECT! 100%
[0] I'm assuming, possibly quite wrongly, that there's only one optimal solution per day.
window.__LEVEL__ = null; window.__DAILY_MODE__ = true; window.__DAILY_LEVELS__ = [{"id":"FswXDo","date":"2026-01-06","dayNumber":8,"optimalScore":86},{"id":"6UV4Yw","date":"2026-01-05","dayNumber":7,"optimalScore":95},{"id":"VfWi_1","date":"2026-01-04","dayNumber":6,"optimalScore":77},{"id":"CNtGPI","date":"2026-01-03","dayNumber":5,"optimalScore":116},{"id":"tnLvlG","date":"2026-01-02","dayNumber":4,"optimalScore":51},{"id":"Qn9vLs","date":"2026-01-01","dayNumber":3,"optimalScore":74},{"id":"Kj7mXp","date":"2025-12-31","dayNumber":2,"optimalScore":90},{"id":"E03KkY","date":"2025-12-30","dayNumber":1,"optimalScore":68}];
EDIT: the view optimal button appears after submissionJust show all the different levels at once.
And when there were sites with unlimited Wordle, I played a few in a row.
On the internet, unlike with newspapers, you're not limited to how many levels/games you can make per day. Making it once per day doesn't make any sense whatsoever. It's condescending to the users and feels like a power trip.
condescending (adjective): having or showing an attitude of patronizing superiority.
I don't really see how a once-a-day puzzle is condescending, unless it's a "You can't be trusted to regulate yourself so I'll do it for you" type thing. Adding a dictionary definition like above, however, probably is condescending :)
But I like the one-a-day format because, as other comments have said, you can spend an entire day with just one puzzle feeling important (relative to things that are important).
Ironically, that's what I initially liked about the daily puzzles like Wordle: they forcibly prevented you from sinking too much time into them. It was sort of like, "hey here's something cool, and I'm going to make sure it's a positive addition to your life by preventing you from succumbing to your own addictive impulses". You could call that condescending or infantilizing, but to me it's just part of the look and feel of a thing. Especially if the author isn't charging money, they get to use whatever tools are at their disposal to craft the users' experience of it. Wordle Over And Over Again is a different game than Wordle Once Daily. (And WOAOA done properly would probably have a progression of difficulties, or themes, or something, whereas WOD makes more sense with pure randomness.)
I love Wordle but I found it unplayable when I used that Wordle archive site to play infinite games since there was no reason to think deeply about the 10th+ round I was playing in one sitting.
See
https://gist.github.com/Macuyiko/86299dc120478fdff529cab386f...
You can more precisely track flows and do maximization with ILP, but that often loses conflict-driven clause learning advantages.
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.
Score: 7
~~~~~~
~····~
~·~~·~
.#..#.
......
..#...
.#H#..
..#...
However, I think that you do not need 'time' based variables in the form of reachable(x,y,t) = reachable(nx,ny,t-1)
Enforcing connectivity through single-commodity flows is IMO better to enforce flood fill (also introduces additional variables but is typically easier to solve with CP heuristics): Score: 2
~~~~~~
~....~
~.~~.~
......
......
..##..
.#H·#.
..##..
Cool puzzle!Note that traditional SAT and SMT solvers are quite inefficient at computing flood-fills.
The ASP specifications it uses to compute optimal solutions are surprisingly short and readable, and look like:
#const budget=11.
horse(4,4).
cell(0,0).
boundary(0,0).
cell(0,1).
boundary(0,1).
% ...truncated for brevity...
cell(3,1).
water(3,1).
% ...
% Adjacent cells (4-way connectivity)
adj(R,C, R+1,C) :- cell(R,C), cell(R+1,C).
adj(R,C, R-1,C) :- cell(R,C), cell(R-1,C).
adj(R,C, R,C+1) :- cell(R,C), cell(R,C+1).
adj(R,C, R,C-1) :- cell(R,C), cell(R,C-1).
% Walkable = not water
walkable(R,C) :- cell(R,C), not water(R,C).
% Choice: place wall on any walkable cell except horse and cherries
{ wall(R,C) } :- walkable(R,C), not horse(R,C), not cherry(R,C).
% Budget constraint (native counting - no bit-blasting!)
:- #count { R,C : wall(R,C) } > budget.
% Reachability from horse (z = enclosed/reachable cells)
z(R,C) :- horse(R,C).
z(R2,C2) :- z(R1,C1), adj(R1,C1, R2,C2), walkable(R2,C2), not wall( R2,C2).
% Horse cannot reach boundary (would escape)
:- z(R,C), boundary(R,C).
% Maximize enclosed area (cherries worth +3 bonus = 4 total)
#maximize { 4,R,C : z(R,C), cherry(R,C) ; 1,R,C : z(R,C), not cherry( R,C) }.
% Only output wall positions
#show wall/2.[1] https://github.com/spack/spack/blob/develop/lib/spack/spack/...
Therefore, like a good little llm bitch that I have become recently, I straight away went to chatgpt/sonnet/gemini and asked them to compile me a list of more such "whatever this is known as". And holy cow!! This is a whole new world.
My ask to HN community: any good book recommendations related to "such stuff"? Not those research kinds as I don't have enough brain cells for it. But, a little easier and practical ones?
Thanks..
1. Symbolic reasoning
2. SAT/SMT/ASP
3. pre-machine-learning formulations of AI
"Declarative programming"[1] is kind of a superset of logic programming, which may or may not be the aspect that piques your interest.
"Constraint programming"[2] and "Constraint logic programming"[3] are also a perspective on it.
[0] https://en.wikipedia.org/wiki/Logic_programming
[1] https://en.wikipedia.org/wiki/Declarative_programming
[2] https://en.wikipedia.org/wiki/Constraint_programming
[3] https://en.wikipedia.org/wiki/Constraint_logic_programming
- https://www.cs.utexas.edu/~vl/teaching/378/ASP.pdf
It starts with basics of using ASP and gives examples in clingo, not math.
The Potassco book is more comprehensive and will help you understand better what is going on:
Things I don't like include that it's more dense, doesn't use clingo examples (mostly math-style examples so you kind of have to translate them in your head), and while the proofs of how grounding works are interesting, the explanations are kind of short and don't always have the intuition I want.
I still think this is the authoritative reference.
The "how to build your own ASP system" paper is a good breakdown of how to integrate ASP into other projects:
- https://arxiv.org/abs/2008.06692
The Potassco folks are doing amazing work maintaining these tools. I also wish more people knew about them.
EDIT: I forgot to mention that specifically for games stuff like enclose.horse, look at Adam Smith's Applied ASP Course from UCSC:
- https://canvas.ucsc.edu/courses/1338
Forgot to mention that one... we use clingo in Spack for dependency solving and other applications frequently slip my mind.
Edit: apex-4-regular
Great, now I've been double nerd-sniped - once for the thing itself and another for 'What would an optimiser for this look like? Graph cuts? SAT/SMT? [AC]SP?'
The Leetcode version of this is "find articulation points", which is just a DFS, but it's less general than what is presented here.
https://cs.stackexchange.com/questions/176005/how-to-remove-...
I don’t think the gates should animate up into the air. It breaks the visual logic of 2D for no benefit. It’s subconsciously confusing to see a gate I place in one cell move to occupy pixels in the cell “above” it.
I look forward to future days introducing new mechanics as well. Can I suggest a few, based on dynamics?
- Food! The horse moves on every turn towards an attractor. Have a hay bale / giant sugar cube in one corner fall off the back of a truck / helicopter :) Horses start out dumb and move directly towards the goal before backtracking. Smarter horses path find the shortest route to the goal.
- Goals! Now that the horse is moving, get the horse into a static horse box / cattle pen cell by strategically placing fences so that the path it takes towards the food involves walking onto the goal square.
- Floods! Water encroaches from the edges on a turn by turn basis. Not only do you have to contain the horse, you also have to hold back the flood.
I think it should go up, otherwise it doesn't look like a wall. It would look like something the horse can step on and run over. For the water it makes sense to be flat flat and that the horse doesn't want to touch it: it is water-shy.
Great game! Feature request: add a button that shows my submitted solution. I'd like to be able to compare it with the optimal solution (so it'd be nice if a single tap could toggle between my submission and the optimal).
I agree! It feels off compared to the overall aesthetic of the game.
Awesome game though! Loved it.
I also wonder if making it GPL and submitting to various *NIX distros would be best. Then it may need to be standalone with random maps created by ML or similar.
I hope they're not. Can't we have a few things in this world that are just fun without going and sticking surveillance on them?
Please, show me a piece of software, or game, that is perfect the first time it is made.
This whole industry really needs a lesson on consent.
If I collect information on how often a coin-op Street Fighter II game is played in an arcade, while collecting no personal information, consent is not needed.
If I want to play a game and provide my feedback, the default should be that that doesn't happen unless I explicitly say it should.
Opt-out means that, by default, you're collecting metrics from my plays, until I find the means to opt-out.
trying to understand player behavior in the context of a board or video game (though there is some overlap!) is not the same as trying to understand user behavior in the context of social media or purchasing behavior - the data of both of which derive their value from being sold to THIRD PARTIES as a commodity.
being able to tune a fun little video game is not the same thing at all
This is a rather simple game to program. IMO, if you can program, take a few weekends to make your own game based on your ideas. If you can't program, your ideas will lead you to a wonderful learning project.
I interpreted it as standard "top-down" RPG graphics, where the Y axis always doubles as the Z axis. As such, I didn't find it visually confusing - but it did made playing on mobile annoying, because you often end up targeting the wrong field.
(jk)
But, you absolutely could make this a turn based game where the horse is trying to escape and you (playing as the farmer), work to fence it in as it meanders towards a gate.
[1] https://store.steampowered.com/app/1628610/Paquerette_Down_t...
1. lure the horse to an optimal point on the map.
2. trap it in a small circle of fences.
3. build part of your final wall with the remaining fences.
4. one by one, move the fences trapping the horse in place into position.
I did originally try to measure the difficulty computationally by running the solver and timing it, but it didn't really line up with what humans would find difficult. Now I'm just eyeballing it.
Ah the famous spherical horse in vacuum
The collected answered could probably be used to teach an AI to approach this type of problem thereby gaining some of the cognitive biases that humans have, which is exactly what you want in some cases: An AI that generates human like solutions to hard problems .
1. Do a screenshot of the grid (try to include walls as well)
2. Open https://enclosure-horse-solution.onrender.com/
3. Make sure the number of walls are correct in the input (bottom left)
4. Press "Solve"
PS: It might crash as it's on the free version of render. I've added a caching layer.
Here's the github so you can run it locally:
https://github.com/langarus/enclosure.horse-solution
clone it and run
make init // make web
https://i.pinimg.com/736x/4f/51/e0/4f51e04263a89a008e29668b7...
Reference[1] for anyone wondering.
My algorithm, by hand, was as such:
1. Start with the smallest possible valid solution (1)
2. Expand slowly, and each "step" (like, moving a wall or two around to "obvious" spaces) must be a valid solution (this brings you to 40-60 score, depending on your choices, on day 8). Continue to step 3 once you can't see anything obvious.
3. Look at possible places where you could expand, but need 1 more block. You'll find one eventually.
4. See if you can spare any walls anywhere, using diagonals for example. If so, place the solution from 3 and go to 3 (repeat). If not, go to 5.
5. Count or estimate the squares gained by doing your improvement from 3. See if you can reduce your score by less than that, pessimizing your solution, to gain 1 wall. Once you've found one, go to 3.
That got me to the optimal score within 15 mins or so.
Very fun game
It would be interesting to be able to change the wall budget for each puzzle to add some variation (with a max limit).
Only nit: fix the walls. They take up one and a half spaces so are confusing, and they're sci-fi steel with flashing red lights. Turn them into one-square-only fences. You use fences to enclose horses, not raptor walls from Jurassic Park.
I did figure out that you can get back to yours by going through the past-days menu though.
And same about the walls. Especially on mobile it’s hard enough to tap the right square, and having a wall poking up from the square below just makes things worse.
But overall I love the game!
Right now, this is only used for troll levels, but I wonder if you could also use it for some actual puzzles.
Doesn't feel outrageously difficult to put inside a webview?
I didn't initially expect it would be a problem, but the constant squiggly movement gets very annoying.
https://enclose.horse Day 8 PERFECT! 100%
I wonder how the wiggle animation is implemented in for the buttons and modal.
I'd even go so far as to deny any submission with more than sqrt(size) walls.
algorithm:
1. infer grid dimensions
2. color histogram analysis to designate grasses, water, cherries and horse
3. apply mixed-integer linear programming to determine optimized wall placements
4. profit!
lukebechtel•1d ago
sneak•1d ago
cdelsolar•1d ago
hk__2•1d ago