https://www.codingame.com/multiplayer/optimization/cgfunge-prime
Send your feedback or ask for help here!
Created by @eulerscheZahl,validated by @dbdr,@dwarfie and @pac-nam.
If you have any issues, feel free to ping them.
https://www.codingame.com/multiplayer/optimization/cgfunge-prime
Send your feedback or ask for help here!
Created by @eulerscheZahl,validated by @dbdr,@dwarfie and @pac-nam.
If you have any issues, feel free to ping them.
Hi @eulerscheZahl, @dbdr, @dwarfie, @pac-nam,
Iāve got a code passing all the test but only 88% of the validators (23,27,31,35,37,43,47,49,51,57,63,65 are not validated).
Maybe a certain class of numbers is used in validator and not in test.
Can someone help me investigating this issue please ?
EDIT: Iāve found the problem. A class of integer is indeed present only in validators. @eulerscheZahl feel free to contact me to find a solution.
Hi all,
My code succeeds all the validators but 22 ! Can I get a tip to solve this problem ?
Thank you
Could you write English here on the forum please?
You can find the validators on my github.
Validator 22 (ābonus validator 2ā) is here, you have to check if 3 is prime.
Shame on me ! Thank you
Hi, @eulerscheZahl
What is the range of integers on the stack? This should be clarified in the problem statement. It does seem to be the range of normal 32-bit integers (or maybe there is a bug in the stack visualization).
Maybe you can program a test for that question
Hereās an ocaml code :
let l = (* ~ GOTO OK ! GOTO FALSE*)
[String.make 33 ā2ā^āvā;
String.make 33 ā*ā^"<"
]
let _ = Format.printf ā%d@.ā (List.length l)
let _ = List.iter (fun s -> Format.printf ā%s@.ā s) l
It is an int
in the Java referee. So itās a normal signed 32bit integer, going from -2^31 to 2^31-1.
Thanks. I just realized I made a mistake. There is a delay in the visualization and the change of the stack is reflected only two commands afterwards (where the green cursor points to). In other words, the stack shows the action of the command that is two commands before the position of the green cursor. So I made a wrong assumption on where the program was actually at in my tests.
Is there any way to run custom test cases like some puzzles for the challenge?
Not online at least. Itās just not possible for me to add such an option.
You can download the game and add your custom test in this file, then execute the code offline.
Thanks for the information.
Is the final score the total number of steps executed in all validators?
Yep thatās it
Those little red letters over black background have given me a headache, Literally.
I created a CGFunge Batch Interpreter that I used some time ago. I canāt use the IDE, too complex and I needed something more direct, like highlighting the execution path, total steps and some other info you canāt get from the IDE.
As itās tech.io it works right out the box. If you want to make tests locally you just need a Java compiler. Itās just a single file with 2 classes, no weird imports or boring downloads, just a simple ājavac CGFunge.javaā . I canāt recall what Java version I used, also I only tested it in Linux, especially for background colors in terminal.
Feel free to use to your needs.
agreed, completely unreadable
Very unique puzzle, well done.
I suspect that top of the leaderboard just hardcoded all validators with some binary search (or they might know some serious math stuff which I donātā¦)
It seems to me that whitespaces are counted towards the points. That means this is a two-in-one optim puzzle: (1) find the algorithm with the fewest befunge instruction steps; (2) codegolf your solution by arranging it in the 2D grid as tight as possibleā¦
Looking at leaderboard language selections: LOL, I always knew that there MUST be a puzzle where php is the best choiceā¦
yes unfortunately to be at the top of the leaderboardā¦ just need to hard-code the validatorsā¦
ājustā need to hard-code