10
\$\begingroup\$

This question asking us to make a "Cyclic Levenquine" has gone unanswered. So today we will ask a slightly simpler version. In this challenge we will define a K-Levenquine to be a program whose output is Levenshtein distance K from its source.

Task

Your goal in this challenge is to write a program with some output different from its own source; running that output as a program should also do the same. Eventually, the sequence of repeatedly running the outputs of each successive program (in the same language) must eventually output the original program.

As with the last challenge there must be two distinct programs in this cycle such that they do not share any two bytes (i.e. their byte sets are disjoint).

As with most challenges, reading your own source code is forbidden.

Scoring

Each program in your cycle will be a K-Levenquine for some K. The largest K of any of the programs in your cycle will be your score. Your goal should be to minimize this score, with 1 being the optimal score.

\$\endgroup\$
  • \$\begingroup\$ Just for clarity, each of the programs should be in the same language, correct? \$\endgroup\$ – FryAmTheEggman Jan 22 '18 at 20:44
  • \$\begingroup\$ @FryAmTheEggman yes \$\endgroup\$ – Sriotchilism O'Zaic Jan 22 '18 at 20:45
  • \$\begingroup\$ Should you make it so that if someone gets to a score of 1, it should be posted on the other question instead? Otherwise, answers could be duplicated if someone gets that far. \$\endgroup\$ – mbomb007 Jan 22 '18 at 21:03
  • \$\begingroup\$ Related. Related. Related. \$\endgroup\$ – Martin Ender Jan 22 '18 at 21:34
  • 2
    \$\begingroup\$ Possible duplicate of Cyclic Levenquine \$\endgroup\$ – pppery Apr 17 at 17:35
2
\$\begingroup\$

><>, Score: 41

'd3*}>a!o-!<<8:5@lI55>@z:5ll55>>q:>|q::|,

and the disjoint program

"r00gr40g44++bb+0p64++?b6+0.22#eW4s )Z

Try it online!

A copy of my answer to the Mutually Exclusive Quine question. A mutually exclusive quine is made of two programs, A and B sharing no common characters, where A outputs B and B outputs A. This means it is a 2-cycle Levenquine and also qualifies for this question. This can act as a baseline for other more inventive answers (though I'm not very confidant this won't go the way of the original Levenquine question).

A more detailed explanation can be found here.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.