day21 package
Subpackages
- day21.lib package
- Submodules
- day21.lib.classes module
BaseDistanceMaze
DistanceMaze
DistanceMazes
GiantNodeParser
GiantNodeType
GiantNodeType.EAST_TIP
GiantNodeType.FULL_EVEN
GiantNodeType.FULL_ODD
GiantNodeType.NORTH_EAST_BIG
GiantNodeType.NORTH_EAST_SMALL
GiantNodeType.NORTH_TIP
GiantNodeType.NORTH_WEST_BIG
GiantNodeType.NORTH_WEST_SMALL
GiantNodeType.SOUTH_EAST_BIG
GiantNodeType.SOUTH_EAST_SMALL
GiantNodeType.SOUTH_TIP
GiantNodeType.SOUTH_WEST_BIG
GiantNodeType.SOUTH_WEST_SMALL
GiantNodeType.WEST_TIP
Maze
Position
PositionDist
- day21.lib.parsers module
- Module contents
Submodules
day21.day21 module
day21 solution.
- class day21.day21.SmartSteps(boards_to_edge: int, steps: int)[source]
Bases:
object
How many boards to edge of solution, and steps to simulate.
- boards_to_edge: int
- steps: int
- day21.day21.calculate_smart_steps(board_size: int, steps: int) SmartSteps [source]
Given a board size and num steps, calculate how many steps we actually need.
- day21.day21.mini_solve(start_pos: Position, maze: Maze, steps: int, distances: BaseDistanceMaze) BaseDistanceMaze [source]
Given a BaseDistanceMaze, runs steps steps then returns the maze.
- day21.day21.naive_solve(start_pos: Position, maze: Maze, steps: int, distances: BaseDistanceMaze) int [source]
Naively solve a maze.
Module contents
Day21 solution.