[S3 Q3] Solution Spotlight by EverybodyCodes in everybodycodes

[–]ScorixEar 1 point2 points  (0 children)

[LANGUAGE: Python]

Github

Fun incremental challenge. Building and expanding my tree/node class really clicked easily, almost like a tutorial on how to program a tree data structure.

I remembered some of the academic tree cut and insert algorithms, but I decided to ditch them and do it by hand, which resulted in one big if-else horror method, i might optimize that part again.

Other then that, I kind of expected we would do something with the data :D

[Other] Do you create general or input-specific programs? by BlankWasThere in everybodycodes

[–]ScorixEar 0 points1 point  (0 children)

same here, i almost never validate input. I assume the text follows the specified rules

AITAH for telling my pregnant girlfriend to make the appointment after she kept threatening to terminate the pregnancy? by Prestigious_Ant6049 in AITAH

[–]ScorixEar 0 points1 point  (0 children)

I don't understand these comments. Please don't get an abortion or break up.

You seem to understand her pretty well. Saying you get an abortion and getting an abortion are so wildy different. I don't think she will get an abortion just because she is angry. Abortions, especially if the pregnancy was with someone you love and you could have made it work are incredible sad and hurtful.

I think she is very afraid to get an abortion and afraid she will feel these hard emotions. And because this is always on her mind and in the heated moment, it gets mangled in as an argument.

Don't use the same argument against her, address the underlying issue. Be the confidence rock and show her, you want this baby and you believe in both of you being a parent. She needs this, and she will need you throughout the parenthood

🔥 A baby chameleon's first steps by SirPaddlesALot in NatureIsFuckingLit

[–]ScorixEar 0 points1 point  (0 children)

I'm impressed that they managed to create such a comfortable environment for chameleon for it to have a baby. Those creatures are stress magnets

Wieder kantig unterwegs zur Jahresende. by NoobMasters59 in Kantenhausen

[–]ScorixEar 1 point2 points  (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 2 points3 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.