2021 / Day 23

Amphipod

Read the original puzzle on adventofcode.com ↗

The solution

C11

solution.c

1#include "aoc.h"
2
3/* The local input is 66 bytes, 5 lines, longest line 13. The burrow has four
4 * rooms of depth two; part 2 inserts the story's two extra rows. DEPTH = 4
5 * bounds states encoded exactly in base five. A* uses unavoidable hallway
6 * travel plus distinct home depths as a lower bound. Clean home moves are
7 * forced because they never obstruct another amphipod. STATES = 262144 (at most
8 * 196608 occupied hash slots) and EXPANSIONS = 200000 bound the search. */
9
10static slice line(slice s, size_t *p) {
11    size_t b = *p;
12    while (*p < s.l && s.p[*p] != '\n') {
13        (*p)++;
14    }
15    size_t e = *p;
16    if (*p < s.l) {
17        (*p)++;
18    }
19    if (e > b && s.p[e - 1] == '\r') {
20        e--;
21    }
22    return (slice){s.p + b, e - b};
23}
24
25static int32_t equal(slice s, const char *t) {
26    return s.l == strlen(t) && memcmp(s.p, t, s.l) == 0;
27}
28
29static int32_t abs32(int32_t x) {
30    return x < 0 ? -x : x;
31}
32
33enum {
34    DEPTH = 4,
35    PLACES = 11 + 4 * DEPTH,
36    STATES = 262144,
37    OCCUPIED = 196608,
38    EXPANSIONS = 200000
39};
40
41static uint64_t keys[STATES];
42static int32_t cost[STATES], score[STATES], position[STATES], heap[STATES];
43static int32_t used, hn, depth, expanded;
44static uint64_t target;
45static const int32_t doors[4] = {2, 4, 6, 8}, energy[5] = {0, 1, 10, 100, 1000},
46                     stops[7] = {0, 1, 3, 5, 7, 9, 10};
47
48static uint64_t encode(const uint8_t *a) {
49    uint64_t k = 0;
50    for (int32_t i = 11 + 4 * depth - 1; i >= 0; i--) {
51        k = k * 5 + a[i];
52    }
53    return k;
54}
55
56static void decode(uint64_t k, uint8_t *a) {
57    for (int32_t i = 0; i < 11 + 4 * depth; i++) {
58        a[i] = (uint8_t)(k % 5);
59        k /= 5;
60    }
61}
62
63static int32_t settled(const uint8_t *a, int32_t r, int32_t d) {
64    for (int32_t j = d; j < depth; j++) {
65        if (a[11 + r * depth + j] != r + 1) {
66            return 0;
67        }
68    }
69    return 1;
70}
71
72static inline __attribute__((always_inline)) int32_t estimate_room_cost(
73    const uint8_t *a, int32_t h, int32_t remaining[4], int32_t r) {
74    for (int32_t d = 0; d < depth; d++) {
75        int32_t v = a[11 + r * depth + d];
76        if (v && !settled(a, r, d)) {
77            h += (d + 1 + abs32(doors[r] - doors[v - 1]) + 1) * energy[v];
78            remaining[v - 1]++;
79        }
80    }
81
82    return h;
83}
84
85static int32_t heuristic(const uint8_t *a) {
86    int32_t h = 0, remaining[4] = {0};
87    for (int32_t i = 0; i < 11; i++) {
88        if (a[i]) {
89            int32_t r = a[i] - 1;
90            h += (abs32(i - doors[r]) + 1) * energy[a[i]];
91            remaining[r]++;
92        }
93    }
94    for (int32_t r = 0; r < 4; r++) {
95        h = estimate_room_cost(a, h, remaining, r);
96    }
97    for (int32_t r = 0; r < 4; r++) {
98        h += remaining[r] * (remaining[r] - 1) / 2 * energy[r + 1];
99    }
100    return h;
101}
102
103static void swap_heap(int32_t a, int32_t b) {
104    int32_t v = heap[a];
105    heap[a] = heap[b];
106    heap[b] = v;
107    position[heap[a]] = a;
108    position[heap[b]] = b;
109}
110
111static void offer(const uint8_t *a, int32_t g) {
112    uint64_t k = encode(a), mix = k;
113    mix ^= mix >> 33;
114    mix *= UINT64_C(0xff51afd7ed558ccd);
115    mix ^= mix >> 33;
116    uint32_t h = (uint32_t)mix & (STATES - 1);
117    while (keys[h] && keys[h] != k) {
118        h = (h + 1) & (STATES - 1);
119    }
120    if (keys[h]) {
121        if (g >= cost[h]) {
122            return;
123        }
124    } else {
125        aoc_assert(++used <= OCCUPIED, "amphipod search exceeds 196608 states");
126        keys[h] = k;
127        position[h] = -1;
128    }
129    cost[h] = g;
130    score[h] = g + heuristic(a);
131    int32_t p = position[h];
132    if (p < 0) {
133        aoc_assert(hn < STATES, "amphipod queue full");
134        p = hn++;
135        heap[p] = (int32_t)h;
136        position[h] = p;
137    }
138    while (p > 0) {
139        int32_t parent = (p - 1) / 2;
140        if (score[heap[parent]] <= score[heap[p]]) {
141            break;
142        }
143        swap_heap(parent, p);
144        p = parent;
145    }
146}
147
148static int32_t pop(void) {
149    int32_t v = heap[0];
150    position[v] = -1;
151    hn--;
152    if (hn) {
153        heap[0] = heap[hn];
154        position[heap[0]] = 0;
155        int32_t p = 0;
156        while (2 * p + 1 < hn) {
157            int32_t c = 2 * p + 1;
158            if (c + 1 < hn && score[heap[c + 1]] < score[heap[c]]) {
159                c++;
160            }
161            if (score[heap[p]] <= score[heap[c]]) {
162                break;
163            }
164            swap_heap(p, c);
165            p = c;
166        }
167    }
168    return v;
169}
170
171static int32_t clear(const uint8_t *a, int32_t from, int32_t to) {
172    int32_t step = to > from ? 1 : -1;
173    for (int32_t x = from + step;; x += step) {
174        if (a[x]) {
175            return 0;
176        }
177        if (x == to) {
178            return 1;
179        }
180    }
181}
182
183static int32_t home(const uint8_t *a, int32_t type) {
184    int32_t r = type - 1, slot = -1;
185    for (int32_t d = 0; d < depth; d++) {
186        int32_t v = a[11 + r * depth + d];
187        if (v && v != type) {
188            return -1;
189        }
190        if (!v) {
191            slot = d;
192        }
193    }
194    return slot;
195}
196
197static void move(uint8_t *a, int32_t from, int32_t to, int32_t distance,
198                 int32_t g) {
199    int32_t v = a[from];
200    a[from] = 0;
201    a[to] = (uint8_t)v;
202    offer(a, g + distance * energy[v]);
203    a[to] = 0;
204    a[from] = (uint8_t)v;
205}
206
207static inline __attribute__((always_inline)) void
208read_amphipod_row(slice l, uint8_t rows[DEPTH][4], int32_t nr) {
209    for (int32_t r = 0; r < 4; r++) {
210        uint8_t c = l.p[3 + 2 * r];
211        aoc_assert(c == '.' || (c >= 'A' && c <= 'D'), "bad room occupant");
212        rows[nr][r] = c == '.' ? 0 : (uint8_t)(c - 'A' + 1);
213    }
214}
215
216static inline __attribute__((always_inline)) int32_t
217move_hallway_amphipods_home(uint8_t a[PLACES], int32_t g, int32_t forced) {
218    for (int32_t x = 0; x < 11; x++) {
219        if (!a[x]) {
220            continue;
221        }
222        int32_t r = a[x] - 1, d = home(a, a[x]);
223        if (d >= 0 && clear(a, x, doors[r])) {
224            move(a, x, 11 + r * depth + d, abs32(x - doors[r]) + d + 1, g);
225            forced = 1;
226            break;
227        }
228    }
229
230    return forced;
231}
232
233static inline __attribute__((always_inline)) int32_t
234find_top_room_occupant(uint8_t a[PLACES], int32_t r, int32_t d) {
235    while (d < depth && !a[11 + r * depth + d]) {
236        d++;
237    }
238
239    return d;
240}
241
242static inline __attribute__((always_inline)) int32_t
243move_room_amphipods_home(uint8_t a[PLACES], int32_t g, int32_t forced) {
244    for (int32_t r = 0; r < 4; r++) {
245        int32_t d = 0;
246        d = find_top_room_occupant(a, r, d);
247        if (d == depth || settled(a, r, d)) {
248            continue;
249        }
250        int32_t from = 11 + r * depth + d, type = a[from], rr = type - 1,
251                dd = home(a, type);
252        if (rr != r && dd >= 0 && clear(a, doors[r], doors[rr])) {
253            move(a, from, 11 + rr * depth + dd,
254                 d + 1 + abs32(doors[r] - doors[rr]) + dd + 1, g);
255            forced = 1;
256            break;
257        }
258    }
259
260    return forced;
261}
262
263static inline __attribute__((always_inline)) int32_t
264find_departing_room_occupant(uint8_t a[PLACES], int32_t r, int32_t d) {
265    while (d < depth && !a[11 + r * depth + d]) {
266        d++;
267    }
268
269    return d;
270}
271
272static inline __attribute__((always_inline)) void
273try_hallway_stops(uint8_t a[PLACES], int32_t g, int32_t r, int32_t d) {
274    for (int32_t i = 0; i < 7; i++) {
275        int32_t x = stops[i];
276        if (clear(a, doors[r], x)) {
277            move(a, 11 + r * depth + d, x, d + 1 + abs32(x - doors[r]), g);
278        }
279    }
280}
281
282static inline __attribute__((always_inline)) void
283move_room_amphipods_to_hallway(uint8_t a[PLACES], int32_t g) {
284    for (int32_t r = 0; r < 4; r++) {
285        int32_t d = 0;
286        d = find_departing_room_occupant(a, r, d);
287        if (d == depth || settled(a, r, d)) {
288            continue;
289        }
290        try_hallway_stops(a, g, r, d);
291    }
292}
293
294static slice solve(slice s, int32_t part) {
295    size_t p = 0;
296    slice l = line(s, &p);
297    aoc_assert(equal(l, "#############"), "bad burrow roof");
298    l = line(s, &p);
299    aoc_assert(l.l == 13 && l.p[0] == '#' && l.p[12] == '#', "bad hallway");
300    uint8_t a[PLACES] = {0}, rows[DEPTH][4];
301    for (int32_t x = 0; x < 11; x++) {
302        aoc_assert(l.p[x + 1] == '.' ||
303                       (l.p[x + 1] >= 'A' && l.p[x + 1] <= 'D'),
304                   "bad hallway occupant");
305        a[x] = l.p[x + 1] == '.' ? 0 : (uint8_t)(l.p[x + 1] - 'A' + 1);
306    }
307    int32_t nr = 0;
308    while (p < s.l) {
309        l = line(s, &p);
310        if (equal(l, "  #########")) {
311            break;
312        }
313        aoc_assert(nr < DEPTH && l.l > 9, "bad room row");
314        read_amphipod_row(l, rows, nr);
315        nr++;
316    }
317    aoc_assert(p == s.l && (nr == 2 || nr == DEPTH),
318               "burrow must have depth two or four");
319    if (part == 2 && nr == 2) {
320        memcpy(rows[3], rows[1], 4);
321        const uint8_t extra[2][4] = {{4, 3, 2, 1}, {4, 2, 1, 3}};
322        memcpy(rows[1], extra, sizeof extra);
323        nr = DEPTH;
324    }
325    depth = nr;
326    int32_t counts[5] = {0};
327    for (int32_t i = 0; i < 11; i++) {
328        counts[a[i]]++;
329    }
330    for (int32_t r = 0; r < 4; r++) {
331        int32_t occupied = 0;
332        for (int32_t d = 0; d < depth; d++) {
333            a[11 + r * depth + d] = rows[d][r];
334            counts[rows[d][r]]++;
335            aoc_assert(!occupied || rows[d][r],
336                       "room has an empty space below an occupant");
337            occupied |= rows[d][r] != 0;
338        }
339        aoc_assert(!a[doors[r]], "amphipod cannot stop in a doorway");
340    }
341    for (int32_t v = 1; v <= 4; v++) {
342        aoc_assert(counts[v] == depth, "wrong amphipod population");
343    }
344    uint8_t goal[PLACES] = {0};
345    for (int32_t r = 0; r < 4; r++) {
346        for (int32_t d = 0; d < depth; d++) {
347            goal[11 + r * depth + d] = (uint8_t)(r + 1);
348        }
349    }
350    target = encode(goal);
351    memset(keys, 0, sizeof keys);
352    used = hn = expanded = 0;
353    offer(a, 0);
354    while (hn) {
355        int32_t slot = pop(), g = cost[slot];
356        if (keys[slot] == target) {
357            return slice_from_i64(g);
358        }
359        aoc_assert(++expanded <= EXPANSIONS,
360                   "amphipod search exceeds 200000 expansions");
361        decode(keys[slot], a);
362        int32_t forced = 0;
363        forced = move_hallway_amphipods_home(a, g, forced);
364        if (forced) {
365            continue;
366        }
367        forced = move_room_amphipods_home(a, g, forced);
368        if (forced) {
369            continue;
370        }
371        move_room_amphipods_to_hallway(a, g);
372    }
373    aoc_assert(0, "amphipod burrow has no solution");
374}
375
376slice part1(slice s) {
377    return solve(s, 1);
378}
379
380slice part2(slice s) {
381    return solve(s, 2);
382}
383
384const struct aoc_method aoc_methods[] = {{0, 0}};

aoc.h

1#ifndef AOC_H
2#define AOC_H
3
4#include <stdarg.h>
5#include <stddef.h>
6#include <stdint.h>
7#include <stdlib.h>
8#include <string.h>
9
10/* The only required boundary between infra and a solution.
11 * `input` is read-only and is not owned by the solution.
12 * The returned slice is allocated with malloc. It is the only
13 * block still live when the function returns. Infra copies it
14 * and then frees it.
15 */
16typedef struct {
17    uint8_t *p;
18    size_t l;
19} slice;
20
21/* p is null and l is 0. Infra uses this when a run has no output. */
22static const slice empty_slice = {0};
23
24typedef slice (*aoc_fn)(slice);
25
26/* One named method. The name is a C identifier, at most 31
27 * characters, and it is the URL suffix: /YYYY/D/P/<name>.
28 * estimate and span are examples, not a fixed list. A day
29 * exports as many as it wants. The array ends with {0, 0}.
30 * part1 and part2 are not entries in this list.
31 */
32struct aoc_method {
33    const char *name;
34    aoc_fn fn;
35};
36
37slice part1(slice input);
38slice part2(slice input);
39
40extern const struct aoc_method aoc_methods[];
41
42/* Provided by the runtime. Records msg and returns. */
43void aoc_fail(const char *msg);
44
45/* Stops the run when cond is false and reports msg. */
46_Noreturn void aoc_assert_fail(const char *msg);
47#ifndef aoc_assert
48#define aoc_assert(cond, msg) \
49    do { \
50        if (!(cond)) { \
51            aoc_assert_fail(msg); \
52        } \
53    } while (0)
54#endif
55
56/* Decimal text of a uint64_t is at most 20 digits. A sign and a
57 * little spare fit here. Size a number buffer from this.
58 */
59enum { AOC_I64_TEXT = 32 };
60
61/* Decimal digits of v. No sign. d has room for 20 digits. */
62static inline char *aoc_u64_text(char *d, uint64_t v) {
63    char tmp[AOC_I64_TEXT];
64    char *end = tmp + AOC_I64_TEXT;
65    char *p = end;
66    size_t n;
67    do {
68        *--p = (char)('0' + (v % 10ull));
69        v /= 10ull;
70    } while (v);
71    n = (size_t)(end - p);
72    memcpy(d, p, n);
73    return d + n;
74}
75
76/* Decimal digits of v. The minimum int64_t is not negated. */
77static inline char *aoc_i64_text(char *d, int64_t v) {
78    uint64_t u;
79    if (v < 0) {
80        *d++ = '-';
81        u = (uint64_t)(-(v + 1)) + 1ull;
82    } else {
83        u = (uint64_t)v;
84    }
85    return aoc_u64_text(d, u);
86}
87
88/* n values, one space between them. The author knows the order. */
89static inline char *aoc_u64s(char *d, const uint64_t *v, size_t n) {
90    size_t i;
91    for (i = 0; i < n; i++) {
92        if (i) {
93            *d++ = ' ';
94        }
95        d = aoc_u64_text(d, v[i]);
96    }
97    return d;
98}
99
100static inline char *aoc_i64s(char *d, const int64_t *v, size_t n) {
101    size_t i;
102    for (i = 0; i < n; i++) {
103        if (i) {
104            *d++ = ' ';
105        }
106        d = aoc_i64_text(d, v[i]);
107    }
108    return d;
109}
110
111static inline char *aoc_ints(char *d, const int *v, size_t n) {
112    size_t i;
113    for (i = 0; i < n; i++) {
114        if (i) {
115            *d++ = ' ';
116        }
117        d = aoc_i64_text(d, (int64_t)v[i]);
118    }
119    return d;
120}
121
122/* Write fmt at buf. Return the cursor for the next call.
123 * %d takes int. %i takes int64_t. %u takes uint64_t.
124 * %s takes a C string. %% is a percent sign.
125 * A literal run is memcpy.
126 * %D takes (int *, size_t). %I takes (int64_t *, size_t).
127 * %U takes (uint64_t *, size_t). One space between values.
128 */
129static inline char *aoc_vprintf(const char *fmt, char *buf, va_list ap) {
130    while (*fmt) {
131        const char *lit = fmt;
132        size_t n;
133        while (*fmt && *fmt != '%') {
134            fmt++;
135        }
136        n = (size_t)(fmt - lit);
137        if (n) {
138            memcpy(buf, lit, n);
139            buf += n;
140        }
141        if (*fmt != '%') {
142            break;
143        }
144        fmt++;
145        if (*fmt == '%') {
146            *buf++ = '%';
147            fmt++;
148            continue;
149        }
150        if (*fmt == 's') {
151            const char *s = va_arg(ap, const char *);
152            n = strlen(s);
153            if (n) {
154                memcpy(buf, s, n);
155                buf += n;
156            }
157            fmt++;
158            continue;
159        }
160        if (*fmt == 'd') {
161            buf = aoc_i64_text(buf, (int64_t)va_arg(ap, int));
162            fmt++;
163            continue;
164        }
165        if (*fmt == 'i') {
166            buf = aoc_i64_text(buf, va_arg(ap, int64_t));
167            fmt++;
168            continue;
169        }
170        if (*fmt == 'u') {
171            buf = aoc_u64_text(buf, va_arg(ap, uint64_t));
172            fmt++;
173            continue;
174        }
175        if (*fmt == 'D') {
176            const int *v = va_arg(ap, int *);
177            buf = aoc_ints(buf, v, va_arg(ap, size_t));
178            fmt++;
179            continue;
180        }
181        if (*fmt == 'I') {
182            const int64_t *v = va_arg(ap, int64_t *);
183            buf = aoc_i64s(buf, v, va_arg(ap, size_t));
184            fmt++;
185            continue;
186        }
187        if (*fmt == 'U') {
188            const uint64_t *v = va_arg(ap, uint64_t *);
189            buf = aoc_u64s(buf, v, va_arg(ap, size_t));
190            fmt++;
191            continue;
192        }
193        aoc_assert(0, "bad format");
194    }
195    return buf;
196}
197
198static inline char *aoc_printf(const char *fmt, char *buf, ...) {
199    va_list ap;
200    va_start(ap, buf);
201    buf = aoc_vprintf(fmt, buf, ap);
202    va_end(ap);
203    return buf;
204}
205
206/* Copy n bytes of text into a malloc'd slice. */
207static inline slice slice_from_text(const char *s, size_t n) {
208    uint8_t *p = malloc(n);
209    aoc_assert(p, "out of memory");
210    if (n) {
211        memcpy(p, s, n);
212    }
213    return (slice){p, n};
214}
215
216/* Decimal text of v, allocated at AOC_I64_TEXT. The minimum
217 * int64_t is not negated. slice.l is the bytes written.
218 */
219static inline slice slice_from_i64(int64_t v) {
220    char tmp[AOC_I64_TEXT];
221    char *d;
222    uint8_t *p;
223    size_t n;
224    d = aoc_printf("%i", tmp, v);
225    n = (size_t)(d - tmp);
226    p = malloc(AOC_I64_TEXT);
227    aoc_assert(p, "out of memory");
228    memcpy(p, tmp, n);
229    return (slice){p, n};
230}
231
232/* Parse one decimal slice into *out. A leading '-' is allowed.
233 * Returns 1 on success, 0 for invalid text or int64_t overflow.
234 */
235static inline int slice_to_i64(slice s, int64_t *out) {
236    size_t i = 0;
237    int neg = 0;
238    uint64_t u = 0;
239    if (!s.p || s.l == 0 || !out) {
240        return 0;
241    }
242    if (s.p[0] == '-') {
243        neg = 1;
244        i = 1;
245        if (s.l == 1) {
246            return 0;
247        }
248    }
249    for (; i < s.l; i++) {
250        uint8_t c = s.p[i];
251        if (c < '0' || c > '9') {
252            return 0;
253        }
254        uint64_t digit = (uint64_t)(c - '0');
255        uint64_t limit = (uint64_t)INT64_MAX + (uint64_t)neg;
256        if (u > (limit - digit) / 10u) {
257            return 0;
258        }
259        u = u * 10u + digit;
260    }
261    if (neg) {
262        *out = u == (uint64_t)INT64_MAX + 1u ? INT64_MIN : -(int64_t)u;
263    } else {
264        *out = (int64_t)u;
265    }
266    return 1;
267}
268
269#endif

The aha moment

Eight amphipods, four rooms, eleven hallway positions. This looks small enough to solve by shuffling pieces on paper. Then a cheap move parks someone in the only useful passage, and an expensive D has to make another trip. The price of a move depends on what it prevents later. A locally attractive choice is not yet a strategy.

Read the movement rules as search restrictions. Only seven hallway positions are legal stopping places. A hallway occupant cannot shuffle sideways to make room; its next stop must be home. Only the top occupied position of a room can leave. Moving between two legal stopping places is one decision, so there is no reason to search each intermediate footstep separately. Generate those complete moves and charge distance times the type's energy, from 1 through 1,000.

Even the small burrow has over sixteen million possible population arrangements if we ignore room gaps and reachability. Enumerating move sequences is worse because many sequences reach the same arrangement. Keep the cheapest energy used to reach each arrangement. If another route arrives there more expensively, every continuation is still available from the cheaper route, so we can discard the expensive arrival. Amphipods of the same type are interchangeable; naming them individually would create distinctions the puzzle does not care about.

This is a weighted shortest-path problem. Breadth-first search would minimize the number of moves, but one extra A step costs a thousand times less than one D step. Dijkstra's algorithm instead expands the least accumulated energy. It gives a sound baseline before we try to be clever.

Some cleverness is provably safe. An amphipod in its own room with only its own type below it can stay forever. When a clear path leads into a home containing no wrong types, move the amphipod to the deepest empty position. That move clears its old space and occupies a space nobody of another type may use. It cannot spoil a future route. If two identical amphipods want that room, their eventual total entry depths are unchanged by exchanging their order. We can take an available home move immediately instead of exploring every possible postponement.

For the remaining choices, estimate the energy that cannot be avoided. Ignore all traffic. Each unsettled amphipod must leave its current room if necessary, travel horizontally to its home door, and enter. For k remaining amphipods of one type, the entry depths must fill k different positions. Counting just one entry step each misses another 0 + 1 + ... + (k - 1) steps. Add those, multiplied by that type's energy. An amphipod above a wrong occupant must leave even if its own letter matches the room.

This estimate deliberately ignores blocking and some detours, so it never exceeds the true remaining cost. Expand the arrangement with the smallest cost-so-far plus this lower bound: that is A*. We are using a heuristic to choose what to investigate first while retaining an exact answer. On the local part-one layout, a measured search with the home-move reduction expands about 42,800 arrangements under Dijkstra and only 1,700 under A*. The initial lower bound is 13,112 energy; the eventual optimum is 13,336. Here the estimate is remarkably informative.

Then Eric unfolds the diagram. The inserted rows double the population and deepen every room. The same relaxed estimate is less decisive: measured expansions are about 103,600 for Dijkstra and 102,700 for A*. That is useful evidence too. A good heuristic need not be miraculous on every input. Merging repeated arrangements and restricting moves already keep this larger search practical; neither an unproved greedy rule nor a new algorithm is necessary.

The implementation supports room depths two and four, inserts the prescribed rows for part two when needed, and validates populations, doorways, and room occupancy. A base-five encoding stores the complete arrangement exactly. Search is bounded to 196,608 distinct states and 200,000 expansions. Exceeding a bound is reported explicitly; a promising arrangement is never mistaken for a proven minimum.

See also

Categories for 2015–2024 adapted from u/Boojum’s 500 Stars: A Categorization and Mega-Guide ↗. A day can belong to several categories. Tags from 2025 onward are our additions.

Try your input

One POST, one reply. Your input is not saved.