Power of Thor - Codesize - Puzzle discussion


#125

Have you ever tried?


#126

I'm cleary too bad at bash to do a shorter code than my javascript code, so no :smiley: I know system don't work on Temperatures and i was pretty sure that this hack was only for Temperatures puzzles. I'm glad to know that it is also the case on others puzzles.


#127

@CvxFous You are right!! Not going north reduces the code, but tests still pass.
And also you can reduce code just by avoiding tabs and spaces... I dont like that.


#128

Got 81 in Python3, I don't know how I could make it shorter but there are clearly ways I have not come across yet.


#129

I managed to do 135 char in JS ,without hard-coding (i don't even know how they do that), any tips to do shorter ? is that even possible ?


#130

Check the leaderboard. 58 char is possible.
You don't have to code a proper solution, it should just pass tests instead.


#131

Could we have a leaderboard by language ? Its silly to compare code length from Perl to Java. 557 chars is quite short for the Java Solution, but i can't compare with Java Mates since leaderboard is full of other languages. I'd like to know if there is shorter in Java to optimize my solution !


#132

You can filter the leaderboard by language.


#133

How you can improve if you can't see other solutions?


#134

How can anyone compete if anyone else can see [and copy-paste] best solution?


#135

Allowing only one submitting?

I prefer to learn instead of compete.


#136

What do you mean? Do you suggest to change rules to allow a person only one submission but expose the solution to others? This will not prevent copy-pasting but make impossible to improve own solutions.

Yeah, having a couple of golf puzzles for "practice" section would be nice (I'd prefer another one for "compete" though)


#137

Yes, and now that you say it, it would be a good idea to have some golf puzzles in practice section, it would be the perfect solution. Imagine being able to merge the best short-coding tricks.


#138

Merging others solutions doesn't feel as good as making your own.

Actually, imagine situation with two people having good but not ideal solutions, and they both can peek at each other solutions. What are the chances they won't find best solution long before you'll find out about the puzzle?


#139

Would it make sense to have a language specific leaderboard? Or atleast to filter the leader board by languague. I wrote in go but noticed that none of the shortest 1000 solutions is written in go, still I would like to see how my code compares to other go solutions, seeing how each language has different minmal syntax requirements.


#140

The ranking is doing something funny, as for the three optimization puzzles I have the best score for New Zealand, but I am ranked 2/x for New Zealand in the profile page..

Also when looking at the Power Of Thor and picking "New Zealand" or my company name, the headline is picking my worst result as my ranking, as can be seen below, I have the best score rank one, but the header line shows 4 my C# code..


#141

That's code size, not optimization.
There are per-language leaderboards
You get 200 points for being first in a language.
Your best 5 langauges count in the puzzle ranking, so you can get 1000 points at most.
It looks like others solved it in more languages. That alone can make you 2nd.


#142

That's code size, not optimization.

I was meaning the yellow 4, the code size is correct 68, but the yellow four is my worst codes ranking, on other filter sets, where the numbers are in the hundereds, the header line yellow number is the ranking of my worst entry, while the code length values is my best..

There are per-language leaderboards
You get 200 points for being first in a language.
Your best 5 langauges count in the puzzle ranking, so you can get 1000 points at most.
It looks like others solved it in more languages. That alone can make you 2nd.

This explains the bigger picture ranking. Although it seems pointless (to me) to rank a code golf on how many languages you submit in.. but now I know what to game it "win" the ranking I will play that game...


#143

47 in java8 ?


#144

In the instructions in the IDE, it states that you have to read the remaingTurns:

Input for a game round
Line 1: the number of remaining moves for Thor to reach the light of power: remainingTurns. You can ignore this data but you must read it.

Actually, you don’t have to read it (at least not in JavaScript).
Please correct the instructions.