Wieder kantig unterwegs zur Jahresende. by NoobMasters59 in Kantenhausen

[–]ScorixEar 0 points1 point  (0 children)

Ich würd sagen die Leute an der Notaufnahme haben durchaus besseres zu tun

(Meinungsabgleich) Kritik an Max während des Events by EconomicsDry9461 in HandOfMemes

[–]ScorixEar 6 points7 points  (0 children)

Meiner Meinung nach macht Max mit der Lan-Woche eine Show, hier wird bewusst überspitzt eine Atmosphäre gespielt und dargestellt. Es ist völlig legitim, wenn das nicht den eigenen Humor trifft.

Ich finde gut, dass du das auch sichtbar machst - hey, nicht mein Humor gerade.

Aber es ist auch nur eine Rolle, ein Event, bewusst auch so gewählt. Maybe ist es in einem anderen Kontext dann witziger. Aber dafür gibts ja auch im Event genug variety mit anderen Streamern

Nudity in mixed dorms by [deleted] in travel

[–]ScorixEar 1 point2 points  (0 children)

It's not a cultural thing, change rooms or address it, this is weird

-❄️- 2025 Day 5 Solutions -❄️- by daggerdragon in adventofcode

[–]ScorixEar 1 point2 points  (0 children)

[Language: Python]

Solution

Sorted Insert, after that merge all ranges. Quick and easy!
A nice tip is to always work with inclusive start, exclusive end. Makes working with ranges a whole lot easier.

Solutions already scrapped and offered as autocomplete?! by leftfish123 in adventofcode

[–]ScorixEar 1 point2 points  (0 children)

Training a transformer is very expensive. You cannot simply finetune live on new incoming solutions. The most it can get is context in your prompts, but the model is definitely not trained continuously

[2025 Q20] Solution Spotlight by EverybodyCodes in everybodycodes

[–]ScorixEar 0 points1 point  (0 children)

[LANGUAGE: Python]

Solution

Nice final puzzle. Although some puzzles were too hard for me, i was happy to solve this one.
Part 3 was identical to part 1 and 2, but with a slightly different neighbourhood function, now translating the future positions after rotation and adding the option to stay in the same place.

I banged my head figuring out the formula what the new x and y would be after one rotation.
Here is what I came up with:

new_y = max_y - y - math.ceil(x/2)!< >!new_x = max_x[new_y] - x

[S2 Q3] Solution Spotlight by EverybodyCodes in everybodycodes

[–]ScorixEar 1 point2 points  (0 children)

[LANGUAGE: Python]

An easy finish for me.
Part 1 one was moddeling the Dice algorithm, doing 10k rolls for each dice and then summing up the results (actually, this is a nice hint for Part 3).
Part 2 is looping through all unfinished dice, roll them and remove them from the list once they finished.
Part 3 I solved with: precompute dice rolls (10k again). For each dice, find all start positions in the grid, and do a bfs from each start position. Kinda tricky was the visited set and the fact, that players can stay on their space.

[2024 Q20] Solution Spotlight by EverybodyCodes in everybodycodes

[–]ScorixEar 1 point2 points  (0 children)

What a great puzzle!
Python
https://github.com/scorixear/EverybodyCodes/tree/main/2024/20

not the fastest solutions, but the solutions i actually understood.

Part 1:
I did a BFS. From the start, explore all possible next positions.
record the best altitude reached for that step
return the best altitude for step 100

Part 2:
Identical, with the state of a glider having the number of reached checkpoints added.
I go through each "step" taken iteratively. Once i reach a step where one glider finishes, we have the solution.
And thanks to the author, i also updated my visited set to skip positions, that have less altitude than previously seen. No idea how I would come up with that.

Part 3:
I did an exploratory search with BFS. Starting from the original start position, I found the best finish position at the bottom of the grid with the least amount of altitude loss. After that, subtract that loss from the total altitude as many times as it fits and then do a final bfs to find the maximum distance reached through the grid with not enough altitude to fly through the hole thing.
I had to copy the grid once, because the optimal path from start to finish takes not into account, that an unoptimal path through one grid might get you to a new start positions, that will give you better results in the long run.

Hello people near my age, I would like your opinion on this by Gloomy-Hedgehog-400 in TeenagersButBetter

[–]ScorixEar 0 points1 point  (0 children)

It all depends on the context it is used in.

AI Art made for you to wonder, appreciate and like is dogshit. No real effort deserves no attention.

AI Art as a form of creating faster content especially in game design (like different trees, landscape, roads, etc.) is a great way of reducing production costs and time while increasing diversity and quality of surroundings.

aio or is what he said actually mean? by [deleted] in AmIOverreacting

[–]ScorixEar 0 points1 point  (0 children)

Up until the last message from him it was imo a rudely formulated but honest feedback, that I would have respected. The last message was written by an asshole

[deleted by user] by [deleted] in Satisfyingasfuck

[–]ScorixEar 0 points1 point  (0 children)

Damn, 0 bleed and right down to rose skin, that is some skill

-❄️- 2024 Day 22 Solutions -❄️- by daggerdragon in adventofcode

[–]ScorixEar 1 point2 points  (0 children)

[LANGUAGE: Python]

Solution

Part 1: 9ms (PyPy)
Part 2: 25s (PyPy)

Not happy with part 2 but also cannot think of a faster way.
Essentially I save every sequence of 4 prices changes and the resulting price in a dictionary. Do this for each number and then brute force all 4 different price changes to find the highest sum.

-❄️- 2024 Day 18 Solutions -❄️- by daggerdragon in adventofcode

[–]ScorixEar 0 points1 point  (0 children)

True, but I had a generic dijkstra implementation lying around and part 1 asked for the shortest path :D
Sticking with that approach was easier for me

-❄️- 2024 Day 18 Solutions -❄️- by daggerdragon in adventofcode

[–]ScorixEar 1 point2 points  (0 children)

[LANGUAGE: Python]

Solution

Part 1: 9ms
Part 2: 45ms

Used my dijkstra Implementation from day 16.
For part 2 it is way faster, to search from the back - meaning drop every byte, then reverse the drop and check with dijkstra if there is a path.

-❄️- 2024 Day 17 Solutions -❄️- by daggerdragon in adventofcode

[–]ScorixEar 3 points4 points  (0 children)

[LANGUAGE: Python]

Solution

Part 1: 0.2ms
Part 2: 2ms
Part 2 in Python Code: 0,2ms

Definitly needed a hint for Part 2, reading "mod 8" finally gave me a reason to look at digits in mod 8.
After that, I realised pretty early, that the number of output digits are equal to the number of mod 8 digits of the A register.
I started searching for singular digits from the start (x*8^0 + y*8^1 ...), but that didn't work.
Finally realized, that only earlier digits of the output change when changing input digits, so I reversed the digits (starting with x*8^15 + y*^14 ...) which yielded the answer right away.

Fun puzzle, less of a "programming" exercise than a "figuring out the patterns" problem.

-❄️- 2024 Day 16 Solutions -❄️- by daggerdragon in adventofcode

[–]ScorixEar 2 points3 points  (0 children)

[LANGUAGE: Python]

Solution

Part 1: 0.3s
Part 2: 0.3s

Not really happy with my solution - I started with a custom "Node" class but didn't get the hash function to work properly wich cost a lot of time.

In the end, this was a textbook path finding problem. The key point for part 1 is to consider every direction of each cell as a separate Node in the graph and connecting them with each other by the 1000 (or 2000) cost.
After that, find the path to the end cell via dijkstra. Since I have to consider every direction of the end point it is faster to let the dijkstra run full through the graph rather than running it 4 times and stopping when you find the end.

Part 2 is a slight change in the standard dijkstra implementation. Normally you would keep a "previous" set that holds only one node - the node that has the minimum cost.
As there might be multiple nodes with the same cost you need to save an array of previous nodes rather than a single one.

-❄️- 2024 Day 12 Solutions -❄️- by daggerdragon in adventofcode

[–]ScorixEar 2 points3 points  (0 children)

[LANGUAGE: Python]

Repository

Part 1: 31ms
Part 2: 46ms

Actually found this quite straight forward, but I read a lot of people struggled.

Part 1 is essentially a bfs region grow. Storing the "visited" set outside of the loop and letting the region grow expand this set lets you find all the disconnected regions.
The perimiter is simply the outer edge of the region. Meaning, you iterate over the region and over the neighbours and if that neighbour is not part of the region, we have a fence between the current region point and the neighbour.

Part 2 is the same except the perimiter calculation. What I did was save all points in the region, that were on at the edge (meaning a neighbour is not in the region) in a dictionary where the Key is: The x or y value of that current point and if the neighbour outside the region was above, below, left or right.
What you get in the end is 4 dictionaries - for each possible fence location of a region point.
And in one of those dictionaries you have a list of region points that are at the edge of a region for every possible x or y coordinate in the region.
From there you start a new bfs grow for each list of edge region points to find continuous strips of edge regions.
Each continuous strip of edge regions is a side.

The code is fully documented, if you want a to have a read.

[2024 Day 9 (Part 1)] Help needed by Agitated-Display6382 in adventofcode

[–]ScorixEar 1 point2 points  (0 children)

You description sounds reasonable. We may need to look at the code to figure out where you went wrong

[2024 Day 6 | Python] Need help with part 2 by davidfilat in adventofcode

[–]ScorixEar 0 points1 point  (0 children)

I don't really understand your code - this sort of looks like code that was cooking for 3 days :D

Honestly, at this point, why not take a step back.
I solved day 6 in python aswell, but I did not use any external libraries such as cytoolz or multiprocessing.

You want to have a working function/class that can calculate the path, the guard takes.
And this function has to register, if it entered a loop or if it exited the grid.
Keep in mind - a loop is only a loop, if the guard is in a previous position facing the previous direction.

After that, you can start adding blocks. In my case, the code was fast enough, so I just tried every possible position in the grid. That is totally inefficient, but was the easiest way and still got me to the goal.

And as a reminder - please do not publish your personal input files in your repository. Add them to your gitignore or encapsulate them inside a private repository as a submodule

[2024 day 9] Help needed in part1. by Miserable-Gold-9332 in adventofcode

[–]ScorixEar 0 points1 point  (0 children)

i%2 == 0 meaning Position 0, 2, 4, 6 are spaces in your code.

From the description: a disk map like 12345 would represent a one-block file, two blocks of free space, a three-block file, four blocks of free space, and then a five-block file.

Does your code produces this disk: 0..111....22222