One more cheeky thing someone on Discord taught me was that if you want to do a modulo operation a % b where b is some power of 2 (e.g. 8 in this example), you can just do `a & (b - 1)` which is faster.
I believe this doesn't work for my input. The issue is that the ans may not produce the trailing 0. So I have to check run through the full simulation with ans to double check. the recursion will eventually find it.
If you have done part one, you don't need to decode the specifics, only the structure. The structure of the code (the loop that discards the last three bits each iteration) should be the same for all inputs.
sorry for the audio quality issues, it sounded fine when i listened to it locally :c
One thing I'm seeing is the Full Solve doesn't work on the test input. I assume this is because the test input's first instruction is 0.
Thanks for a beautiful explanation.
One more cheeky thing someone on Discord taught me was that if you want to do a modulo operation a % b where b is some power of 2 (e.g. 8 in this example), you can just do `a & (b - 1)` which is faster.
sick
I think the inputs followed the same structure, barring the XOR constants and the operand of the bxc instruction
I believe this doesn't work for my input. The issue is that the ans may not produce the trailing 0. So I have to check run through the full simulation with ans to double check. the recursion will eventually find it.
my input gave a result of 0 when a = 0 which was throwing off my answer because 0
Also, interestingly, the naive approach takes time 8^l where l is the program length, meaning that 8^16 operations would be needed.
If you have done part one, you don't need to decode the specifics, only the structure. The structure of the code (the loop that discards the last three bits each iteration) should be the same for all inputs.