#adventofcode2025 — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #adventofcode2025, aggregated by home.social.
-
@kimvanwyk I have been having so much fun with Advent Of Code 2025 (https://adventofcode.com/2025) -- thanks for putting me on to that!
I'm done with Day 10 (so 20 puzzles). I was able to solve 18 completely on my own. I only used AI for lookup-type questions, e.g. easiest way to create a list comprehension that takes stringA and turns it into a list of sets. (silly made up example, just to illustrate what I used AI for -- i.e. no help with the design of the solution itself, only language specific help, not puzzle logic help.)
Day 7 Part 2: After a couple of days of frustration, I had to peek at your solution in GitHub, and immediately grok-ed the approach you took and was able to manually replicate it.
Day 10 Part 2…. I hate to report… is the first one I eventually had to turn to ChatGPT to for the entire solution. It required higher order math-combination logic that I am not at all familiar with. I first wrote logic that was able to correctly brute force the example data, but the real data took the number of combinations to ridiculous levels -- well beyond my PC's reasonable abilities. So it required algorithms that I know NOTHING about. I am VERY impressed that ChatGPT was able to first give a brute force method when I gave it the example data, and when I gave it one line from the real data, it went “woah there buddy, that’s not possible with brute force, so let me give you a mathematical algorithmic way” and it then gave me a solution which worked first try, and solves the full problem in 2.5 seconds. Hate that I had to turn to AI, but there was no way I was going to solve that.
#advent_of_code #advent_of_code_2025 #adventofcode #adventofcode2025
-
@kimvanwyk I have been having so much fun with Advent Of Code 2025 (https://adventofcode.com/2025) -- thanks for putting me on to that!
I'm done with Day 10 (so 20 puzzles). I was able to solve 18 completely on my own. I only used AI for lookup-type questions, e.g. easiest way to create a list comprehension that takes stringA and turns it into a list of sets. (silly made up example, just to illustrate what I used AI for -- i.e. no help with the design of the solution itself, only language specific help, not puzzle logic help.)
Day 7 Part 2: After a couple of days of frustration, I had to peek at your solution in GitHub, and immediately grok-ed the approach you took and was able to manually replicate it.
Day 10 Part 2…. I hate to report… is the first one I eventually had to turn to ChatGPT to for the entire solution. It required higher order math-combination logic that I am not at all familiar with. I first wrote logic that was able to correctly brute force the example data, but the real data took the number of combinations to ridiculous levels -- well beyond my PC's reasonable abilities. So it required algorithms that I know NOTHING about. I am VERY impressed that ChatGPT was able to first give a brute force method when I gave it the example data, and when I gave it one line from the real data, it went “woah there buddy, that’s not possible with brute force, so let me give you a mathematical algorithmic way” and it then gave me a solution which worked first try, and solves the full problem in 2.5 seconds. Hate that I had to turn to AI, but there was no way I was going to solve that.
#advent_of_code #advent_of_code_2025 #adventofcode #adventofcode2025
-
@kimvanwyk I have been having so much fun with Advent Of Code 2025 (https://adventofcode.com/2025) -- thanks for putting me on to that!
I'm done with Day 10 (so 20 puzzles). I was able to solve 18 completely on my own. I only used AI for lookup-type questions, e.g. easiest way to create a list comprehension that takes stringA and turns it into a list of sets. (silly made up example, just to illustrate what I used AI for -- i.e. no help with the design of the solution itself, only language specific help, not puzzle logic help.)
Day 7 Part 2: After a couple of days of frustration, I had to peek at your solution in GitHub, and immediately grok-ed the approach you took and was able to manually replicate it.
Day 10 Part 2…. I hate to report… is the first one I eventually had to turn to ChatGPT to for the entire solution. It required higher order math-combination logic that I am not at all familiar with. I first wrote logic that was able to correctly brute force the example data, but the real data took the number of combinations to ridiculous levels -- well beyond my PC's reasonable abilities. So it required algorithms that I know NOTHING about. I am VERY impressed that ChatGPT was able to first give a brute force method when I gave it the example data, and when I gave it one line from the real data, it went “woah there buddy, that’s not possible with brute force, so let me give you a mathematical algorithmic way” and it then gave me a solution which worked first try, and solves the full problem in 2.5 seconds. Hate that I had to turn to AI, but there was no way I was going to solve that.
#advent_of_code #advent_of_code_2025 #adventofcode #adventofcode2025
-
@kimvanwyk I have been having so much fun with Advent Of Code 2025 (https://adventofcode.com/2025) -- thanks for putting me on to that!
I'm done with Day 10 (so 20 puzzles). I was able to solve 18 completely on my own. I only used AI for lookup-type questions, e.g. easiest way to create a list comprehension that takes stringA and turns it into a list of sets. (silly made up example, just to illustrate what I used AI for -- i.e. no help with the design of the solution itself, only language specific help, not puzzle logic help.)
Day 7 Part 2: After a couple of days of frustration, I had to peek at your solution in GitHub, and immediately grok-ed the approach you took and was able to manually replicate it.
Day 10 Part 2…. I hate to report… is the first one I eventually had to turn to ChatGPT to for the entire solution. It required higher order math-combination logic that I am not at all familiar with. I first wrote logic that was able to correctly brute force the example data, but the real data took the number of combinations to ridiculous levels -- well beyond my PC's reasonable abilities. So it required algorithms that I know NOTHING about. I am VERY impressed that ChatGPT was able to first give a brute force method when I gave it the example data, and when I gave it one line from the real data, it went “woah there buddy, that’s not possible with brute force, so let me give you a mathematical algorithmic way” and it then gave me a solution which worked first try, and solves the full problem in 2.5 seconds. Hate that I had to turn to AI, but there was no way I was going to solve that.
#advent_of_code #advent_of_code_2025 #adventofcode #adventofcode2025
-
@kimvanwyk I have been having so much fun with Advent Of Code 2025 (https://adventofcode.com/2025) -- thanks for putting me on to that!
I'm done with Day 10 (so 20 puzzles). I was able to solve 18 completely on my own. I only used AI for lookup-type questions, e.g. easiest way to create a list comprehension that takes stringA and turns it into a list of sets. (silly made up example, just to illustrate what I used AI for -- i.e. no help with the design of the solution itself, only language specific help, not puzzle logic help.)
Day 7 Part 2: After a couple of days of frustration, I had to peek at your solution in GitHub, and immediately grok-ed the approach you took and was able to manually replicate it.
Day 10 Part 2…. I hate to report… is the first one I eventually had to turn to ChatGPT to for the entire solution. It required higher order math-combination logic that I am not at all familiar with. I first wrote logic that was able to correctly brute force the example data, but the real data took the number of combinations to ridiculous levels -- well beyond my PC's reasonable abilities. So it required algorithms that I know NOTHING about. I am VERY impressed that ChatGPT was able to first give a brute force method when I gave it the example data, and when I gave it one line from the real data, it went “woah there buddy, that’s not possible with brute force, so let me give you a mathematical algorithmic way” and it then gave me a solution which worked first try, and solves the full problem in 2.5 seconds. Hate that I had to turn to AI, but there was no way I was going to solve that.
#advent_of_code #advent_of_code_2025 #adventofcode #adventofcode2025
-
Finished up Day 11 of Advent of Code and it was definitely easier than Day 10. Nothing fancy and it's pretty fast. Did have to think about how to get part 2 solved, but it was more an implementation issue more than me just smashing keys and hoping a solution fell out.
Solution: https://git.jamesthebard.net/jweatherly/advent-of-code/src/branch/main/2025/11/solution.py
-
So, decided to keep on trucking on the Advent of Code problems. Day 10 was pain, but nothing a little bit of linear algebra couldn't fix after what can only be described as herculean searching on the web...thank you Scipy.
Solution: https://git.jamesthebard.net/jweatherly/advent-of-code/src/branch/main/2025/10/solution.py
-
I finished day 6 part 2 of #aoc2025. While I initially tried parsing forward through the lines of input, I eventually moved to parsing right to left. And again used reduce() to get the results of the problems.
-
I finished day 6 part 2 of #aoc2025. While I initially tried parsing forward through the lines of input, I eventually moved to parsing right to left. And again used reduce() to get the results of the problems.
-
I finished day 6 part 2 of #aoc2025. While I initially tried parsing forward through the lines of input, I eventually moved to parsing right to left. And again used reduce() to get the results of the problems.
-
I finished day 6 part 2 of #aoc2025. While I initially tried parsing forward through the lines of input, I eventually moved to parsing right to left. And again used reduce() to get the results of the problems.
-
I finished day 6 part 2 of #aoc2025. While I initially tried parsing forward through the lines of input, I eventually moved to parsing right to left. And again used reduce() to get the results of the problems.
-
I had fun applying reduce() to lists to solve day 6 part 1 of #aoc2025. I learned about reduce() while porting machine learning code to Linux on IBM Power many years back, but I've seldom used it.
-
I had fun applying reduce() to lists to solve day 6 part 1 of #aoc2025. I learned about reduce() while porting machine learning code to Linux on IBM Power many years back, but I've seldom used it.
-
I had fun applying reduce() to lists to solve day 6 part 1 of #aoc2025. I learned about reduce() while porting machine learning code to Linux on IBM Power many years back, but I've seldom used it.
-
I had fun applying reduce() to lists to solve day 6 part 1 of #aoc2025. I learned about reduce() while porting machine learning code to Linux on IBM Power many years back, but I've seldom used it.
-
I had fun applying reduce() to lists to solve day 6 part 1 of #aoc2025. I learned about reduce() while porting machine learning code to Linux on IBM Power many years back, but I've seldom used it.
-
I finished day 5 part 2 of #aoc2025. My first approach left me with overlapping ranges, so I had to revamp it. The working solution was much more elegant in addition to working!
-
I finished day 5 part 2 of #aoc2025. My first approach left me with overlapping ranges, so I had to revamp it. The working solution was much more elegant in addition to working!
-
I finished day 5 part 2 of #aoc2025. My first approach left me with overlapping ranges, so I had to revamp it. The working solution was much more elegant in addition to working!
-
I finished day 5 part 2 of #aoc2025. My first approach left me with overlapping ranges, so I had to revamp it. The working solution was much more elegant in addition to working!
-
I finished day 5 part 2 of #aoc2025. My first approach left me with overlapping ranges, so I had to revamp it. The working solution was much more elegant in addition to working!
-
Throughout this year's #AdventOfCode event, I've been working on a single-line #Python program that solves *every* 2025 puzzle. The result is a >2,600 character beast I call "The Brahminy".
https://github.com/WinslowJosiah/adventofcode/blob/main/solutions/2025/brahminy.py
-
CW: Advent of Code 2025 Day 12
For the last day of #AdventOfCode, I took a very simple and naive approach of: depth-first search.
Basically try all combinations until one fits. The trick to avoid a VERY long runtime is to filter out all cases where we already know from the start that the pieces (gifts) won't fit in the region, because their summed area exceeds the area of the region. Went for recursion this time around, because why not.
https://github.com/beeb/aoc-2025/blob/main/src/days/day12.rs
Overall, I really liked this year's puzzles. They weren't too hard which was refreshing compared to the last couple of years. I doubt many people really like those extremely hard to solve problems that take one day or more for anyone who isn't a genius (but I might be wrong). For me, it struck a nice balance and it felt rewarding enough to scratch my decembre puzzle itch! I also enjoyed the shorter run, I usually got quite burnt out by the end, especially with all the social functions towards the end of the month.
-
CW: Advent of Code Day 11
Day 11 of #AdventOfCode is a classical graph problem like we're used to from previous years.
Unlike previously, I immediately thought of checking what the graph looked like with a visualization tool. Luckily, `petgraph` allows to export a graphviz file which can be then used to visualize the nodes and edges.
From that, it was clear that a few nodes were acting as "bridges" between largers subnets of nodes with no particular arrangement besides being directed towards the next "bridge" layer. Those bridge layers comprised 4 to 5 nodes in my input, and were the only ones with more than 6 incoming edges, so I used that as my filter criterion.
To gather them, I sorted the graph in topological order and chunked them by their position offset compared to the previous node. When doing this, all the nodes from a bridge layer end up being at most 20 positions away from the previous node in the sorted list.
Finally, I progressed through each subnet, collecting information about how many paths lead to each one of the end layer's nodes. By multiplying with all the paths leading to each start layer's node, we get the overall total number of paths.
https://github.com/beeb/aoc-2025/blob/main/src/days/day11.rs
-
CW: Advent of Code Day 11
Day 11 of #AdventOfCode is a classical graph problem like we're used to from previous years.
Unlike previously, I immediately thought of checking what the graph looked like with a visualization tool. Luckily, `petgraph` allows to export a graphviz file which can be then used to visualize the nodes and edges.
From that, it was clear that a few nodes were acting as "bridges" between largers subnets of nodes with no particular arrangement besides being directed towards the next "bridge" layer. Those bridge layers comprised 4 to 5 nodes in my input, and were the only ones with more than 6 incoming edges, so I used that as my filter criterion.
To gather them, I sorted the graph in topological order and chunked them by their position offset compared to the previous node. When doing this, all the nodes from a bridge layer end up being at most 20 positions away from the previous node in the sorted list.
Finally, I progressed through each subnet, collecting information about how many paths lead to each one of the end layer's nodes. By multiplying with all the paths leading to each start layer's node, we get the overall total number of paths.
https://github.com/beeb/aoc-2025/blob/main/src/days/day11.rs
-
CW: Advent of Code Day 11
Day 11 of #AdventOfCode is a classical graph problem like we're used to from previous years.
Unlike previously, I immediately thought of checking what the graph looked like with a visualization tool. Luckily, `petgraph` allows to export a graphviz file which can be then used to visualize the nodes and edges.
From that, it was clear that a few nodes were acting as "bridges" between largers subnets of nodes with no particular arrangement besides being directed towards the next "bridge" layer. Those bridge layers comprised 4 to 5 nodes in my input, and were the only ones with more than 6 incoming edges, so I used that as my filter criterion.
To gather them, I sorted the graph in topological order and chunked them by their position offset compared to the previous node. When doing this, all the nodes from a bridge layer end up being at most 20 positions away from the previous node in the sorted list.
Finally, I progressed through each subnet, collecting information about how many paths lead to each one of the end layer's nodes. By multiplying with all the paths leading to each start layer's node, we get the overall total number of paths.
https://github.com/beeb/aoc-2025/blob/main/src/days/day11.rs
-
CW: Advent of Code Day 11
Day 11 of #AdventOfCode is a classical graph problem like we're used to from previous years.
Unlike previously, I immediately thought of checking what the graph looked like with a visualization tool. Luckily, `petgraph` allows to export a graphviz file which can be then used to visualize the nodes and edges.
From that, it was clear that a few nodes were acting as "bridges" between largers subnets of nodes with no particular arrangement besides being directed towards the next "bridge" layer. Those bridge layers comprised 4 to 5 nodes in my input, and were the only ones with more than 6 incoming edges, so I used that as my filter criterion.
To gather them, I sorted the graph in topological order and chunked them by their position offset compared to the previous node. When doing this, all the nodes from a bridge layer end up being at most 20 positions away from the previous node in the sorted list.
Finally, I progressed through each subnet, collecting information about how many paths lead to each one of the end layer's nodes. By multiplying with all the paths leading to each start layer's node, we get the overall total number of paths.
https://github.com/beeb/aoc-2025/blob/main/src/days/day11.rs
-
CW: Advent of Code Day 11
Day 11 of #AdventOfCode is a classical graph problem like we're used to from previous years.
Unlike previously, I immediately thought of checking what the graph looked like with a visualization tool. Luckily, `petgraph` allows to export a graphviz file which can be then used to visualize the nodes and edges.
From that, it was clear that a few nodes were acting as "bridges" between largers subnets of nodes with no particular arrangement besides being directed towards the next "bridge" layer. Those bridge layers comprised 4 to 5 nodes in my input, and were the only ones with more than 6 incoming edges, so I used that as my filter criterion.
To gather them, I sorted the graph in topological order and chunked them by their position offset compared to the previous node. When doing this, all the nodes from a bridge layer end up being at most 20 positions away from the previous node in the sorted list.
Finally, I progressed through each subnet, collecting information about how many paths lead to each one of the end layer's nodes. By multiplying with all the paths leading to each start layer's node, we get the overall total number of paths.
https://github.com/beeb/aoc-2025/blob/main/src/days/day11.rs
-
📝 Advent of Code 2025 Day 12: Christmas Tree Farm
Today, I was able to get by with only two very basic checks. Anticlimactic, but it was either that or some NP-complete solution.
-
📝 Advent of Code 2025 Day 11: Reactor
What a nice change of pace after Day 10! This is a nice application of recursion+caching (aka "dynamic programming").
-
CW: Advent of Code 2025 day 12 solution
I really didn't like this one. Basically have to do some bounds checking "it obviously always works" or "it obviously will never work" on it to get it to work on the actual input, but it still NEVER FINISHES on the example. I'm slightly bothered that the problem is more or less unsolvable as written, but I'm really bothered by the actual solution for the input not working on the example. That's not a fun puzzle, that feels like I'm being tricked, like the puzzle was a prank on me. Leaves a real sour taste, especially being the last puzzle of this year's AoC.
#AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day12 #Day12 #Rust #RustLang #Programming #CodingChallenges #AoC #AoC2025 #AoC2025Day12
-
📝 Advent of Code 2025 Day 10: Factory
This puzzle convinced me for a while that I'd need some linear algebra solver to tackle it. But luckily, I got wind of another approach from a helpful Reddit post...
-
#OpenGist is awesome! https://gist.ben.ie/ben/95c982c234ba4a5c9f840ac612bd5f90 << My day 1 solution for #adventofcode2025 written in C#
-
#AdventOfCode2025 was not the best year for #AdventOfCode. The puzzles were mostly simple except for one part two that was incredibly hard, and (perhaps because of the shorter format) we missed some of our favorites: no interpreters, no Chinese Remainder Theorem... is it even Christmas if I haven't poorly implemented a half-remembered CRT-based solution to elven mis-engineering? And of course there were only 12 of them, though I completely understand that putting together the full 25 was a huge time investment, and I'm quite grateful that it continued for 10 years at that pace. It's no mean feat.
My hope is that we'll see more and more of these sorts of puzzle sets appear. There already are some, and though I've not seen any of the quality of AoC's glory years, there are some interesting ones, and hopefully there will be more in the future across a wider variety of topics.
-
CW: Advent of Code 2025 Day 12 Spoilers
Today I spent a bunch of time preparing for a really hard problem that ended up being a very very simple problem.
My first thought on seeing this was, if we're being honest, "shit I hate bin packing." But such is life, so my second thought was "I wonder how many of these are just impossible?" That is, how many have too many filled squares for the dimension of the grid, and so would be impossible to fit in any configuration. So I wrote that code, and it eliminated about half.
Then I spent nearly an hour writing a recursive backtracking solver that was reasonably fast and I discovered that... all the puzzles that passed the first check passed. 😦
So I deleted all the junk, and kept my first "sanity check" solution.
https://codeberg.org/biesnecker/aoc-anyhow/src/branch/main/202512.py
-
CW: adventofcode (programming)
https://adventofcode.com/2025 is as enjoyable as ever. But since it's limited to 12 days this year (and I'm so grateful to @ericwastl for not dropping it altogether!) the complexity rose steeply for me on the second part of day 10. I have a nice recursive algorithm that works perfectly on the example, but is far too slow on the real data :-(
#adventofcode #adventofcode2025 -
I solved day 4 part 1 of #aoc2025. My algorithm to find neighbors was good, and my counting was good, but my result was too high. Eventually I figured it out
-
I finished day 3 part 2 of #AdventOfCode2025. I came up with a nice recursive solution with a little optimization.
-
CW: Advent of Code 2025 Day 11 Spoilers
After the last few days of difficult puzzles, today was a breath of fresh air.
Counting paths through a DAG is a classic memoizable recursive puzzle. Part 1 was just that.
Part 2 adds two new variables to track, but you just add them to the memoized parameters (Python's `@cache` operator makes that easy) and keep do the same thing, with the addition of updating the flags if you're on either the `dac` or `fft` nodes.
Easy peasy, runs almost instantly.
https://codeberg.org/biesnecker/aoc-anyhow/src/branch/main/202511.py
-
CW: Advent of Code 2025 Day 11 Spoilers
After the last few days of difficult puzzles, today was a breath of fresh air.
Counting paths through a DAG is a classic memoizable recursive puzzle. Part 1 was just that.
Part 2 adds two new variables to track, but you just add them to the memoized parameters (Python's `@cache` operator makes that easy) and keep do the same thing, with the addition of updating the flags if you're on either the `dac` or `fft` nodes.
Easy peasy, runs almost instantly.
https://codeberg.org/biesnecker/aoc-anyhow/src/branch/main/202511.py
-
CW: Advent of Code 2025 Day 11 Spoilers
After the last few days of difficult puzzles, today was a breath of fresh air.
Counting paths through a DAG is a classic memoizable recursive puzzle. Part 1 was just that.
Part 2 adds two new variables to track, but you just add them to the memoized parameters (Python's `@cache` operator makes that easy) and keep do the same thing, with the addition of updating the flags if you're on either the `dac` or `fft` nodes.
Easy peasy, runs almost instantly.
https://codeberg.org/biesnecker/aoc-anyhow/src/branch/main/202511.py
-
CW: Advent of Code 2025 Day 11 Spoilers
After the last few days of difficult puzzles, today was a breath of fresh air.
Counting paths through a DAG is a classic memoizable recursive puzzle. Part 1 was just that.
Part 2 adds two new variables to track, but you just add them to the memoized parameters (Python's `@cache` operator makes that easy) and keep do the same thing, with the addition of updating the flags if you're on either the `dac` or `fft` nodes.
Easy peasy, runs almost instantly.
https://codeberg.org/biesnecker/aoc-anyhow/src/branch/main/202511.py
-
CW: Advent of Code 2025 Day 11 Spoilers
After the last few days of difficult puzzles, today was a breath of fresh air.
Counting paths through a DAG is a classic memoizable recursive puzzle. Part 1 was just that.
Part 2 adds two new variables to track, but you just add them to the memoized parameters (Python's `@cache` operator makes that easy) and keep do the same thing, with the addition of updating the flags if you're on either the `dac` or `fft` nodes.
Easy peasy, runs almost instantly.
https://codeberg.org/biesnecker/aoc-anyhow/src/branch/main/202511.py
-
CW: Advent of Code 2025 Day 11 solution
Memoization actually worked for this one. My first instinct was to just crawl the graph with a memo, and it fortunately did the right thing. It was effectively an exhaustive depth-first search. Really not much to discuss.
My code is not nice or clean, but after yesterday's, I can't even be assed to clean it up or properly comment it. I barely gathered the gumption to pass errors up, and when I started writing it, I was just throwing
unwrap()everywhere.#AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day11 #Day11 #Rust #RustLang #Programming #CodingChallenges
-
CW: Advent of Code 2025 Day 10
Yes! Today's puzzle in #AdventOfCode was quite hard (especially part 2) but so rewarding and I learned a lot!
For part 1, I implemented A* from scratch, my favorite little pathfinding algo that I use pretty much every year for #AoC (sometimes I use a lib instead of implementing it but it's been a while so a refresher was in order).
For part 2, after trying A* again and noticing it was running for way too long, I went back to the drawing board and solved the first machine by hand. I noticed the constraints were a system of linear equations.
I then researched algorithms to solve such integer programming problems and didn't feel like learning AND implementing the algorithms in one day (ain't nobody got time fo that). But this lead me to discover the `good_lp` #rust crate which is really good and that I will keep in my back pocket from now on!
So I used the library to define a system of variables and constraints which could be solved magically for me.
https://github.com/beeb/aoc-2025/blob/main/src/days/day10.rs
-
CW: Advent of Code 2025 Day 10 Spoilers
Today I "cheated" and used scipy's MILP solver for Part 2. Discretion is the better part of valor, as they say, and writing a constraint solver by hand is not what I had planned for this Wednesday morning. The existence of `uv` to deal with all the dependencies makes reaching for scipy for even little scripts like this an easy choice.
Part 1 was trivial. Treat the lights and the buttons as bitmasks and recognize that buttons XOR themselves so they're pressed at most 1 time each. Generate the smallest combination of buttons that XOR to the target.
Part 2 is probably solvable via something like DFS before the heat death of the universe, but it would take way too long. Instead, I used scipy's integer linear programming solver, defined the constraints, objective, and bounds, and let it do its thing.
https://github.com/biesnecker/aoc-anyhow/blob/main/202510.py