From e4f9a18f22a2b737c96391348e7aef5bfe3e9bd6 Mon Sep 17 00:00:00 2001 From: Paul ALNET Date: Mon, 20 May 2024 21:59:17 +0200 Subject: [PATCH] doc(marathon): add path constrains and algo ideas --- Marathon.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Marathon.md diff --git a/Marathon.md b/Marathon.md new file mode 100644 index 0000000..564040b --- /dev/null +++ b/Marathon.md @@ -0,0 +1,33 @@ +# Marathon open problem + +We are given a graph `G` and a starting node `S` and must find a path of marathon length (42.195 km) +with an end node close to `S`. + +## Constraints + +Constraints for an acceptable path : +- Path is valid +- Path is accessible by foot +- Path nodes are not visited twice +- Path length is 42 195 +/- 40 meters +- Starting node is less than 200 m away from end node. + +Constraints for an optimal path : +- Path is acceptable +- Path length is as close as possible to 42 195 meters + AND/OR start and end node are as close as possible + +Note : the [Toulouse 2024 marathon][toulouse-2024] start and end points are roughly 200 meters apart. + +The algorithm should fail if no acceptable path can be found. + +[toulouse-2024]: https://toulouserunexperience.fr/marathon/ + +## Algo ideas + +Use A* with an heuristic taking into account : +- Path Length +- and distance to end node. + +Score : `42 195 + | 42 195 - pathLength | + distance end to node`. +