Advent of Code 2024 - Day 15

Greetings, Erlang explorers! :wave: Ukrainian Erlanger here! :metal: Today, we’re diving into a logistics challenge with lanternfish warehouses and rogue robots. It’s our task to predict the robot’s movements, track the boxes it pushes around, and calculate the sum of their GPS coordinates. :articulated_lorry::robot:

The challenge:

  • Simulate the robot’s movements across the warehouse grid.
  • Handle box-pushing logic while respecting boundaries (walls and other boxes).
  • Calculate the final GPS coordinates of all boxes after the robot completes its moves.

:bulb: Tips for solving Day 15:

  1. Parse the Input: Convert the warehouse map and robot’s moves into usable data structures (e.g., maps or matrices).
  2. Simulate Movement: For each move, determine how the robot and affected boxes change position. Use a loop or recursion for efficiency.
  3. Account for Constraints: Ensure the robot or boxes don’t move outside the warehouse or into walls.
  4. Calculate GPS Coordinates: For each box, determine its final position and compute the GPS coordinates.
  5. Sum It Up: Add up all GPS coordinates to get the solution.

:sparkles: Challenge Motivation:
A calculated push in the right direction solves even the toughest logistical puzzles!

Let’s solve this challenge together and share your insights, solutions, and debugging stories below. Every approach adds to the collective wisdom of this amazing community. :rocket:

Happy coding, and may your robot moves always find a clear path! :christmas_tree::computer: