From 7d66f5f4892dbeb2ce1afbf3714912e90a691966 Mon Sep 17 00:00:00 2001 From: Brent Yorgey Date: Thu, 23 Nov 2023 22:00:15 -0600 Subject: [PATCH] idea for shortest path solution --- .../Challenges/Mazes/_shortest_path/shortest_path_sol.sw | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/scenarios/Challenges/Mazes/_shortest_path/shortest_path_sol.sw b/data/scenarios/Challenges/Mazes/_shortest_path/shortest_path_sol.sw index e69de29bb..49abdb9ff 100644 --- a/data/scenarios/Challenges/Mazes/_shortest_path/shortest_path_sol.sw +++ b/data/scenarios/Challenges/Mazes/_shortest_path/shortest_path_sol.sw @@ -0,0 +1,6 @@ +// Idea: keep a fringe of locations marked with some entity (say, +// flowers), such that at every step a location has a flower iff it is +// exactly n steps away. To expand it, do DFS (marking visited spots with rocks), +// and when finding flowers, mark adjacent empty spots with some third entity; +// then do a second pass to get rid of flowers; then a third pass to turn the +// third entity into flowers.