Skip to content

Commit

Permalink
feat(2024/Day_16): some thoughts
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheinxy committed Dec 16, 2024
1 parent 9f118b8 commit 67d37d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 2024/Day_16/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,11 @@ Comparisons:
./Day_16 bonus input 4.74s user 0.07s system 98% cpu 4.869 total
```

I also have a feeling that it is technicaly not right as a path-finding algorithm:
- The value for the end position will depend on the last computed path.
- With the smallest higher bound possible, it is guaranted to be the right value
- However, for some higher bound I am not sure that it would work.

One way to fix that would be to swap the `position x == end` guard with the `dist >= bestDist` guard, and to initialise mem with all possible states for end at `(True, maxDist)`

If anyone know what the hell I did, don't hesitate to reach me on [bluesky](https://bsky.app/profile/sheinxy.bsky.social).

0 comments on commit 67d37d2

Please sign in to comment.