Expand description
§Lobby Layout
Hex grid parsing and navigation uses Axial Coordinates exactly as described in the excellent Red Blob Games blog.
Part two uses exactly the same approach as day 17 and most of the code is identical.
As the black tiles are very sparse (about 8% for my input) it’s faster to switch from a “pull” model where we check the surrounding neighbors of each tile, to a “push” model where we update the neighbors of each black tile instead.
The SIMD alternative approach is much faster, processing 32 lanes at a time. As a further
optimization we skip rows and columns that the active state hasn’t reached. The approach
is very similar to day 11.
Modules§
- scalar 🔒