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.
단계 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. 첫 번째, we need to somehow save a value forever. 둘째, if the “구하다” 조금 (the top input) 켜져 있다, 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.
단계 2: Lets Assume Save Is Off
Remember Odd Ticks? In that problem, we were outputting an off and then using a NOT to “구하다” 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)
이 경우, we were essentially saving the result of the 아니다 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.
엄청난, 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 “절약” the input.
Can we test this? For sure, that’s a good idea. Running it for 끄다 works (until the tests below fail, but we can see there’s no reason for it to suddenly turn ~에 and output an ~에 signal). Let’s throw an ~에 generator and make sure it saves an ~에.
물론, it wouldn’t be that easy. Nothing a friendly 또는 can’t fix.
That’s better! I know the ~에 would make it ~에 regardless, but hopefully, you can see even if we could take that ~에 away, the bottom input to the 또는 would keep it on forever.
사실은, in the cases where the save input ~이다 끄다, this is exactly the behavior we want! Or in another way of phrasing it, If the Save Input ~이다 끄다 그리고 the saved value is ~에, then send an ~에 에 delay circuit, or if the Save Input ~이다 끄다 그리고 the saved value is 끄다, output an 끄다. We can simplify that a bit; if the Save Input ~이다 끄다, 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.
단계 3: Lets Add the Ability to Change What We Save
달콤한, we have half the problem solved. Now we just need to work out how to ignore whatever we have saved when the save input ~이다 ~에, 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! If the save input ~이다 ~에, then the 그리고 will ensure whatever we have saved is set to 끄다. 이 경우, all we need to do is grab the value from the value input and write it to the delay circuit.
아, 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 켜져 있다, 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 was 끄다. Here we want the value input, if the save input ~이다 ~에. That sounds remarkably similar, so lets try an 그리고 gate again.
Hit play and… we’re done!
다른
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 “건너뛰다” 단추. Explaining things isn’t my strongest skill, 하지만, 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.
이것이 오늘 우리가 공유하는 모든 것입니다. Turing Complete 가이드. 이 가이드는 원래 작성자가 작성하고 작성했습니다. renwallz. 이 가이드를 업데이트하지 못한 경우, 다음을 수행하여 최신 업데이트를 찾을 수 있습니다. 링크.