Copyright | (c) Eric Mertens 2019 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
https://adventofcode.com/2019/day/18
Approach:
- Reduce maze to a graph with
extractGraph
Nodes: starting points, gates, keys Edges: shortest direct route between nodes - Implement
nextKey
function to find list of reachable keys for a particular robot. - Use Djikstra search to search the space of picking a robot to move from its current position to an unvisited key until all keys are visited.