Guard Gallivant [Day 6 - Advent of Code 2024 - Python] @0xdf
Guard Gallivant [Day 6 - Advent of Code 2024 - Python]  @0xdf
Uploaded December 2024 | Updated November 2026, 3 hours ago
A grid challenge where I have to walk a guard until they hit an obstruction, then turn them to the right. In part 1, I count spaces visited. In part 2, I have to find all the places I could add a single obstruction to get the guard caught in a loop. Brute force works relatively quickly here.

2024 AOC repo: gitlab.com/0xdf/aoc2024
2024 AOC Intro vide: youtube.com/watch?v=4XKZZrhhiQE
VSCode Debug video: youtube.com/watch?v=cNhtk2Ob4B8

☕ Buy Me A Coffee: buymeacoffee.com/0xdf

[00:00] Part1 introduction
[01:05] Setup / data overview
[01:49] Strategy
[02:28] Data processing, finding start
[04:08] Walking grid
[06:57] Turns
[08:18] Solving part 1
[08:43] Part 2 challenge
[09:26] Strategy
[10:45] Function to check for loop
[12:41] Trying all possible obstructions
[14:20] Updating grid to be mutable
[15:19] Solving part 2
[16:05] Conclusion

#adventofcode #python
Guard Gallivant [Day 6 - Advent of Code 2024 - Python]RAM Run [Day 18 - Advent of Code 2024 - Python]Reindeer Maze [Day 16 - Advent of Code 2024 - Python]Malicious JavaScript Vjw0rm / STRRAT AnalysisCafeteria [AOC2025 Day 5]Malicious XLS Analysis // CVE-2017-11882 Still Lives!Day 24: Never Tell Me The Odds [AOC2023 Python]Dirty Frag ExplainedDebugging WebAssembly [Derailed - Beyond Root]/proc and fd via Web File Read [Heal - HackTheBox]ThemeBleed Exploit Analysis (CVE-2023-38146)Day 6 - Signals and Noise [Revival of Code 2023 - Advent of Code 2016]
0xdf |

Guard Gallivant [Day 6 - Advent of Code 2024 - Python]

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER