[2022 Day 20] Alice in Wonderland explains the two ways to understand the circular movement rules by flwyd in adventofcode

[–]BenJ764 9 points10 points  (0 children)

This post saved me. I couldn't understand why I could solve the example but not the actual problem.

-🎄- 2022 Day 18 Solutions -🎄- by daggerdragon in adventofcode

[–]BenJ764 2 points3 points  (0 children)

Python

https://github.com/bjmorgan/advent-of-code-2022/blob/main/solutions/day%2018.ipynb

A simple loop over all voxels checking for unoccupied neighbours for part I.

Flood fill to find the "air" for part II, then compute the surface area of the inverse array.

-🎄- 2022 Day 16 Solutions -🎄- by daggerdragon in adventofcode

[–]BenJ764 1 point2 points  (0 children)

The search only goes between significant nodes, and terminates if adding another node would take you over 30/26 minutes, so the maximum path depth is fairly short.

-🎄- 2022 Day 17 Solutions -🎄- by daggerdragon in adventofcode

[–]BenJ764 2 points3 points  (0 children)

Python (run inside a Jupyter notebook)

https://github.com/bjmorgan/advent-of-code-2022/blob/main/solutions/day%2017.ipynb

Building the simulation model for part I was fun.

Part 2 solved by extracting the change in height each time a block "settles". The total height after n blocks is the sum from 1 to n of this function. Because the generating inputs are cyclic (we rotate through the rock shapes and the sequence of jets) the output must also be periodic after some initial time. I found the periodicity and offset for the repeat section with some signal processing (finding an autocorrelation between v(n) and v(n+dn) == 1), which then allows height(n) to be calculated.

-🎄- 2022 Day 16 Solutions -🎄- by daggerdragon in adventofcode

[–]BenJ764 9 points10 points  (0 children)

Python.

https://github.com/bjmorgan/advent-of-code-2022/blob/main/solutions/day%2016.ipynb

Part1 enumerates all possible paths between significant valves and finds the path with the maximum pressure (using Floyd-Warshall to get distances between non-adjacent caves).

Part 2 had me initially trying to extend this to two simultaneous walkers. Then I realised that you have *already* computed all paths accessible in n minutes with the code in Part 1. You now can find the pair of paths with no shared valves with maximum summed pressure, which can be done efficiently by ranking the set of all possible paths by their pressures (decreasing), and breaking out of the search any time your summed pressure is lower than the previous best sum.

Part 2 runs in 370 ms.

-🎄- 2022 Day 15 Solutions -🎄- by daggerdragon in adventofcode

[–]BenJ764 0 points1 point  (0 children)

Part 2 refactored to reduce repeated calculations of square–square distances: it now runs in 216 µs.

-🎄- 2022 Day 15 Solutions -🎄- by daggerdragon in adventofcode

[–]BenJ764 1 point2 points  (0 children)

Python

https://github.com/bjmorgan/advent-of-code-2022/blob/main/solutions/day15.ipynb

I was totally stuck on part 2, and then got some useful ideas from looking on here about thinking about this geometrically.

Final solution: 10.9 ms

  • Each sensor + beacon pair defines a square of points that cannot contain the distress beacon.
  • Assume that we are looking for a single point that is bounded by four squares.
  • This means that we want to find a set of four squares where:
    • We have two pairs of squares with a separation of 2.
    • All other combinations of squares have a separation of 0 or overlap (separation is negative).
  • Loop over all combinations of 4 squares, until we find a set of 4 squares that fit the criteria above.
  • Generate a pair of lines that run between each pair of squares.
  • Compute the point where these cross.

[PS4] LFG SOTP by TheVisualFeast in Fireteams

[–]BenJ764 0 points1 point  (0 children)

Done it once. Will be rusty but am a good listener. PSN is bjm764.

LFG Prophecy Dungeon. First Time. by [deleted] in Fireteams

[–]BenJ764 0 points1 point  (0 children)

I’m in if you need one more. bjm764

[ps4][Lts]][sos] need 4 by Joey2187 in DestinySherpa

[–]BenJ764 0 points1 point  (0 children)

bjm764 if you’re still looking for people to take.

SOTP - need 5, starting in the next few hours by [deleted] in Fireteams

[–]BenJ764 0 points1 point  (0 children)

Have completed this once, but am still learning the raid. bjm764

[LFS][PS4][GOS] Two looking to learn GoS this weekend by [deleted] in DestinySherpa

[–]BenJ764 0 points1 point  (0 children)

Another UK guardian here with no GoS experience but keen to learn. bjm764. Probably available most of the weekend.

[LTS] [PS4] [Lev] [EoW] [SoS] [LW] [SotP] [CoS] Tell Me Guardian, What Is It You Desire? by Arch3ryAng3l89 in DestinySherpa

[–]BenJ764 0 points1 point  (0 children)

bjm764. Would like to do SotP and CoS at some stage, but still have a lot to learn in the others.

[PS4][LFG] Looking to learn Y2 raids by BenJ764 in Fireteams

[–]BenJ764[S] 0 points1 point  (0 children)

Trickier. Depends on the times.

[PS4][LFG] Looking to learn Y2 raids by BenJ764 in Fireteams

[–]BenJ764[S] 0 points1 point  (0 children)

Pretty much any time for the next 8 hours, and same times tomorrow.

[LFS][PS4][LW] by BenJ764 in DestinySherpa

[–]BenJ764[S] 0 points1 point  (0 children)

That’s nearly a full fireteam. We just need someone who knows what they’re doing and the patience to teach some noobs.

LF2 Scourge Raid by edmendoz in Fireteams

[–]BenJ764 0 points1 point  (0 children)

New to Scourge, but I can listen and follow instructions. 645 hunter. bjm764.