Turing Complete

Turing Complete

View Stats:
Redhook 23 Mar, 2023 @ 12:40pm
Storage Cracker - program not working as expected.
So I tried to "cheat" the storage cracker level by doing a binary search. To facilitate that, I went back to my ALU design and added two bootleg functions, ROR (shift bits right) and ROL (shift bits left). That let me double or halve a number to increment my guess. The function worked great, and I could guess 128, followed by 192, then 224,240, etc. and if that was too high, I could make the guess lower by half that amount, like 236, etc. It's a classic way of doing the search in a minimum number of steps.

Problem was... Every guess I sent to the output was followed by a response from the input that said the value was too high. So the guesses went 128, 64,32,16,8,4,2,1,0.

Each guess was send reg5 to output, followed by input to reg3. in to reg3 always returned 1.
< >
Showing 1-4 of 4 comments
MegaIng 23 Mar, 2023 @ 12:49pm 
Your program is probably working correctly, the level has a bug.
stochastic 25 Mar, 2023 @ 7:57pm 
Edit:
Sorry it turns out not to be a bug. This level is correct. I need to enable the input when there is one.


original post:

I confirm this bug but it behaves differently. Did exactly the same method (without using hardware though) and it didn't work as I expected, except my guess is always too low. Then I manually construct a 255 and send to output, it should either be too high (input return 1) or it should be the correct guess (jump to next test). What I got instead is always 0 from input. I tried brute-force enumerate down from 255 (255, 254, 253 ...) and input never returns 1. Here's a screenshot https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2952559993
Last edited by stochastic; 25 Mar, 2023 @ 8:37pm
stochastic 25 Mar, 2023 @ 10:37pm 
https://gtm.steamproxy.vip/app/1444480/discussions/0/3431201423162197535/

To Redhook: this seems to be the answer for you. Have you tried output 0?
daemonaa 28 Apr @ 4:10pm 
there must be a bug. (ver 0.1059 beta)
i first tried a binary search solution, but i figured out its useless without dividing by 2 command - its emulation with subsrtactions will eat all the profit)

so i solved it with bruteforce, with just sending incrementing value to out without even analysing input i read.

when i returned to binary search and implement a hardware div by 2 command)

and the algorytm worked fine, except it never gets an 1 on input..

unless i sent a 255 to the out before entering the search loop.

after that it works fine.
< >
Showing 1-4 of 4 comments
Per page: 1530 50