4
\$\begingroup\$

I want to make a complicated code golf challenge (with a time limit ;). In this particular case I want people to golf the Elliptic-Curve Method to factorization.

Now there are two issues with planning this challenge, on which I'd like to ask for "official" guidance:

  • Implementing this algorithm will be very work-intensive (one needs to implement a specific set of group operations efficiently and then on top of that implement the actual non-trivial algorithm), can and / or should I split this into several challenges that build upon each other or is it preferred to have this as one big challenge?
  • There are also languages (MATL, Sagemath and Mathematica would be my guesses) that have built-ins for certain core operations (like implementing said group), should I let people "just deal with it" or would it be preferred to allow code re-use with minimal penalty? For example one would need addition (probably 30-100 bytes for languages without built-in), could / should I allow people to re-use functions / programs from pre-existing challenges at the costs of the associated call?

The second point would also allow people to make other potentially interesting challenges, for example: "Given a function that finds a non-trivial factor of a number (as a 'built-in'), write a function / program that outputs the prime factorization of a number."

My current idea for a policy for the second point would read as:

You are allowed to define a helper function that will not count towards your total bytes, only calls to this function will count. If your language supports functions and you want to use this helper, you have to use a call. If your language does not support functions, you may inline the code instead and for each occurence of the same function with formal parameter replacements you have to add 5 bytes and 2 bytes per argument per function call to your byte count but are allowed to not count the inlined function towards your byte count.

One possible additional restriction here would be to limit the source of the helper function to competing answers to an existing, defined code-golf question.

\$\endgroup\$
  • \$\begingroup\$ Should this be split up into 2 meta Qs? \$\endgroup\$ – SEJPM Jul 12 '17 at 19:43
  • \$\begingroup\$ I'm not sure what it gains from the challenge by moving code out that doesn't count towards the total bytes... Surely part of the fun in answering challenges is how little bytes you can get it down too and allowing people to move code away that won't counted sounds odd to me (not sure if people agree with me here though). \$\endgroup\$ – TheLethalCoder Jul 14 '17 at 8:09
  • \$\begingroup\$ Also there are lots of hard long challenges; the only "problem" with them is they get fewer answers that are usually really clever and creative. Not the meta post I was thinking of but see this post. \$\endgroup\$ – TheLethalCoder Jul 14 '17 at 8:13
  • 1
    \$\begingroup\$ Point 2: Comparability across different languages usually isn't worth it. Mathematica has a built in? Fine, let it do well. That's something it's good at. Point 1: Either approach seems fine. \$\endgroup\$ – isaacg Jul 14 '17 at 16:02
  • \$\begingroup\$ While I don't understand the actually challenge you want to perform, a good way to stop built-ins is to require the output of intermediate steps. For example, if you want to force somebody to sort a particular way, require them to print out the array after each step. \$\endgroup\$ – Nathan Merrill Jul 14 '17 at 21:53
  • 2
    \$\begingroup\$ @TheLethalCoder I agree. What's to stop someone from just writing the code in a helper function and submitting 3 bytes: f()? \$\endgroup\$ – NoOneIsHere Jul 20 '17 at 23:22
  • 1
    \$\begingroup\$ Generally requiring people to implement a certain algorithm for code-golf is not a good idea as it usually makes golfing close to trivial. Also some languages may not even be able to implement certain algorithms. So feel free to make complex challenges, but I advise against imposing an algorithm. \$\endgroup\$ – flawr Jul 23 '17 at 20:56

You must log in to answer this question.

Browse other questions tagged .