Comments

Log in with itch.io to leave a comment.

(+1)

Hey there! First off, I love this! I feel like I'm actually learning BrainFuck! I did have a question though. On this problem, it says to get the numerical values of the input, and it even gives a hint about how the ASCII value of 0 is 48, but there is no zero? Also, I'm not 100% sure how to tell the program to not read the final input after 8 (I might try something after posting this). Any help would be appreciated!

The code I used was:

,.[>,.]

(+1)

Hey, thanks! As to you first question, the numbers in ASCII are sequential, so 0-9 have code 48-57. Stopping execution you can do with loops, since they stop executing if the current value is zero, you just have to design the loop in such a way that it reads in the next value as the last step, so that if that happens to be 0, it stops.

But in this task, you're not trying to print the numbers, you just wanna read in and convert the ASCII codes to the numerical values, essentially making the two bands the same.

I'll leave it at that so you can work it out yourself, but if you want more hints, let me know :)

(+1)

Oh! Thank you so much!

(+1)

I'm a tad embarrassed to admit it, but after like nearly 40 minutes of trying to do something with loops, I decided to just brute-force the solution by using ++ + - and > to manually update each memory cell to match the corresponding input. I've been looking up guides and tutorials, but I think I'm most likely not wording my searches correctly haha... Hopefully, I'll get the basics down and then I can go back to this and try a proper solution!

(+1)

Haha, well whatever works, works :D but really, it's a fairly simple idea: read the values, subtract 48, and do all that in a loop. If you want a spoiler with explanation, I put the solution here: https://hypnoticowl.com/misc/read-ascii.html

(+1)

OH my lordy goodness... I was so close the whole time! (T~T) Thank you for the help!

(+1)

I figured while I'm at it, I might as well put together a guide for the other challenges too, you can find it here if you need it: https://hypnoticowl.com/misc/bf-man/

This game is diffcult and confusing because I only completed the first 2 levels. Interesting game idea.

(1 edit)

The fourth level keeps giving me an error despite successful solution.

(8 edits)

Found the acceptable solution, but alternates exist. 


Solution below: 










,[.,]

(+1)

Hm, that's weird. I really just check the output, not what you did to get there, no hardcoded solutions or anything. Can you give me the solution that threw an error so I can check it out?

If I flip the order of operations in @Sebungifto's code, the execution will fail.

+[,.]

The execution should stop when there is a read operation but no more input exists.  

There should be no any judgements to the execution position of the source code. And zero should not be inputed as a fallback.

Not sure I agree with that. I think reading a null character is a valid operation and terminating execution there would be too limiting. Many of the other challenges depend on you being able to read the input until it's completed, i.e. until a null character is read and breaks you out of the loop, allowing you to perform further operations on the read values. You wouldn't be able to do that if the program stopped there or the cell wasn't changed, which would trap you in an infinite loop that keeps on printing the last read character.

I suppose I could allow the result even with an additional null character printed, but making special allowances doesn't seem in the spirit of the challenge. It's to print that exact string, not that string plus null, so in this case and with the way my interpreter works, I wouldn't consider yours a valid solution since it produces output that is not exactly equal. Other interpreters might handle this differently, but this makes the most sense to me for mine.

I agree with you if you are writing an command line interpretor for brainfuck. But this is a game.

Maybe I am taking the game "Human Resource Machine" into consideration. That's weird when I produced an output as expected but the game did not finished.