A walkthrough of one of Turing Complete’s hardest levels to grep. Saving Gracefully after the new December 2021 patch replaced SR Latches with delay circuits. I’ve seen a few people struggling with this level, so I decided to write an illustrated guide that builds up an answer with you. The answer shown here isn’t necessarily the most efficient, but we’re here to understand, not just copy-paste.
Paso 1: What do we have to do?
According to our long-nosed alien friend, we’re building a circuit that can save a value, and output whatever value is currently saved.
Breaking that down a bit more, there are a few different tasks we’re actually required to do here. Primero, we need to somehow save a value forever. En segundo lugar, si el «ahorrar» poco (the top input) esta encendido, then we need to replace whatever is «saved» with the value in the bottom bit.
That second part sounds tricky, but let’s start with the first and see how we can build off of that.
Paso 2: Lets Assume Save Is Off
Remember Odd Ticks? In that problem, we were outputting an off and then using a NOT to «ahorrar» an on, and then in the next tick doing the same thing but with opposite values. That sounds complicated, so let us use a picture.
(You can rotate components with the space bar)
En este caso, we were essentially saving the result of the NO of the last tick’s value. One way of thinking about this is we are outputting whatever is in the delay circuit, and putting the output we want for the next tick into the delay circuit. So the obvious way to save a value here would be to just loop back on itself. Lets try that.
Excelente, now we have a save loop. Whatever is output from the delay circuit will get fed back into it, and we’ll be golden. For simplicities sake, I’m going to refer to whatever input we’re sending to the delay circuit as «ahorro» the input.
Can we test this? For sure, that’s a good idea. Running it for apagado obras (until the tests below fail, but we can see there’s no reason for it to suddenly turn en and output an en señal). Let’s throw an en generator and make sure it saves an en.
Por supuesto, it wouldn’t be that easy. Nothing a friendly O can’t fix.
That’s better! I know the En would make it en a pesar de todo, pero con suerte, you can see even if we could take that en away, the bottom input to the O would keep it on forever.
De hecho, in the cases where the save input es apagado, this is exactly the behavior we want! Or in another way of phrasing it, si el Save Input es apagado Y the saved value is en, then send an en hacia delay circuit, or if the Save Input es apagado Y the saved value is apagado, output an apagado. We can simplify that a bit; si el Save Input es apagado, then send whatever is in the delay circuit back to itself, so that we can output it on the next tick.
Let’s make a Truth Table (those things in the earlier levels that show what the output should be forgiven inputs).
I encourage you to try and build that yourself, but here’s how that might look:
Here I’m using orange to signify our save loop, and light blue to show our save input. I recommend getting in the habit of coloring wires into logical groups like this, you’ll be glad you did on the later levels.
Paso 3: Lets Add the Ability to Change What We Save
Dulce, we have half the problem solved. Now we just need to work out how to ignore whatever we have saved when the save input es en, and instead save whatever is in the value input. That sounds tough, but lets start playing around.
Well actually, looking at our circuit again, we’ve got more than half the problem solved! si el save input es en, entonces el Y will ensure whatever we have saved is set to apagado. En este caso, all we need to do is grab the value from the value input and write it to the delay circuit.
Ah, we’re so close, but there’s an error here. We’re saving the value of the value input, even when the save input is not set. We only want to save that value if the save input esta encendido, so lets use some logic again to work out how.
Looking back at our save logic, we wanted the saved value if the save input era apagado. Here we want the value input, si el save input es en. That sounds remarkably similar, so lets try an Y gate again.
Hit play and… we’re done!
Otro
This isn’t the most efficient way to solve the level, but that’s not the point. I wanted to show the steps you can take to solve it yourself so that you can understand the level and not just get a «skip» botón. Explaining things isn’t my strongest skill, sin embargo, so if there’s something that’s still unclear or a different way of thinking that made it click for you, please share in the comments below!
This level is hard because it’s one of the first that requires you to break down the problem into sub-problems without making it obvious that you should. Being able to look at a problem and simplify it down to the smaller, easier sub-problems will get you further in this game than any CS degree or computing background at all, so I recommend keeping it in mind in future levels where the problems get larger and larger.
It works in real life too, but I’m only here to help with Saving Gracefully, Living Gracefully is still up to you.
Eso es todo lo que estamos compartiendo hoy para este Turing completo guía. Esta guía fue originalmente creada y escrita por renwallz. En caso de que no actualicemos esta guía, puede encontrar la última actualización siguiendo este enlace.