home.social

#aoc2022 — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #aoc2022, aggregated by home.social.

  1. So, I’m trying to solve the #AoC2022 problems in Python so I’m sort of “prepared” for $newJob and it’s been tough, I feel dumb. 😅

  2. @akastwit 그쵸 제가 제일 놀란 건 #AoC2022 25일간 매일 다른 언어로 푸신 분. 절반 이상이 써 본 적도 없었던 언어래요

    github.com/andreu-vall/advent-

  3. of done in : gitlab.com/Taywee/adventofcode

    Parsing SNAFU was pretty simple, but building it was harder. It's been a long time since I worked in number bases, and the negative digits really threw me for a loop. I ended up needing to get some help to figure out the proper way of building my SNAFU numbers, and I think it'll probably still be broken for negatives.

    First AoC completion! :partyparrot:

  4. #AoC2022 설문 조사 결과

    jeroenheijmans.github.io/adven

    새로운 언어를 배우려고 참가했다는 사람들이 사분의 일이나 되네. 난 쓰던 언어로도 간신히 풀고 있는데, 대단하신 분들… 그래도 #neovim 쓰는 걸 익혔으니 만족해. 이제 생산성이 VS Code 쓰던 때랑 비슷하게 나오는 것 같아

  5. of done in : gitlab.com/Taywee/adventofcode

    Done just in time. I went with a pretty straightforward A*, but because the accessible tiles change with time, I had each node be the tile's position as well as the entire field state at that point in time. The pathfinding crate is very powerful: docs.rs/pathfinding/latest/pat

    Still took about 10 seconds. I could probably optimize it a lot, but it's done.

    Part 2 was just doing it 3 times.

  6. I was doing #AoC2022 but stopped on day 12 because ultimately I realised I wasn't actually having fun doing it and had made it into a self-imposed obligation. I don't need to prove anything to myself or anyone and life has scarce enough free time for fun as it is without me forcing myself to burn even more of it on something I don't even want to do anymore. Feel so much better that I realised I'm allowed to stop doing things I don't enjoy anymore.

  7. of done in : gitlab.com/Taywee/adventofcode

    Not a hard one. Part 2 takes over a full second to run, which could be improved a lot, but this was way nicer than day 22.

  8. of done in : gitlab.com/Taywee/adventofcode

    Part 1 was super easy.

    Part 2 was so hard I gave up and hardcoded the cube shape. 14 match cases, and it works on multiple input sizes but not on different shapes. I wanted to actually walk and find the next position, or to fold the cube and link them in a mesh of Rc<RefCell<_>>, but I already put too many hours into this and the idea of keeping track of orientation sounded like a pain.

  9. of done in : gitlab.com/Taywee/adventofcode

    Part 1 was straightforward: just build a tree and execute it.

    I had a solution in mind for part 2 of solving the side of the root tree that I knew, then recursively running down the other side until I get to humn with a solution, but I decided to cheat and just used an equation solver library instead.

  10. of done in : gitlab.com/Taywee/adventofcode

    This one was shockingly easy, even part 2. The toughest part was trying to figure out a way to keep track of what order to move the numbers in, particularly when there are duplicates. I gave up and just attached the original index to them and scanned each time. Far from perfect, but it got the job done without too much trouble.

  11. of done in : gitlab.com/Taywee/adventofcode

    Really similar to the elephants and valves one. Just a DFS for the maximum with some optimizations to reduce the search space. Interestingly enough, it runs in 0.33 seconds on my actual input, but takes 15 seconds on the example, which is different from a lot of problems that take way longer on the real input. I think it's because the smaller costs on the example balloon the search space.

  12. of done in : gitlab.com/Taywee/adventofcode

    Quick and easy one. For part one, just ran from the min to max for all axes in turn, incrementing each time a pair had one droplet and one air voxel. Part 2 was the same, but also with a pathfinding check between the air voxel and a known outside voxel.

    Got sick of implementing my own coordinate types and just pulled in nalgebra.

  13. of done in : gitlab.com/Taywee/adventofcode

    Another very difficult one. Once it occurred to me that there would be probable cycles in the tower, I came upon a solution. It's not the nicest, but it's not too bad either. Some pessimistic input could probably still get the wrong answer, too.

  14. Day 9 was a pain in the neck mostly because I tried a little too much code reuse from part #1 Still 8 days back.

    #AdventOfCode #AdventOfCode2022 #aoc2022 #aoc

    github.com/JamieB226/aoc2022

  15. of done in : gitlab.com/Taywee/adventofcode

    Oh my god. This problem was challenging and my code is hideous and full of redundancies. I'm not cleaning it up. I'm lucky I finished it at all.

    I built my graph by calculating the shortest path between all non-zero valves and then discarding zeros. Then I just traversed with an inexact heuristic.

    Part 2 was harder, having to track two routes at the same time. It was an absolute headache.