# \--- AOC Day 15: Chiton ---

**URL:** <https://forum.kx.com/t/aoc-day-15-chiton/12323>\
**Category:** Community Support\
**Tags:** advent-of-code\
**Created:** [December 15, 2021, 11:16am UTC](https://forum.kx.com/t/aoc-day-15-chiton/12323 "2021-12-15T11:16:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laura2](https://avatars.discourse-cdn.com/v4/letter/l/76d3ee/32.png) [@Laura2](https://forum.kx.com/u/Laura2)\
**Post date:** [December 15, 2021, 11:16am UTC](https://forum.kx.com/t/aoc-day-15-chiton/12323/1 "2021-12-15T11:16:00Z")

</div>

You’ve almost reached the exit of the cave, but the walls are getting closer together. Your submarine can barely still fit, though; the main problem is that the walls of the cave are covered in&nbsp;chitons, and it would be best not to bump any of them.

The cavern is large, but has a very low ceiling, restricting your motion to two dimensions. The shape of the cavern resembles a square; a quick scan of chiton density produces a map of&nbsp;_risk level_&nbsp;throughout the cave (your puzzle input). For example:

```
1163751742 1381373672 2136511328 3694931569 7463417111 1319128137 1359912421 3125421639 1293138521 2311944581

```

You start in the top left position, your destination is the bottom right position, and you&nbsp;cannot move diagonally. The number at each position is its&nbsp;_risk level_; to determine the total risk of an entire path, add up the risk levels of each position you&nbsp;_enter_&nbsp;(that is, don’t count the risk level of your starting position unless you enter it; leaving it adds no risk to your total).

Your goal is to find a path with the&nbsp;_lowest total risk_. In this example, a path with the lowest total risk is highlighted here:

```
1163751742 1381373672 2136511328 3694931569 7463417111 1319128137 1359912421 3125421639 1293138521 2311944581

```

The total risk of this path is&nbsp;`40`&nbsp;(the starting position is never entered, so its risk is not counted).

_What is the lowest total risk of any path from the top left to the bottom right?_

&nbsp;

**All credit for the above puzzle goes to Eric Wastl and Advent of Code.**

**Don’t forget to submit your solutions at&nbsp;adventofcode.com\*\*\*\*&nbsp;and join the KX leaderboard using code&nbsp;1526329-bb0915a5.**
