(no title)
Zobody
|
1 month ago
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.
dyigitpolat|1 month ago
try at: https://dyigitpolat.github.io/enclose-horse-solver/
dyigitpolat|1 month ago
Macuyiko|1 month ago
See
https://gist.github.com/Macuyiko/86299dc120478fdff529cab386f...
ooopdddddd|1 month ago