The Grasshopper 🦗 and the Lily Pads 🪷

Page 3

Figure 7: An easy one solved!
Let's see the algorithm work!

You can mouse over the nodes to see the solve path more clearly.

You may have spotted the "end" node, which wasn't there before. We need that new "terminal" node to make the algorithm work correctly because the grasshopper needs a node that every other node points to so that there's always a path.

Feel free to explore more. Here's a bunch of samples to start with or you can make your own! 🦗

Figure 8: Grasshopper 🦗 Playground

or

If you'd like the source code. It's available here:https://github.com/dsagman/grasshopper





Return to first page.