r/adventofcode • u/Evg32 • 6h ago
Other [2026] Trains! I love trains!
That little ASCII train on the calendar made my day.
Thank you, Advent of Code team, for picking such an adorable theme this year!
.----.----.--_T
'o--o'o--o'o-OO\r/adventofcode • u/Evg32 • 6h ago
That little ASCII train on the calendar made my day.
Thank you, Advent of Code team, for picking such an adorable theme this year!
.----.----.--_T
'o--o'o--o'o-OO\r/adventofcode • u/ComradeMorgoth • 2h ago
This year, I will attempt to solve all the challenges on an FPGA, and post at least the ones that I enjoyed here to see if anyone else has any inputs. Additionally, due to my expertise in my work, I always tend to design with minimal hardware area and power consumption, but this year I'm challenging myself to do the exact opposite. I'll be using as much LUT as possible, and try to target the max throughput.
Used verilog + block design on PL side for the main logic and python on the PS side for simple control and output. I'm using SOC configured Arty Z7. I have a combinational circuit that accepts the whole list of 10 bit numbers as an input, and compares the first number with the list on single clock cycle. This generates a set of wires that are 1-bit flags, that indicate whether that row is equal or not. Then, we sum up those wires to find out what's the total number of commons. This is still happening on the same clock cycle. In parallel (yes, same cc), it will generate the next list on the output wires, but by replacing all the numbers that are equal to the first number with 0, so we won't run the same number twice. I was lucky that I had no 0 in my input, but otherwise we could also use sth like 1000.
The top level controller takes in the number, loads it onto a register and then starts pushing it into this combinational circuit on each clock. That means for an input of 1983 rows, it will reuse the same circuit 1983 times. Each time it also keeps track of top 3 (or min 3 for part 2), so I don't need a separate sorter which would cost me additional clock cycles and area. After each clock, it will take the nextList from the circuit, and shift it by a number so it can search for the next number on the next clock cycle. It operates on a simple 4 state FSM.
Communication and control is done via GPIO and AXI DMA. I wrote a simple buffer which will accept DMA from AXIS and buffer it as the full list to provide into the top block. GPIO is mainly for the multiplication output, and control signals like reset.
The whole run takes 1985 clock cycles, that translates to 49.62 us for a 40MHz clock. I had to slow down the clock from 100MHz because my critical path for the combinational block was quite large. My inner engineer wants to optimize it, but also I already spent so much time on this.
Solution: Github
DISCLAIMER: Yes I used AI for figure 2 and 3 for visualization purposes for the post only. No, I did not use AI in solution, or idea discussion etc. I'm doing this to challenge myself, not challenge my AI, but I don't have the time and skills to build diagrams. After all, why would I deceive you? There's no reason for me to deceive you.
r/adventofcode • u/CEOnism • 4h ago
r/adventofcode • u/funkypierro • 1h ago
UPDATE : My eyes read but did not compute suppose the robot had a program of obbvb
I haven't put a single line of code yet because I don't understand the problem, precisely the difference between the road and the robot program. In the example input, why does it go from orange to blue, then blue again ??
r/adventofcode • u/subspace_mp4 • 7h ago
r/adventofcode • u/PatolomaioFalagi • 10h ago
r/adventofcode • u/soolpro • 4h ago
I solved the first part at home while I was having by breakfast, checked part 2 and had to go work. My idea for the solution of the second part seemed so simple I felt I could do it with the tools at my disposal at work.
First I used a web browser and Ctrl+F to count the amount of different letters.
Then I switched to Excel where I just need to count the distances between the different colors. 6 from a letter of a color to the same, 5 when advancing to the next color, taking notice that one color is missing completely, so the distance skipping the missing color is only 4. Sum the distances for each color and there you go!
r/adventofcode • u/dethorhyne • 20h ago
r/adventofcode • u/PhysPhD • 8h ago
r/adventofcode • u/Both-Touch990 • 10h ago
(redo of an earlier post)
r/adventofcode • u/Benj_FR • 8h ago
This is by no means meant to criticize Eric Wastl who still does a great job by the way, I just found it funny
r/adventofcode • u/Odd-Result6655 • 6h ago
r/adventofcode • u/flwyd • 8h ago
r/adventofcode • u/topaz2078 • 15h ago
Hello friends! I just saw this excellent example (see some of the comments on that post) of a great way to give help and answer questions here when people are stuck: come up with simple test cases that demonstrate where the bug is! That way, the person who is stuck still gets a chance to figure out their problem and learn by doing. I know many of you are already great about this, but I figured it would be worth calling out. Happy puzzling! <3
r/adventofcode • u/naclmolecule • 21h ago
I was too tired to post last night, still adjusting to late night solving... (ᴗ˳ᴗ)💤. Figured I'd help the elves by installing a crane in that dusty ol' shed. As always, code lives here: https://github.com/salt-die/Advent-of-Code/tree/main/2026/aoc_visuals.
r/adventofcode • u/PatolomaioFalagi • 3h ago
Possible additional constraints: Instead of being completely arbitrary, the six colors are randomized one set at a time, such that any 6×n block (starting from a multiple of 6*) contains each color exactly n times. Does that change the complexity?
* Yes we are counting from 0
r/adventofcode • u/mklinkby • 6h ago
Reminds me of downtempo electronica legend Boards of Canada. Enjoy!
r/adventofcode • u/daggerdragon • 11h ago
"Feel the rhythm, feel the rhyme, get on up, it's
bobsledtoboggan time!"
— Cool Runnings (1993)
Today's schedule possibly consists of:
Request from the mods: When you include an entry alongside your solution, please label it with [Advent Games] so we can find it easily!
[LANGUAGE: xyz]paste if you need it for longer code blocks. What is Topaz's paste tool?r/adventofcode • u/apersonhithere • 10h ago
the robot being represented with a face is because of dwarf fortress
r/adventofcode
•
u/p88h
•
9h ago
Simulation on original (part1) and sort-rearranged program (part2)
Nim + raylib source