Live data from Hacker News

enclose.horse

enclose.horse

21–30 of 242 posts

Re: enclose.horse

#21

Earlier quoted context omitted.

I disagree about the replayability aspect. It‘s a daily challenge, so come back tomorrow. I quite like it.

I seriously don't get the idea behind daily challenges unless you want to keep users hooked to extract some value from them, but that doesn't seem to be the case here, as there are no ads. Just show all the different levels at once.

That's fine. So these kind of games aren't for you, then. Remember crosswords in newspapers? Yeah, think of it like that. You don't get hooked until you cannot let go, you get a limited chunk served each day. Same with Wordle.

Re: enclose.horse

#22

I am curious on how you would algorithmically find the optimal solution for this kind of problem for much bigger grids. I wanted to do some seed finding in Factorio for the same exact problem using the generated map images, but never found a good solution that was fast enough.

[deleted]

Re: enclose.horse

#23

Earlier quoted context omitted.

I seriously don't get the idea behind daily challenges unless you want to keep users hooked to extract some value from them, but that doesn't seem to be the case here, as there are no ads. Just show all the different levels at once.

That's fine. So these kind of games aren't for you, then. Remember crosswords in newspapers? Yeah, think of it like that. You don't get hooked until you cannot let go, you get a limited chunk served each day. Same with Wordle.

I remember buying a magazine full of crosswords and similar puzzles when I was in the mood.

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.

Re: enclose.horse

#24

I am curious on how you would algorithmically find the optimal solution for this kind of problem for much bigger grids. I wanted to do some seed finding in Factorio for the same exact problem using the generated map images, but never found a good solution that was fast enough.

Constraint programming seems to be a fitting approach. Input would be number of walls, and the location of lakes. The decision variables would be the positions of walls. In order to encode the horse being enclosed, additional variables for whether horse can reach a given square can be given. Finally, constraints for reachability and that edges cannot be reached should ensure correctness.

Re: enclose.horse

#25

I did Day 8 - I don't know if Perfect means I got the most optimal score, I do show up at the top of the graph. https://enclose.horse Day 8 PERFECT! 100%

If you click on "View Optimal", it shows you the optimal solution which should be identical[0] to yours for "Perfect".

[0] I'm assuming, possibly quite wrongly, that there's only one optimal solution per day.

Re: enclose.horse

#27
post #8

I expected the horse to move one tile for each block you placed. I had an elaborate plan to lure it towards one exit and then close it at the last minute... Nope!

I did see a game recently which did that (you place a tile, the animal moves a tile, etc.) - possibly on itch.io. I'll see if I can dig it out.

Re: enclose.horse

#28

I am curious on how you would algorithmically find the optimal solution for this kind of problem for much bigger grids. I wanted to do some seed finding in Factorio for the same exact problem using the generated map images, but never found a good solution that was fast enough.

The site uses Answer Set Programming with the Clingo engine to compute the optimal solutions for smaller grids. Maximizing grids like this is probably NP-hard.

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.

Re: enclose.horse

#29

Cool game, but I don't like how you get only one chance. Even returning to the page, you can't try again to beat your previous score. No replayability value at all.

You can just test without submitting though?

Re: enclose.horse

#30

Earlier quoted context omitted.

That's fine. So these kind of games aren't for you, then. Remember crosswords in newspapers? Yeah, think of it like that. You don't get hooked until you cannot let go, you get a limited chunk served each day. Same with Wordle.

I remember buying a magazine full of crosswords and similar puzzles when I was in the mood. 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.

You can freely make levels and browse other people's levels. The complaining about power trips seems as uncharitable a perspective as you could possibly conceive of, not to mention a bit theatric.
Post reply on HN