|
| 1 | +> As I was completing Day 11, I took a lot of notes. Rather than throw all |
| 2 | +> of these away, I'm saving these here into one large file. Who knows |
| 3 | +> what they mean exactly, but this kind of shows some of my thought process. |
| 4 | + |
| 5 | + The first floor contains a silver generator and a silver-compatible microchip. |
| 6 | + The second floor contains a cobalt generator, a hydrogren generator, a ruthenium generator, and a plutonium generator. |
| 7 | + The third floor contains a cobalt-compatible microchip, a hydrogren-compatible microchip, a ruthenium-compatible microchip, and a plutonium-compatible microchip. |
| 8 | + The fourth floor contains nothing relevant. |
| 9 | + |
| 10 | +0 - |
| 11 | +F4 . . . . . |
| 12 | +F3 . . . LG . |
| 13 | +F2 . . . . . |
| 14 | +F1 E SG SM . . . . . . |
| 15 | + |
| 16 | + 0 - 0; |1,1| |0,4| |4,0| |0,0| |
| 17 | + 1 - 1; |0,0| |1,5| |4,0| |0,0| |
| 18 | + 2 - 2; |0,0| |0,5| |5,0| |0,0| |
| 19 | + 3 - 3; |0,0| |0,5| |3,0| |2,0| |
| 20 | + 4 - 2; |0,0| |0,5| |4,0| |1,0| |
| 21 | + 5 - 3; |0,0| |0,5| |2,0| |3,0| |
| 22 | + 6 - 2; |0,0| |0,5| |3,0| |2,0| |
| 23 | + 7 - 1; |0,0| |1,5| |2,0| |2,0| |
| 24 | + 8 - 2; |0,0| |1,3| |2,2| |2,0| |
| 25 | + 9 - 1; |0,0| |2,3| |1,2| |2,0| |
| 26 | +10 - 2; |0,0| |1,2| |2,3| |2,0| |
| 27 | +11 - 1; |0,0| |2,2| |1,3| |2,0| |
| 28 | +12 - 2; |0,0| |1,1| |2,4| |2,0| |
| 29 | +13 - 1; |0,0| |1,2| |2,3| |2,0| |
| 30 | +14 - 2; |0,0| |1,0| |2,5| |2,0| |
| 31 | +15 - 3; |0,0| |1,0| |2,3| |2,2| |
| 32 | +16 - 2; |0,0| |1,0| |3,3| |1,2| |
| 33 | +17 - 3; |0,0| |1,0| |2,2| |2,3| |
| 34 | +18 - 2; |0,0| |1,0| |2,3| |2,2| |
| 35 | +19 - 3; |0,0| |1,0| |1,2| |3,3| |
| 36 | +20 - 2; |0,0| |1,0| |2,2| |2,3| |
| 37 | +21 - 3; |0,0| |1,0| |1,1| |3,4| |
| 38 | +22 - 2; |0,0| |1,0| |1,2| |3,3| |
| 39 | +23 - 3; |0,0| |1,0| |0,1| |4,4| |
| 40 | +24 - 2; |0,0| |1,0| |1,1| |3,4| |
| 41 | +25 - 3; |0,0| |1,0| |0,0| |4,5| |
| 42 | +26 - 2; |0,0| |1,0| |1,0| |3,5| |
| 43 | +27 - 1; |0,0| |2,0| |0,0| |3,5| |
| 44 | +28 - 2; |0,0| |0,0| |2,0| |3,5| |
| 45 | +29 - 3; |0,0| |0,0| |0,0| |5,5| |
| 46 | + |
| 47 | + |
| 48 | +-------------------------------------------------------------------------------- |
| 49 | + |
| 50 | + |
| 51 | +0; 2,0; 0,1; 0,1; 0,0 |
| 52 | +1; 1,0; 1,1; 0,1; 0,0 |
| 53 | +2; 1,0; 0,0; 1,2; 0,0 |
| 54 | +1; 1,0; 1,0; 0,2; 0,0 |
| 55 | +0; 2,0; 0,0; 0,2; 0,0 |
| 56 | +1; 0,0; 2,0; 0,2; 0,0 |
| 57 | +2; 0,0; 0,0; 2,2; 0,0 |
| 58 | +3; 0,0; 0,0; 0,2; 2,0 |
| 59 | +2; 0,0; 0,0; 1,2; 1,0 |
| 60 | +3; 0,0; 0,0; 1,0; 1,2 |
| 61 | +2; 0,0; 0,0; 2,0; 0,2 |
| 62 | +3; 0,0; 0,0; 0,0; 2,2 |
| 63 | + |
| 64 | +12 states, **11** moves (initial state doesn't count as a move) |
| 65 | + |
| 66 | + |
| 67 | +10 branches from each state: |
| 68 | +1 chip, 1 gen, 2 chips, 2 gens, 1 chip and 1 gen * 2 directions (up or down) |
| 69 | + |
| 70 | +1st move: |
| 71 | +1 chip up - 1; 1,0; 1,1; 0,1; 0,0 |
| 72 | +2 chip up - 1; 0,0; 2,1; 0,1; 0,0 # Invalid state (2 > 1) |
| 73 | + |
| 74 | +So, set of possible moves is [1; 1,0; 1,1; 0,1; 0,0] |
| 75 | +Create a node for each move, and connect from [0; 2,0; 0,1; 0,1; 0,0] to each node |
| 76 | +Add each node to our visited table |
| 77 | + |
| 78 | +Visted = { |
| 79 | + 0; 2,0; 0,1; 0,1; 0,0 # connectedTo [1; 1,0; 1,1; 0,1; 0,0] |
| 80 | + 1; 1,0; 1,1; 0,1; 0,0 |
| 81 | +}; |
| 82 | + |
| 83 | +2nd move: |
| 84 | +Loop through previous queue (just one item) and build possibilities from there |
| 85 | + |
| 86 | +1 chip up - 2; 1,0; 0,1; 1,1; 0,0 |
| 87 | +1 chip dn - 0; 2,0; 0,1; 0,1; 0,0 # Pruned, already seen |
| 88 | +1 gen up - 2; 1,0; 1,0; 0,2; 0,0 |
| 89 | +1 gen dn - 0; 1,1; 1,0; 0,1; 0,0 |
| 90 | +2 c+g up - 2; 1,0; 0,0; 1,2; 0,0 |
| 91 | +2 c+g dn - 0; 2,1; 0,0; 0,1; 0,0 # Invalid |
| 92 | + |
| 93 | +Create four new nodes, and connect [1; 1,0; 1,1; 0,1; 0,0] to all of them |
| 94 | +Add each node to our visited table |
| 95 | +Visted = { |
| 96 | + A - 0; 2,0; 0,1; 0,1; 0,0 # connectedTo [B] |
| 97 | + B - 1; 1,0; 1,1; 0,1; 0,0 # connectedTo [C, D, E, F, G] |
| 98 | + C - 2; 1,0; 0,1; 1,1; 0,0 |
| 99 | + D - 2; 1,0; 1,0; 0,2; 0,0 |
| 100 | + E - 0; 1,1; 1,0; 0,1; 0,0 |
| 101 | + F - 2; 1,0; 0,0; 1,2; 0,0 |
| 102 | + G - 0; 2,1; 0,0; 0,1; 0,0 |
| 103 | +}; |
| 104 | + |
| 105 | +3rd move: |
| 106 | +Loop through [C, D, E, F, G] and build possibilities from there |
| 107 | + |
| 108 | +C (2; 1,0; 0,1; 1,1; 0,0): |
| 109 | +1 chip up - H - 3; 1,0; 0,1; 0,1; 1,0 |
| 110 | +1 chip dn - _ - 1; 1,0; 1,1; 0,1; 0,0 # Pruned, seen before |
| 111 | +1 gen up - I - 3; 1,0; 0,1; 1,0; 0,1 |
| 112 | +1 gen dn - J - 1; 1,0; 0,2; 1,0; 0,0 |
| 113 | +2 c+g up - K - 3; 1,0; 0,1; 0,0; 1,1 |
| 114 | +2 c+g dn - L - 1; 1,0; 1,2; 0,0; 0,0 |
| 115 | + |
| 116 | +Creating 5 new nodes (H, I, J, K, L) and connect from C |
| 117 | +Add to queue [D, E, F, H, I, J, K, L] |
| 118 | +and add to visited |
| 119 | + |
| 120 | +Visted = { |
| 121 | + A - 0; 2,0; 0,1; 0,1; 0,0 # connectedTo [B] |
| 122 | + B - 1; 1,0; 1,1; 0,1; 0,0 # connectedTo [C, D, E, F] |
| 123 | + C - 2; 1,0; 0,1; 1,1; 0,0 # connectedTo [H, I, J, K, L] |
| 124 | + D - 2; 1,0; 1,0; 0,2; 0,0 |
| 125 | + E - 0; 1,1; 1,0; 0,1; 0,0 |
| 126 | + F - 2; 1,0; 0,0; 1,2; 0,0 |
| 127 | + G - 0; 2,1; 0,0; 0,1; 0,0 |
| 128 | + H - 3; 1,0; 0,1; 0,1; 1,0 |
| 129 | + I - 3; 1,0; 0,1; 1,0; 0,1 |
| 130 | + J - 1; 1,0; 0,2; 1,0; 0,0 |
| 131 | + K - 3; 1,0; 0,1; 0,0; 1,1 |
| 132 | + L - 1; 1,0; 1,2; 0,0; 0,0 |
| 133 | +}; |
| 134 | + |
| 135 | +D (2; 1,0; 1,0; 0,2; 0,0): |
| 136 | + |
| 137 | +1 gen up - M - 3; 1,0; 1,0; 0,1; 0,1 |
| 138 | +1 gen dn - _ - 1; 1,0; 1,1; 0,1; 0,0 # Seen (B) |
| 139 | +2 gen up - N - 3; 1,0; 1,0; 0,0; 0,2 |
| 140 | +2 gen dn - _ - 1; 1,0; 1,2; 0,0; 0,0 # Seen (L) |
| 141 | + |
| 142 | +Create 2 new nodes (M, N) and connect from D |
| 143 | +Add to queue [E, F, H, I, J, K, L, M, N] |
| 144 | +and add to visited |
| 145 | + |
| 146 | +Visted = { |
| 147 | + A - 0; 2,0; 0,1; 0,1; 0,0 # connectedTo [B] |
| 148 | + B - 1; 1,0; 1,1; 0,1; 0,0 # connectedTo [C, D, E, F] |
| 149 | + C - 2; 1,0; 0,1; 1,1; 0,0 # connectedTo [H, I, J, K, L] |
| 150 | + D - 2; 1,0; 1,0; 0,2; 0,0 # connectedTo [M, N] |
| 151 | + E - 0; 1,1; 1,0; 0,1; 0,0 |
| 152 | + F - 2; 1,0; 0,0; 1,2; 0,0 |
| 153 | + G - 0; 2,1; 0,0; 0,1; 0,0 |
| 154 | + H - 3; 1,0; 0,1; 0,1; 1,0 |
| 155 | + I - 3; 1,0; 0,1; 1,0; 0,1 |
| 156 | + J - 1; 1,0; 0,2; 1,0; 0,0 |
| 157 | + K - 3; 1,0; 0,1; 0,0; 1,1 |
| 158 | + L - 1; 1,0; 1,2; 0,0; 0,0 |
| 159 | + M - 3; 1,0; 1,0; 0,1; 0,1 |
| 160 | + N - 3; 1,0; 1,0; 0,0; 0,2 |
| 161 | +}; |
| 162 | + |
| 163 | +E (0; 1,1; 1,0; 0,1; 0,0): |
| 164 | +1 chip up - O - 1; 0,1; 2,0; 0,1; 0,0 |
| 165 | +1 gen up - _ - 1; 1,0; 1,1; 0,1; 0,0 # Seen (B) |
| 166 | +2 c+g up - _ - 1; 0,0; 2,1; 0,1; 0,0 # Invalid, more chips than gens |
| 167 | + |
| 168 | +Create 1 new node (O) and connect from E |
| 169 | +Add to queue [F, G, H, I, J, K, L, M, N, O] |
| 170 | +and add to visited |
| 171 | + |
| 172 | +Visted = { |
| 173 | + A - 0; 2,0; 0,1; 0,1; 0,0 # connectedTo [B] |
| 174 | + B - 1; 1,0; 1,1; 0,1; 0,0 # connectedTo [C, D, E, F] |
| 175 | + C - 2; 1,0; 0,1; 1,1; 0,0 # connectedTo [H, I, J, K, L] |
| 176 | + D - 2; 1,0; 1,0; 0,2; 0,0 # connectedTo [M, N] |
| 177 | + E - 0; 1,1; 1,0; 0,1; 0,0 # connectedTo [O] |
| 178 | + F - 2; 1,0; 0,0; 1,2; 0,0 |
| 179 | + G - 0; 2,1; 0,0; 0,1; 0,0 |
| 180 | + H - 3; 1,0; 0,1; 0,1; 1,0 |
| 181 | + I - 3; 1,0; 0,1; 1,0; 0,1 |
| 182 | + J - 1; 1,0; 0,2; 1,0; 0,0 |
| 183 | + K - 3; 1,0; 0,1; 0,0; 1,1 |
| 184 | + L - 1; 1,0; 1,2; 0,0; 0,0 |
| 185 | + M - 3; 1,0; 1,0; 0,1; 0,1 |
| 186 | + N - 3; 1,0; 1,0; 0,0; 0,2 |
| 187 | + O - 1; 0,1; 2,0; 0,1; 0,0 |
| 188 | +}; |
| 189 | + |
| 190 | +F (2; 1,0; 0,0; 1,2; 0,0): |
| 191 | + |
| 192 | +1 chip up - P - 3; 1,0; 0,0; 0,2; 1,0 |
| 193 | +1 chip dn - Q - 1; 1,0; 1,0; 0,2; 0,0 # Have seen the state, but elevator was at different floor. So elevator position does matter? |
| 194 | +1 gen up - R - 3; 1,0; 0,0; 1,1; 0,1 |
| 195 | +1 gen dn - S - 1; 1,0; 0,1; 1,1; 0,0 |
| 196 | +2 gen up - T - 3; 1,0; 0,0; 1,0; 0,2 |
| 197 | +2 gen dn - _ - 1; 1,0; 0,2; 1,0; 0,0 # Seen (J) |
| 198 | +2 c+g up - U - 3; 1,0; 0,0; 0,1; 1,1 |
| 199 | +2 c+g dn - _ - 1; 1,0; 1,1; 0,1; 0,0 # Seen (B) |
| 200 | + |
| 201 | +Create 6 new nodes (P, Q, R, S, T, U) and connect from E |
| 202 | +Add to queue [H, I, J, K, L, M, N, O] |
| 203 | +and add to visited |
| 204 | + |
| 205 | + |
| 206 | +-------------------------------------------------------------------------------- |
| 207 | + |
| 208 | + |
| 209 | +# Somehow incorrect |
| 210 | + 0 - 0;2,0,0,1,0,1,0,0 |
| 211 | + 1 - 1;1,0,1,1,0,1,0,0 |
| 212 | + 2 - 2;1,0,0,0,1,2,0,0 |
| 213 | + 3 - 3;1,0,0,0,0,1,1,1 |
| 214 | + 4 - 2;1,0,0,0,0,2,1,0 |
| 215 | + 5 - 1;1,0,0,1,0,1,1,0 |
| 216 | + 6 - 0;1,1,0,0,0,1,1,0 |
| 217 | + 7 - 1;0,0,1,1,0,1,1,0 |
| 218 | + 8 - 2;0,0,0,0,1,2,1,0 |
| 219 | + |
| 220 | +0 - |
| 221 | +F4 . . . . . |
| 222 | +F3 . . . LG . |
| 223 | +F2 . HG . . . |
| 224 | +F1 E . HM . LM |
| 225 | + |
| 226 | +1 - |
| 227 | +F4 . . . . . |
| 228 | +F3 . . . LG . |
| 229 | +F2 E HG HM . . |
| 230 | +F1 . . . . LM |
| 231 | + |
| 232 | +2 - |
| 233 | +F4 . . . . . |
| 234 | +F3 E HG HM LG . |
| 235 | +F2 . . . . . |
| 236 | +F1 . . . . LM |
| 237 | + |
| 238 | +3 - |
| 239 | +F4 E HG HM . . |
| 240 | +F3 . . . LG . |
| 241 | +F2 . . . . . |
| 242 | +F1 . . . . LM |
| 243 | + |
| 244 | +4 - |
| 245 | +F4 . . HM . . |
| 246 | +F3 E HG . LG . |
| 247 | +F2 . . . . . |
| 248 | +F1 . . . . LM |
| 249 | + |
| 250 | +5 - |
| 251 | +F4 . . HM . . |
| 252 | +F3 . HG . . . |
| 253 | +F2 E . . LG . |
| 254 | +F1 . . . . LM |
| 255 | + |
| 256 | +6 - |
| 257 | +F4 . . HM . . |
| 258 | +F3 . HG . . . |
| 259 | +F2 . . . . . |
| 260 | +F1 E . . LG LM |
| 261 | + |
| 262 | +7 - |
| 263 | +F4 . . HM . . |
| 264 | +F3 . HG . . . |
| 265 | +F2 E . . LG LM |
| 266 | +F1 . . . . . |
| 267 | + |
| 268 | +8 - |
| 269 | +F4 . . HM . . |
| 270 | +F3 E HG . LG LM |
| 271 | +F2 . . . . . |
| 272 | +F1 . . . . . |
| 273 | + |
| 274 | +9 - |
| 275 | +F4 E HG HM LG . |
| 276 | +F3 . . . . LM |
| 277 | +F2 . . . . . |
| 278 | +F1 . . . . . |
| 279 | + |
| 280 | +10 - |
| 281 | +F4 . HG . LG . |
| 282 | +F3 E . HM . LM |
| 283 | +F2 . . . . . |
| 284 | +F1 . . . . . |
| 285 | + |
| 286 | +11 - |
| 287 | +F4 E HG HM LG LM |
| 288 | +F3 . . . . . |
| 289 | +F2 . . . . . |
| 290 | +F1 . . . . . |
| 291 | + |
| 292 | + |
| 293 | +-------------------------------------------------------------------------------- |
| 294 | + |
| 295 | + |
| 296 | +# Correct |
| 297 | +0 - 0;2,0,0,1,0,1,0,0 |
| 298 | +1 - 1;1,0,1,1,0,1,0,0 |
| 299 | +2 - 2;1,0,0,0,1,2,0,0 |
| 300 | +3 - 1;1,0,1,0,0,2,0,0 |
| 301 | +4 - 0;2,0,0,0,0,2,0,0 |
| 302 | +5 - 1;0,0,2,0,0,2,0,0 |
| 303 | +6 - 2;0,0,0,0,2,2,0,0 |
| 304 | +7 - 3;0,0,0,0,0,2,2,0 |
| 305 | +8 - 2;0,0,0,0,1,2,1,0 |
| 306 | + |
| 307 | +# Somehow incorrect |
| 308 | + 0 - 0; 2,0, 0,1, 0,1, 0,0 |
| 309 | + 1 - 1; 1,0, 1,1, 0,1, 0,0 |
| 310 | + 2 - 2; 1,0, 0,0, 1,2, 0,0 |
| 311 | + 3 - 3; 1,0, 0,0, 0,1, 1,1 |
| 312 | + 4 - 2; 1,0, 0,0, 0,2, 1,0 |
| 313 | + 5 - 1; 1,0, 0,1, 0,1, 1,0 |
| 314 | + 6 - 0; 1,1, 0,0, 0,1, 1,0 |
| 315 | + 7 - 1; 0,0, 1,1, 0,1, 1,0 |
| 316 | + 8 - 2; 0,0, 0,0, 1,2, 1,0 |
| 317 | + |
| 318 | + |
0 commit comments