EXAPUNKS
BRAINFUCK (MAKE AN INTERPRETER)
20 則留言
Thunder 2022 年 9 月 6 日 下午 12:24 
It took me more than 2 hours but I finally did it.
Two EXAs and 140 lines.
Cool challenge
WakiMiko 2022 年 5 月 29 日 下午 1:22 
Really enjoyed this one!
Amitai 2020 年 12 月 17 日 上午 1:28 
Speaking of hardcoding, I've managed to cram all 11 test cases into 100 lines. My record is now 2050 cycles.
Amitai 2020 年 11 月 27 日 下午 2:37 
I've since managed to clear some space to hardcode the two worst tests, bringing me down to 74.5k, lowering the top percentile down from 81k. With 101 lines I'm able to hardcode the third test and get down to about 56k, so I'll have to figure out how to cut one more line. I'm interested to know what sort of speeds you can reach!
Grimmy  [作者] 2020 年 11 月 27 日 上午 11:41 
@Amitai I think it can be faster without hardcoding. I didn’t optimize it for cycles, but my size solution is 504k/64/2, and surely those 36 lines can be spent making it much faster.
Amitai 2020 年 11 月 26 日 下午 2:26 
My second solution does half the work before runtime by first translating the program ( lke this ), and runs in 280k / 92 / 2. I believe this is about as fast as it can go, without hardcoding test 3?
Amitai 2020 年 11 月 25 日 上午 4:25 
Super cool level! This was my first experience with brainfuck, but writing an interpreter proved surprisingly easy. Coincidentally, I fit my solution in exactly 100 lines before any optimisation.
SoggyCrayons 2020 年 8 月 23 日 上午 8:56 
I was afraid that this was gonna be a thing ever since I saw the interpreter for SpaceChem.
God damnit internet <3
Unfortunate Swag 2020 年 5 月 12 日 下午 6:10 
(Had to split this into another comment)
More details if you don't mind spoilers:
I got stuck on the third one like most other people, but after looking at the table on Wikipedia [wikipedia.org] on loops I realized that I needed a counter in my bracket checking loops. My final issue was actually generating the file, which I accomplished by checking for the EOF on the data tape at the beginning of my main loop, copying 0 to F and seeking back 1 if so. I later improved this when I realized that the memory is only every expanded when > is called, so I put the check in that section which did not increase the size. I know that there is an optimization due to the limit on the amount of memory that is actually needed to solve, but I like that my interpreter handles this dynamically.
Unfortunate Swag 2020 年 5 月 12 日 下午 6:10 
Wow, I quite honestly thought this was going to take me ages, if I ever solved it. But the way this game makes you problem solve helped me solve this challenge as though it wasn't much more than a difficult level, and I did it in about 2 hours. When I realized I had done it, I just had a big, genuine smile on my face knowing that I had technically written my first language interpreter: a brainfuck interpreter, in a video game.

My only complaint: the cycle limit prevents your from running the ad infinitum, so you can't run the brainfuck brainfuck interpreter in your EXAPUNK brainfuck interpreter. :( Xzibit frowns upon me
Pope France Fry 2019 年 5 月 28 日 下午 8:32 
I have been working on this puzzle on and off for MONTHS trying to figure out why loops weren't working on specific tests. Eventually I resorted to figuring out what the bf code was trying to do for one of the failed tests that it managed to provide any output, which led me to discover the missing - symbol in a seek instruction. That error was causing my exa to skip an instruction ONLY when the loop was skipped.


I usually try to make all of my steam posts in-character as a GoDaddy sales rep but your challenge has more than earned a genuine comment about the hell I just escaped from. Good fucking game.
Madbarron 2019 年 5 月 27 日 下午 9:06 
Thanks for the puzzle! A good challenge and fun to write :)
Twotle 2019 年 4 月 30 日 下午 2:20 
This was incredibly fun. Good job Grimy. Got it down to 99 lines and am baffled how some got it down to 56 or however much. If you want to my solution because you can't get it check it out here [github.com] (GitHub).
ExplodaBob 2019 年 2 月 5 日 上午 2:34 
oh you beautiful bastard
Raymi 2018 年 11 月 20 日 上午 8:39 
That was fun. Misread the brainfuck commands first go around and was very unhappy after it passed first 2 just to fail 3rd, but after i figured out that dumb mistake and did some debugging hunting down one very annoying typo i made that i kept missing...fun
zwippie 2018 年 9 月 17 日 下午 1:52 
Wow, what a great challenge this is!
Managed to solve this with exactly 100 LOC. Not too fast though, need to think harder.
WakabaGyaru 2018 年 9 月 17 日 下午 12:01 
Oh, I nearly was dropping this puzzle feeling "wtf is this", but then I remembered Brainfuck is the name of exotic language :) Hold my beer, implementation coming!
Fernap 2018 年 9 月 3 日 下午 6:29 
Thanks for putting this together. That wasa a really nice level of challenge to solve.
SilverByte 2018 年 8 月 30 日 上午 9:13 
The hardest puzzles in the game were also the ones where you needed to sort some stuff, since the sorting algorithms take so long here, when they are usually so simple in other applications
Monotof1 2018 年 8 月 27 日 上午 7:29 
Holy moly, amazing puzzle.Great work Grimy, that must have taken some time to program. I am still working on optimizing my solution.
Hint: The Tape actually never needs to exeed 30
This Puzzle is a great mix of straightforward easy programming and some minor challanges.
It is baffeling how long the simple sorting Alogorithm takes, thats by far the longest one for me.