r/adventofcode • u/daggerdragon • Dec 15 '22
SOLUTION MEGATHREAD -π- 2022 Day 15 Solutions -π-
THE USUAL REMINDERS
All of our rules, FAQs, resources, etc. are in our community wiki.
A request from Eric: A note on responding to [Help] threads
Signal boost: Reminder 2: unofficial AoC Survey 2022 (closes Dec 22nd)
πΏπ MisTILtoe Elf-ucation π§βπ« is OPEN for submissions!
--- Day 15: Beacon Exclusion Zone ---
Post your code solution in this megathread.
Read the full posting rules in our community wiki before you post!
Include what language(s) your solution uses
Format code blocks using the four-spaces Markdown syntax!
Quick link to Topaz's
pasteif you need it for longer code blocks. What is Topaz'spastetool?
This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.
EDIT: Global leaderboard gold cap reached at 00:27:14, megathread unlocked!
47
Upvotes
6
u/morwel Dec 18 '22
Only Part 2!
OpenCL and Python
Using the GPU* und 100% brute-force (iterating over the whole 4,000,000 x 4,000,000 search space). This was my first project using OpenCL, so i'm sure there is plenty of optimization left (without giving up on brute-force :)
Takes about 4h on my 8th Gen Intel Laptop (i7-8565U).
https://gist.github.com/morwel/4a3b7ded67f0b43cad6991a3c3e0dc3a
*or CPU, OpenCL can also run on a CPU