This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| A naive implementation of graph colour coding: https://en.wikipedia.org/wiki/Color-coding | |
| Inspired by this stack overflow answer by Julian "jubueche" Büchel: https://stackoverflow.com/a/45535671/11754606 | |
| This gist attempts to find a route of a given length, between two nodes in a graph. | |
| This is a naive implementation that very often fails for route lengths near the maximum possible. | |
| For example, a 22-node route between Talidor and Wah'Norr is possible, but often fails to be generated, even within 2000 graph colourations. | |
| The approach is effectively a depth first search with stochastic constraints. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"label":"test coverage","message":"91%","schemaVersion":1,"color":"hsl(109, 100%, 40%)"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"schemaVersion":1,"label":"test coverage","message":"83.35%","color":"green","namedLogo":"jest"} |