text:
Find the shortest pangrams from a word list
A pangram is a string that contains every letter a-z of the English alphabet, case-insensitive. (It's OK if the pangram contains more than one copy of a letter, or if it contains non-letter characters in addition to the letters.)
Write a program or function whose input is a list of strings, and which outputs one or more strings which have the following properties:

Each output string must be a pangram.
Each output string must be formed by concatenating one or more strings from the input list, separated by spaces.
Each output string must be the shortest, or tied for the shortest, among all strings with these properties.

Many programs will choose to output only one string; you'd only want to output more than one string if you'd otherwise have to write extra code to limit the output.
You may assume that the input contains no unprintable characters or spaces, and that no word in it is more than (26 times the natural logarithm of the length of the list) characters long. (You may not assume, however, that the input contains nothing but letters, or only lowercase letters; punctuation marks and uppercase letters are entirely possible.)
Input and output can be given in any reasonable format. For testing your program, I recommend using two test cases: a dictionary of English words (most computers have one), and the following case (for which a perfect (26-letter) pangram is impossible, so you'd have to find one containing duplicate letters):
abcdefghi
defghijkl
ijklmnop
lmnopqrs
opqrstuvw
rstuvwxyz

You should include a sample of your program's output along with your submission. (This may well be different for different people as a result of using different word lists.)
Victory condition
This is a restricted-complexity code-golf challenge. The winner is the shortest program (in bytes) that runs in polynomial time. (A summary for people who don't know what that means: if you double the size of the word list, the program should become slower by no more than a constant factor. However, the constant factor in question can be as large as you like. For example, it's valid for it to become four times slower, or eight times slower, but not for it to become smaller by a factor of the length of the word list; the factor via which it becomes slower must be bounded.)

When determining the complexity, can we use the fact that each word is at most 26 letters long? That the alphabet size is a constant of 26?

Yes. I put that restriction on the input there partly to make the complexity easier to define/calculate.

I think this runs into a technicality. If you ignore repeated input words, there are at most 27^26 possible input words, and so at most 2^(27^26) possible subsets of them as possible inputs. This is huge but a constant. So, any program on this finite set is constant-time, with the constant being the maximum number of steps taken over all possible inputs.

I didn't say there are no duplicated words in the input. I guess you could run the program in a "technical" O(n) time by filtering out punctuation marks and deduplicating the input first, though (or more likely O(n log n), which would use a lot less memory than a radix deduplicate would). Then you'd have to go back from the filtered version to the original word list. You can't claim the polynomial time in question unless you actually go through all those steps, though!

I'd forgotten about non-letters. Can we assume these are ASCII, or otherwise within some finite set? If so, I think any algorithm that starts by deduplicating can claim to be polynomial-time.

"You may assume that the input contains no unprintable characters or spaces", which implies a finite set. I guess I'll change the limitation on the length of the input to scale with the length of the list, in order to get rid of the technical argument.

Ruby 159 (iterative)
Ruby 227 220 229 227 221 (recursive)
New iterative solution (based on the algorithm described by @Niel):
c={('A'..'Z').to_a=>""}
while l=gets
d=c.clone
c.map{|k,v|j=k-l.upcase.chars
w=v+" "+l.strip
d[j]=w if !c[j]||c[j].size<w.size}
c=d
end
x=c[[]]
p x[1..-1] if x

Old recursive solution:
W=[]
while l=gets
W<<l.strip
end
I=W.join(" ")+"!!"
C={[]=>""}
def o(r)if C[r]
C[r]
else
b=I
W.map{|x|s=r-x.upcase.chars
if s!=r
c=x+" "+o(s)
b=c if c.size<b.size
end}
C[r]=b
end
end
r=o ('A'..'Z').to_a
p r[0..-2] if r!=I

The byte measurement is based on leaving off the final newline in the file, which does not matter to ruby 2.3.1p112. The byte count went back up after fixing a small bug (adding .downcase .upcase for case-insensitivity as required by the problem statement).
Here is an earlier version from before shortening identifiers and such:
#!/usr/bin/env ruby

$words = [];

while (line=gets)
  $words << line[0..-2];
end

$impossible = $words.join(" ")+"!!";

$cache = {};

def optimize(remaining)
  return $cache[remaining] if ($cache[remaining]);
  return "" if (remaining == []);

  best = $impossible;

  $words.each{|word|
    remaining2 = remaining - word.chars;
    if (remaining2 != remaining)
      curr = word + " " + optimize(remaining2);
      best = curr if (curr.length < best.length);
    end
  };

  $stderr.puts("optimize(#{remaining.inspect})=#{best.inspect}");

  return $cache[remaining] = best;
end

result = optimize(('a'..'z').to_a);

puts(result[0..-1]);

How does it work? It basically maintains a set of characters still to cover and only recurses on a word if it would reduce the uncovered set. Additionally, the results of recursion are memoized. Each subset of 2^26 corresponds to a memoization table entry. Each such entry is calculated in time proportional to the size of the input file. So the whole thing is O(N) (where N is the size of the input file), albeit with a huge constant.

JavaScript (ES6), 249 248 bytes, possibly competing
a=>a.map(w=>w.replace(/[a-z]/gi,c=>b|=1<<parseInt(c,36)-9,b=0,l=w.length)&&(m.get(b)||[])[0]<l||m.set(b,[l,w]),m=new Map)&&[...m].map(([b,[l,w]])=>m.forEach(([t,s],e)=>(m.get(e|=b)||[])[0]<=t+l||m.set(e,[t+l+1,s+' '+w])))&&(m.get(-2^-1<<27)||[])[1]

Explanation: Transforms the array by converting the letters into a bitmask, saving only the shortest word for each bitmask in a map. Then iterating over a copy of the map, augment the map by adding each combined bitmask if the resulting string would be shorter. Finally return the string saved for the bitmap corresponding to a pangram. (Returns undefined if no such string exists.)

Interesting. Could you expatiate more on how it works and, if available, post the ungolfed code?

This should be a valid/competing entry. I think this actually runs in O(n log n), in fact! (The map has a hard limit of 2²⁶ entries, and thus doesn't show up in the complexity; thus the only time spent is the time reading the input.)

I just re-read the description and I get how it works now. Neat. +1 ... Hmm, when does it decide to stop trying to augment the map by considering pairs though? It should keep going until no relaxations are possible.

@DepressedDaniel For each bitmask extracted from the original word list, it checks all the partial pangrams that it has found so far, and whether adding the word creates a pangram that's shorter than the one it currently knows for the combined bitmask.

@ais523 For large inputs (>1000 words), most of the time seems to be spent swapping. I tried switching from a Map to an Array and it got even slower!

Python 3, 98, 94, 92 bytes
print([s for s in input().split()if sum([1 for c in range(65,91)if chr(c)in s.upper()])>25])

Iterates through the ASCII representation of the alphabet and adds a 1 to a list if the letter is found in the string. If the sum of the list is greater than 25 it contains all letters of the alphabet and will be printed.

I think you can remove a space between (' ') and if. You can also change ord(i) in range(65,91) to 91>x>=65. Also, what's the complexity?

What is the complexity of this solution? It is required for the answer to be in polynomial complexity, otherwise it is non-competing.

Sorry, I think it is O(n), because the input list can vary in length but

Sorry, I think it is O(n), because the input list can vary in length but the second loop always goes from 65 to 90. But I haven't tested it.

Not sure this satisfies "Each output string must be the shortest, or tied for the shortest, among all strings with these properties."

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Nostalgic prime number generator
Remember the good old days when opening a simple document or web page was painfully slow as it hogged all the meager resources your computer had? And today, doing the same is even slower, despite your processor being hundreds of times faster and having access to thousands of times more memory?
To simulate the effect of bloat in current document viewers and similar applications, write a program which has visible performance problems when run on more powerful machines.
To have a common task for everyone, make it a prime number generator.

The program has to print consecutive prime numbers, starting from 2, each in a new line, and nothing else. It should to this forever (or until running out of memory). Like this:

2
3
5
7
11
13
17

There should be a delay between printing each line, enough to be perceivable by a human.
This delay should be longer as the machine the program is running on gets faster. The faster the machine, the slower the program.
I won't specify exact benchmarks as it might become subjective, but there should be a human-perceivable difference in the speed on two different machines if there is significant difference between the performance of the two machines.
The speed of the program doesn't have to be monotonically decreasing across all existing machines ever created. This would be hard to specify, and even harder to verify. I trust the common sense of the contestants about what can be considered a significantly different performance between to machines, and it is enough to satisfy that.
I also won't specify exact upper or lower time limits, but it should be under reasonable limits, so no days or years between printing two lines please.
I won't require it to run on everything from the Eniac to modern day, but it should be general enough, for example, it's not allowed to say it only works on two specific CPU types, and specifically detects the name of one specific CPU on which it will run slower or faster.
The code shouldn't rely on compiler or interpreter version. It should work if the same version of the compiler/interpreter is installed on both a slower and faster machine, or even if the binary / bytecode is compiled on one machine and then run on two different machines.
Please explain the principles of how your program is operating. As it will be difficult to reproduce the results, the validity of the answer might depend on the the feasibility of the method.

Although I would have liked it to become an underhanded contest, sadly this site is no longer "Programming Puzzles & Code Golf" but just simply "Code Golf", so the shortest code wins.

"delay...perceivable" can you quantify that with at least 1/4 second or something?

@EasterlyIrk : the problem with exact specifications (the delay has to be exactly 1750 ms on an  i7-6498DU) will lead to boring and too much localized answers. I have to rely at least in some amount on the creativity and common sense of the contestants. Machines very similar in performance could cause problems as it might be subjective according to which criteria do we hold one to be better than the other. This is why I had to be a little bit vague with "sufficient difference", and I hope the community is creative enough to work with that. (Still, I'm open to suggestions for improving it.)

... I just didn't want to fill it with a bunch of excessively strict constraints.

The faster the machine, the slower the program. I don't see an easy way to make this an objective, verifiable criterion

@LuisMendo: I see at least two ways for easily doing this.

@LuisMendo : Did the last edit make it at least a little more understandable to you? There are several ways to easily solve this problem, of course, if won't work if the difference between the performances is too small, as it might depend on may things, like OS version and installed programs. But if the difference between the machines is significant, it shouldn't be a problem. Do you think that the question is impossible to be answered at all, without specifying in exact gigaflops what a significant difference in performance means?

@vsz The problem I see is reproducibility. Someone says they tested on two machines and noticed a significant difference in speed as required, but you can't reproduce that behaviour on your two machines. So is the answer valid?

@LuisMendo : If the method it uses seems reasonable, then yes. (I doubt all accepted answers on all highly rated questions, especially ones in very obscure languages have been verified) Of course, this requires explaining the method they used. I'm adding it to the question.

Should this be tagged with [tag:busy-beaver]?

@vsz why not The faster the machine, the slower the program be a bonus?

What do you consider to be a “more powerful machine”? Is a machine with the same specs but more RAM considered more powerful? The number of instructions the processor runs in a second? Both? Something else?

@Fatalize : if I had to define it exactly, I would say a more powerful machine in this context means that a normal implementation of this problem (listing the prime numbers, each in a row), without the tricks of this challenge, would run faster on it.

There's no clear way to quantify that restriction. Voting to close.

Perl, 80 78 71 bytes
-9 bytes thanks to @Dada
$_++;`lscpu`=~/z:\s+(\d+)/,sleep$1,(1x$_)!~/^(11+?)\1+$/&&say while$_++

Runs the command lscpu and finds the CPU speed in MHz.  The faster the CPU, the more time it sleeps between outputs, 1 second for every 1 MHz.  Runs on Ubuntu 14.04.5.  On my particular machine, this tests each number every 800 seconds (13 minutes, 20 seconds).  On faster machines, this can be over 50 minutes.  Change it to sleep$a/400 to get something much more sane for testing purposes.

Rearranging the code a little bit gives $_++;lscpu=~/z:\s+(\d+)/,sleep$1,(1x$_)!~/^(11+?)\1+$/&&say while++$_ for 71 bytes.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Is it an emoji?
I've been working on this iOS app recently and I encountered a (rather easily solved) problem: How do I determine if my string is comprised only of emojis?
Well, that's your job today!
Input
A string. If the presence of unicode characters is problematic for you then you may use a different reasonable format. Please state what you do if you do something different from a regular string for taking input.
Output
Print or return a truthy value if the input string contains only emojis, and a falsey value if it contains any characters other than emojis.
Wait a sec... what's an emoji?
An emoji is a character that falls in these ranges:
0x1F600...0x1F64F  // Emoticons
0x1F300...0x1F5FF  // Misc Symbols and Pictographs
0x1F680...0x1F6FF  // Transport and Map
0x2600...0x26FF    // Misc symbols
0x2700...0x27BF    // Dingbats
0xFE00...0xFE0F    // Variation Selectors

(I think)
This is code-golf, so shortest code in bytes wins❕
Test cases
"Is it an emoji? " -> False
"code-golf" -> False
"    " -> False
"I have no fancy emojis :(" -> False

"" -> True
"" -> True

For you poor souls who cannot see emojis, here is an image of the test cases.

Perhaps include a version (maybe an image) for those who can't see emojis? ;-)

@ETHproductions, do you suggest I link to a photo of the test cases or something else?

Well, there are emojis spread throughout the whole question, but I guess the only really important ones are in the test cases, so an image of just the test cases will work.

@ETHproductions, I added a link to a photo of the test cases

Can input be a numeric array of Unicode code points? Also, what range of characters/numbers can the input contain?

@LuisMendo, I suppose you can take an array of Unicode code points. The range of characters is the range I have above in the question in addition to any printable ASCII character.

I'm going to vote to re-open. I don't see a valid reason as to why this is unclear. If a string contains only emojis, it's a truthy. if not, it's a falsy.

You forgot some emoji: vomiting emoji, combining bloodstain

Ruby, 61 56+1 = 62 57 47 bytes
Uses the -n flag and takes input from STDIN. Prints 0 for truthy and nil for falsy.
-5 bytes because for some reason I initially thought the regex solution would not work???
-10 bytes from NieDzejkob for noticing a code point overlap that I missed :o
p$_=~/^[--☀-➿-]*$/

Try it online!

47 bytes if you merge two ranges in the regex.

That's 47 isn't it?

Yeah I forgot to update the score after getting the suggestion from @NieDzejkob

Emojicode, 179 bytes
a➡na◀n 9728▶n 10175◀n 65024▶n 65039◀n 127744▶n 128591◀n 128640▶n 12876701

A callable that takes a list of integers representing the codepoints and returns 1 or 0.
Try it online!
Emojicode, 187 bytes
a➡iani◀n 9728▶n 10175◀n 65024▶n 65039◀n 127744▶n 128591◀n 128640▶n 128767

A callable that takes a string and returns a boolean.
Try it online!
Ungolfed and explained
 A callable that takes a  called input and returns a
 input  ➡
  For each character in input
  character  input
   Create a frozen called n containing the unicode codepoint of character
   n  character
   If the value is in one of specific ranges, return  (if the current character is not an emoji)
  ◀n 9728▶n 10175◀n 65024▶n 65039◀n 127744▶n 128591◀n 128640▶n 128767

  Since we're here, all characters are an emoji, so return

Try it online!

JavaScript (V8), 39 bytes
Since the proposal for Unicode property escapes is now part of V8, this can also be addressed without manually specifying ranges. Granted, this comes years after the original question was asked, but I think it is an interesting addition none the less.
a=>/^\p{Emoji_Presentation}*$/u.test(a)

Try it online!

Amazing, TIL about Unicode property escapes. Thanks!

Python, 87 bytes
lambda x:re.match('^[---☀-➿-]*$',x)and 1
import re

Try it online!
Returns 1 as truthy value and None as falsy value.

I "borrowed" your regex, hope you don't mind ;)

Since I told Value Ink about it, I'll tell you too - the first two groups in the regex can be merged because of adjacent codepoints: -

-12 bytes by using a better regex and using re.sub instead of re.match Try it online!

Proton, 54 bytes
map(/[--☀-➿-]/.match)+all

Try it online!
-9 bytes (3 chars) thanks to NieDzejkob
"Borrowing" Uriel's regex :P This is shorter thanks to Proton's obscure features and regex literals

As I told Value Ink, the first two groups in the regex can be merged because of adjacent codepoints: -

@NieDzejkob How exactly? It gives me errors: https://tio.run/##KyjKL8nP@59m@z83sUBDP/rD/BkNuh/mT9//Yf4sEGP2/kdAgUfz9r/f0aALxO939Mfq6@UmliRnaGon5uT8LyjKzCvRSNNQB@pcB8RLgXgFEK8E4lXqmpr/AQ

like this

QuadR, 47 bytes
''≡⍵
[--☀-➿-]

Try it online!
Is…
 ''≡⍵ an empty string identical to the result when…
 [--☀-➿-] all emojis are…
  replaced with nothing
?

JavaScript, 83 61 bytes
-22 bytes thanks to @Shaggy
s=>(s.match(/\ud83d[\ude00-\ude4f]/g)||"").length==s.length/2
Demo

f=s=>(s.match(/\ud83d[\ude00-\ude4f]/g)||"").length==s.length/2

document.writeln(f("code-golf")) //false
document.writeln(f("    ")) //false
document.writeln(f("I have no fancy emojis :(")) //false
document.writeln(f("")) //true
document.writeln(f("")) //true

61 bytes: s=>(s.match(/\ud83d[\ude00-\ude4f]/g)||"").length==s.length/2

Uh, how does this work? The regex doesn't specify the codepoints of any emoji...

@NieDzejkob I believe JS uses UTF-16 for Unicode, so I guess these are the UTF-16 byte representations of those codepoints. The answer is incomplete though, it fails for , `♔☺☠`,  etc., all of which should be truthy. It seems to check only for one range out of the six that OP mentions.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
What path will santa take?
Question
Santa must get to every house in the world to deliver gifts, can you make a program that will calculate the shortest path that Santa could take, and still visit all the cities listed?
Specifications
The program should accept Santa's starting point as input. That could either be a city or a pair of coordinates. That is where it differs from other challenges. Has to return a list of cities in the order that Santa should visit them. The country where the city is located does not have to be outputted. Also assume that air currents and geographical features do not slow Santa down. After Santa has delivered all his presents, we don't need to calculate his path for him anymore(he doesn't have to return home in the program).
example input:
Washington D.C.

Example Output:
Tokyo
Delhi
Shanghai
etc.(This output is not correct)

Cities
To make this easier, the program only has to calculate the shortest path between all capital cities of countries listed here.
The Winner
This is not intended to be code golf, but if more than one program returns the correct answer, than the shortest program that works will be selected as the winner. If multiple programs work and are the same(shortest) length, the one that was submitted first will be counted as the winner. If you are stuck, Nuuk(northernmost capital) is the first city.

Does the program even have to calculate anything for this problem? What if someone were to hard-code the list of cities to visit?

Is this not just the Traveling Salesman Problem? Mind, with a bit more Holiday Spirit.

This is exactly the traveling salesman problem

Additionally, Nuuk (Greenland) is further north by 0.03°

The shortest solution is probably to hardcode the output, except maybe in mathematica. A more interesting challenge might be to take Santa's start point as arguments.

I took your suggestion. Sorry about my geography mistake.


text:
Print a Sorry Board
I was just playing the board game Sorry! with some people, and I realized that I could base a few interesting challenges off of it. This one is pretty simple.
You task is simply to output an ascii-art version of a sorry board, placing pieces where I tell you to.
Specs
First, here is an image of an actual Sorry! board for reference:

The empty board looks like:
# > - - o # # # # > - - - o # #
#   #   S                     v
o   #             H # # # # # |
|   #                         |
|   #                       S o
|   #                         #
^   H                         #
#                             #
#                             #
#                         H   v
#                         #   |
o S                       #   |
|                         #   |
| # # # # # H             #   o
^                     S   #   #
# # o - - - < # # # # o - - < #

Notice a few features.

The #'s are empty squares.
The S's and H's are Start's and Home's respectively.
The >v<^'s are the start of the slides, depending on which direction they face.
The |'s and -'s are the middles of slides, depending on if they're horizontal or vertical.
The o's are the end's of slides.
Each column is separated by a column of spaces to make it look more square-like.

Now here is what you have to do:

Your input is a list of coordinates of various pieces that have been placed on the board.
The coordinates start at 0 at the square outside the Start of the bottom color (yellow in the picture), and increase by one per square clockwise.
After these 60 squares, the safe zones have the next and last 20 coordinates, starting from the one on the bottom (which gets 60-64), then going clockwise.
You will have to place star's(*'s) on the correct coordinate, replacing the character underneath for all players.
Additionally, if any of the players are on the start square of a slider,  move them to the end of the slider before placing them.
You can assume that there will be no collisions, before or after resolving sliders.
You con't need to worry about the Home's or Start's.
You can be 1-indexed if you want, but the test cases are 0-indexed.

Test Cases
[0, 20] ->

# > - - o # # # # > - - - o # #
#   #   S                     v
*   #             H # # # # # |
|   #                         |
|   #                       S o
|   #                         #
^   H                         #
#                             #
#                             #
#                         H   v
#                         #   |
o S                       #   |
|                         #   |
| # # # # # H             #   o
^                     S   #   #
# # o - - - < # # # # * - - < #

[2, 7, 66] ->

# > - - o # # # # > - - - o # #
#   #   S                     v
o   #             H # # # # # |
|   #                         |
|   #                       S o
|   #                         #
^   H                         #
#                             #
#                             #
#                         H   v
#                         #   |
o S                       #   |
|                         #   |
| # * # # # H             #   o
^                     S   #   #
# # o - * - < # # * # o - - < #

I would have thought this would be more interesting if the values were given as distances from the respective start squares (so for instance the first test case might be 0, 5 and the second might be 2, 60, 37).

@Neil how would you know which start square to use?

Sorry, I assumed that you used the squares in clockwise order, but I guess that wouldn't be very fair for a 2-player game.

@Closevoters: What's unclear about this? If you identify some specific concerns, it will make it easier to fix them so that this can stay open.

My confusion is about the indexing, before and after 60 has been reached and when to mark locations in the home section. I think if you clarified your examples more it would make more sense. Otherwise it looks pretty cool.

Can you clarify safe zones. I see, that there are 4 such zones for each color with 5 cells. And how do we treat them? If bottom safe zone is yellow (which is unclear too), why 66 is the 4th cell from the right in green? (going clockwise) Where is the #60 cell in this zones?

APL (Dyalog Unicode), 204 bytes
(~2|⍳31)\'H'@(g⊂2 9)⊢'S'@(g⊂4 14)⊢('*'@({(60>⍵)⊃⍵,60|⍵+4 3+.×5 12=15|⍵}¨⎕)⊢'o####<---o##^||o####^|||o##>--o####>---o##v||o####v|||o##<--',20⍴'#')@((4⌽g 15,⍨¨⍳15),(g←(15∘-,⊢)(|15 0-⌽)¨,⊢)2,¨14-⍳5)⊢16 16⍴''

Try it online!
It is very likely possible to compress the hardcoded length-60 string, but I'm too lazy :P
A full program that takes a vector of numbers from stdin and prints the board to stdout. Uses lots of @ to place various things at various places, starting from an empty board. This is an interesting use case for an otherwise seldom used built-in @.
Ungolfed with comments
⍝ Hardcoded string of the 80 positions that can be occupied by players
s←'o####<---o##^||o####^|||o##>--o####>---o##v||o####v|||o##<--',20⍴'#'

⍝ Place '*' for actual players' positions
s←'*'@({(60>⍵)⊃⍵,60|⍵+4 3+.×5 12=15|⍵}¨⎕)⊢s
      ({                             }¨⎕)  ⍝ Take input and slide the positions
                    ⍵+4.3+.×5 12=15|⍵      ⍝ If n%15=5, add 4; if n%15=12, add 3
                 60|                       ⍝ Wrap 60 to 0
        (60>⍵)⊃⍵,                          ⍝ Discard change if n is 60 or higher
  '*'@ ... ⊢s  ⍝ Overwrite '*' at players' positions on s

⍝ Helper function to generate positions on 2D board
g←(15∘-,⊢)(|15 0-⌽)¨,⊢  ⍝ Take a vector of coordinates on the right side
                    ,⊢  ⍝ Prepend to self...
          (|15 0-⌽)¨    ⍝   abs((15-y,x)); 90 degrees counterclockwise
  (15∘-,⊢)              ⍝ Take the above and prepend 180 degrees rotation

⍝ Main result
(~2|⍳31)\'H'@(g⊂2 9)⊢'S'@(g⊂4 14)⊢s@((4⌽g 15,⍨¨⍳15),g 2,¨14-⍳5)⊢16 16⍴''
16 16⍴''  ⍝ Empty 16×16 board
s@((4⌽g 15,⍨¨⍳15),g 2,¨14-⍳5)  ⍝ Place the 80 chars around the board
   (4⌽g 15,⍨¨⍳15)              ⍝   First 60 positions on the boundaries
                 ,g 2,¨14-⍳5   ⍝   and the other 20 positions inside
'S'@(g⊂4 14)  ⍝ Place S's
'H'@(g⊂2 9)  ⍝ Place H's
(~2|⍳31)\  ⍝ Insert blank columns

Python 2, 476 bytes
Short 3-line solution (Try it online)
s=map(list,''.join(b if b in'#^v<>-|oSH~'else' '*int(b,16)for b in "#>--o####>---o##~#1#1SAv~o1#6H#####|~|1#C|~|1#BSo~|1#C#~^1HC#~#E#~#E#~#CH1v~#C#1|~oSB#1|~|C#1|~|#####H6#1o~^AS1#1#~##o---<####o--<#").split('~'))
for i in input():x,y=(lambda n:([11-n,15]*12+[0,26-n]*14+[n-26,0]*16+[15,n-41]*14+[71-n,15]*4+[13,n-50]*5+[70-n,13]*5+[2,75-n]*5+[n-65,2]*5)[2*n:2*n+2])((lambda n:4if n in[5,20,35,50]else 3if n in[12,27,42,57]else 0)(i)+i);s[y][x]='*'
for r in s:print' '.join(r)

One-liner in 534 (Try it online):
for r in(lambda B,I:[[[i,j]in map(lambda n:([11-n,15]*12+[0,26-n]*14+[n-26,0]*16+[15,n-41]*14+[71-n,15]*4+[13,n-50]*5+[n-64,13]*5+[2,75-n]*5+[n-65,2]*5)[2*n:2*n+2],map(lambda n:n+4if n in[5,20,35,50]else n+3if n in[12,27,42,57]else n,I))and'*'or b for i,b in enumerate(a)]for j,a in enumerate(B)])(map(list,''.join(b if b in'#^v<>-|oSH~'else' '*int(b,16)for b in"#>--o####>---o##~#1#1SAv~o1#6H#####|~|1#C|~|1#BSo~|1#C#~^1HC#~#E#~#E#~#CH1v~#C#1|~oSB#1|~|C#1|~|#####H6#1o~^AS1#1#~##o---<####o--<#").split('~')),input()):print' '.join(r)

I assume indices of safe zone this way:
#  >  -  -  o  #  #  #  #  >  -  -  -  o  #  #
#     74    S                                v
o     73                   H 75 76 77 78 79  |
|     72                                     |
|     71                                  S  o
|     70                                     #
^     H                                      #
#                                            #
#                                            #
#                                      H     v
#                                      60    |
o  S                                   61    |
|                                      62    |
|  69 68 67 66 65 H                    63    o
^                                S     64    #
#  #  o  -  -  -  <  #  #  #  #  o  -  -  <  #

Explanation (lines are separated a bit for better understanding):
# Hardcode board. Spaces are changed to their number in hex (as there are up to 14 spaces in row)
# Unfortunatly v^<> characters made board non-symmetrical and replacing chars costs too much in python, so I had to hardcode it all
B="#>--o####>---o##~#1#1SAv~o1#6H#####|~|1#C|~|1#BSo~|1#C#~^1HC#~#E#~#E#~#CH1v~#C#1|~oSB#1|~|C#1|~|#####H6#1o~^AS1#1#~##o---<####o--<#"

# Encode board to list of lists of characters
s=map(list,''.join(b if b in'#^v<>-|oSH~'else' '*int(b,16)for b in B).split('~'))

# Map coordinates, based on n (awfully long)
# Creates long list (lenght of 80) with values based on n and only one valid, which occures under index n
l=lambda n:([11-n,15]*12+[0,26-n]*14+[n-26,0]*16+[15,n-41]*14+[71-n,15]*4+[13,n-50]*5+[70-n,13]*5+[2,75-n]*5+[n-65,2]*5)[2*n:2*n+2]

# Returns additional move of n if it appers to be on slide start
j=lambda n:4if n in[5,20,35,50]else 3if n in[12,27,42,57]else 0

# Here takes input as list of numbers, get coordinates for them and update board with *
for i in input():x,y=l(j(i)+i);s[y][x]='*'

# Print board, spacing characters with one whitespace
for r in s:print' '.join(r)

05AB1E, 169 bytes
11Ý₅+R14L17*R15Ý¤DL17*+¤3Lα4Ý©17*DƵ—αs19+®Ƶ_+s®48α)˜•1ŠΓ;Ü|má•Ƶªв•5–à†@1δ!•Ƶ§в‡Iè'*•3‡Ù¬¨èˆ‚1æ°þBÚ•" #
0o1HS"ÅвJ.BD€SøíJ‚øJ»∊2ä`¶¡í»«8Å120Å0«">>v^v^<<"„-|S5×Jº«S.;rǝS¶¡»

Try it online or verify all test cases.
Explanation:
We start by creating a list of all possible coordinates of the * on the finished board.
The list we want to create for the 0-based indices is:
[266,265,264,263,262,257,260,259,258,257,256,255,187,221,204,187,170,153,136,119,34,85,68,51,34,17,0,4,2,3,4,5,6,7,8,13,10,11,12,13,14,15,83,49,66,83,100,117,236,151,168,185,202,219,236,253,270,266,268,267,251,234,217,200,183,222,223,224,225,226,19,36,53,70,87,48,47,46,45,44]

The duplicated coordinates are for the positions that are on the start of a slider, which end up at the end of the slider.
Using a straight-forward compressed list would be 86 bytes:
•€l:å–£²voùäÉÿ¢º(ºT≠εÁ~нΣûÑ‚Ćδ·нäVø<:‘.IWÚC¯ht;t∍W₂zþ#6÷(›ǝé$)‚ιô.!=É/g=Ë₁Ìjh:½~₃Y•Ƶ«в

But instead, we create the list manually in 79 bytes:
11Ý           # Push a list in the range [0,11]
   ₅+         # Add 255 to each
     R        # And reverse it
14L           # Push a list in the range [1,14]
   17*        # Multiply each by 17
      R       # And reverse it
15Ý           # Push a list in the range [0,15]
¤             # Push its last value (15) (without popping the list itself)
 D            # Duplicate it
  L           # Create a list in the range [1,15]
   17*        # Multiply each by 17
      +       # And add the 15 to each
¤             # Push its last value (270) without popping the list itself)
 3L           # Push a list in the range [1,3]
   α          # Take the absolute difference of each value with 270
4Ý            # Push a list in the range [0,4]
  ©           # Store it in variable `®` (without popping)
   17*        # Multiply each by 17
      D       # Duplicate this list
       Ƶ—     # Push compressed integer 251
         α    # And take the absolute difference of each value with this 251
s             # Swap so the duplicated list of [0,4] * 17 is at the top again
 19+          # Add 19 to each
®             # Push the list in the range [0,4] again from variable `®`
 Ƶ_           # Push compressed integer 222
   +          # Add it to each
s             # Swap the two lists at the top of the stack
®             # Push the list in the range [0,4] once again from variable `®`
 48α          # Take the absolute difference of each value with 48
)             # Now wrap all lists on the stack into a list
 ˜            # And flatten it to a single list

# And finally adjust this list with the slider positions:
•1ŠΓ;Ü|má•    # Push compressed integer 108136777658162939
          Ƶª  # Push compressed integer 270
            в # Convert the larger integer to base-270 as list:
              #  [1,9,32,102,134,238,261,269]
•5–à†@1δ!•    # Push compressed integer 391758411553146080
          Ƶ§  # Push compressed integer 267
            в # Convert the larger integer to base-267 as list
              #  [4,13,83,34,236,187,257,266]
‡             # Transliterate; replace all values of the first list with the values of
              # the second list in the big list we created earlier

Now that we have this list of coordinates for the *, we use the input to get the positions:
I             # Push the input-list
 è            # Index it into the list we created
'*           '# Push a "*" (which we will use later on)

Now we are going to create the empty board (without the space columns for now). We do this as follows:
•3‡Ù¬¨èˆ‚1æ°þBÚ•
              # Push compressed integer 68098022849564198525854900638097
 " #\n0o1HS"  # Push this string
  Åв          # Convert the large integer to base-" #\n0o1HS", which means it's converted
              # to base-length, and then indexed into the string
    J         # And join the entire list of characters to a string

We now have a quarter of the board as template (without trailing spaces):
#100o###
# # S
o #
0 #
0 #
0 #
1 H
#

Which we'll use to create the entire board:
.B            # Box it. This will split on newlines, but also make all lines of equal
              # length by adding trailing spaces
  D           # Duplicate this list of lines
€S            # Convert each line to a list of characters
  ø           # Zip/transpose; swapping rows/columns
   í          # Reverse each row
              # (`øí` basically rotates a character-matrix once clockwise)
    J         # Join each inner list together to a string
‚             # Pair it with the list of strings we duplicated
 ø            # Zip/transpose; swapping rows/columns
  J           # Join the pair of lines together
   »          # And join the lines by newlines

We now have halve the board:
#100o####1000o##
# # S          1
o #      H#####0
0 #            0
0 #           So
0 #            #
1 H            #
#              #

And we'll continue:
∊             # Mirror vertically
 2ä           # Split it into two halves
   `          # Pop and push both halves separated to the stack
¶¡            # Split the top list on newlines again
  í           # Reverse each row
   »          # Join it by newlines
«             # And then merge it back to the first halve

# And now we'll fix the arrows and lines:
8Å1           # Push a list of 8 1s
   20Å0       # Push a list of 20 0s
       «      # Merge those two together
">>v^v^<<"    # Push this string
„-|           # Push string "-|"
   S          # Convert it to a pair of characters: ["-","|"]
    5×        # Repeat each 5 times: ["-----","|||||"]
      J       # Join it together to a string "-----|||||"
       º      # Mirror it horizontally: "-----||||||||||-----"
        «     # Append it to the arrows-string
          S   # Convert it to a list of characters
.;            # Replace each of the 1s/0s one-by-one with these characters in the board

So we end up with our completed empty board (without space columns):
#>--o####>---o##
# # S          v
o #      H#####|
| #            |
| #           So
| #            #
^ H            #
#              #
#              #
#            H v
#            # |
oS           # |
|            # |
|#####H      # o
^          S # #
##o---<####o--<#

Then we'll place the "*" we pushed earlier at the positions we calculated earlier:
r             # Reverse the values on the stack
 ǝ            # Insert the "*" at the position of the list in the board-string

And finally we fix the space-columns, and output the result:
S             # Convert the entire board to a list of characters
 ¶¡           # Split it on newlines
   »          # Join each inner list by spaces, and then each line by newlines
              # (after which the result is output implicitly)

See this 05AB1E tip of mine (sections How to compress large integers? and How to compress integer lists?) to understand how the compression works.
I've used this 05AB1E tip to generate the quarter board.


text:
ASCII-Art Zombie Invasion Simulation
To simulate a zombie invasion, start with a grid of # and  representing the map:
##   ##
###   #
## ##
  # ###
#  ####

# represents land.
 represents water.

The zombies start at a point on the map...
##   ##
###   #
## %#
  # ###
#  ####

...and spread. % denotes land infected by zombies.
However, zombies cannot swim. They can move across land in the same way a king moves in chess - one square in any diagonal or orthogonal direction:
!!!
!%!
!!!

At the end of the simulation, some land will be infected with zombies:
%%   ##
%%%   #
%% %%
  % %%%
#  %%%%

Your task is to simulate the zombie invasion. Write a program (or function) that takes as input a string representing the initial state of the grid, and two numbers representing the coordinates of the initial zombie. The program should output (or return) the final state of the invasion.
Specifications

Your program may print an optional trailing newline.
You can assume the input will be in the correct format (padded with spaces), with an optional trailing newline.
You can assume the initial zombie will start on land and will not die immediately.
This is code-golf, so the shortest answer (in bytes) wins.
-100% bonus if your code can also solve the Halting Problem for arbitrary Turing machines.
Your program should handle board widths of up to 50 chars.

what is halting problem?

@MukulKumar https://en.wikipedia.org/wiki/Halting_problem. It's a joke. The Halting Problem is impossible to solve.

you never know :P

@MukulKumar Well, It's hard to argue with a proof. Turing knew what he was doing (And if he didn't, than no computer scientist knows what they're doing.)

Do we need to output every step or just final stage?

So, all we need to do is prove mr.turing wrong and we win this challenge !! YAY!

@MukulKumar Just the final step.

Is there any specific height-width or (max) height-width ?

Let's say size < 50

Related: http://codegolf.stackexchange.com/questions/83808/flood-fill-a-2d-grid

No, seriously, I'd lift the bonus for the halting problem solution to -200%. The answer would deserve it. :)

@RudolfL.Jelínek But that adds an incentive to write a long program that solves the halting problem which makes it basically code-bowling :-)

Surprised nobody has done this in vi yet.

APL (Dyalog), 44 bytes
{{c'%'[⌊⌿'%#'∊¨⍵(c←4⊃⍵)]}∘,⌺3 3⍣≡'%'@(⊂⍺)⊢⍵}

Try it online!
Assumes ⎕IO←0.
Left argument: 0-indexed row r of %, 0-indexed column c of %: r c
Right argument: Character matrix

Kotlin, 283 218 bytes
Unnamed lambda (with a nested function, heh).
Golfed
{i:String,x:Int,y:Int->val m=i.lines().map{it.toCharArray()};fun v(x:Int,y:Int){try{if(m[y][x]=='#'){m[y][x]='%';for(c in-1..1)for(d in-1..1)if(!(c==0&&d==0))v(x+c,y+d)}}catch(e:Exception){}};v(x, y);m.map(::println)}

Ungolfed
fun zombies(input: String, startX: Int, startY: Int) {
    val m = input.lines().map(String::toCharArray)      // build game map
    fun invade(x: Int, y: Int) {                        // nested functions, woo!
        try {
            if (m[y][x] == '#') {                       // if land
                m[y][x] = '%'                           // mark as invaded
                for (dx in -1..1) {                      // generate neighbour tiles
                    for (dy in -1..1) {
                        if (!(dx == 0 && dy == 0)) {
                            invade(x + dx, y + dy)        // attempt to invade neighbours
                        }
                    }
                }
            }
        } catch(e: Exception) {}                        // catches ArrayIndexOutOfBounds
    }

    invade(startX, startY)                              // start the invasion
    m.map(::println)                                    // print final state
}

Saved quite a few bytes by switching to a recursive solution.

"fun zombies" :P

JavaScript (ES6), 144 bytes
(s,x,y,l=s.search`\n`,g=s=>s==(s=s.replace(eval(`/(#|%)(.?[^]{${l-1}}.?)?(?!\\1)[#%]/`),`%$2%`))?s:g(s))=>g(s.slice(0,x+=y*l)+`%`+s.slice(x+1))

Where \n represents the literal newline character. Takes 0-indexed coordinates.

Befunge, 324 323 bytes
&00p&10p20p~$v<p02+g02*!g02:+1$$$$<
 #<%>\"P"/8+p>1+:::~:0`!#v_:85+`!#^_2%\2%3*1+*\2/:"P"%\"P"/8+g+\2/:"P"
:+**73"="+g00*g02g010$$$$<v
02:\-<v/"P"\%"P":/2::_|#:$<:+1+g02\+g02:\-1+g02:\+1:\-1:\+1-g
\:20g^>g:30p\2%3*1+/4%1->#^_::2%6*2+30g+\2/:"P"%\"P"/p:20g-1-
0<v2\g+8/"P"\%"P":/2::<\_@#`0:-g
2^>%3*1+/4%1g,1+:20g%#^_1+55+,\

Try it online!
Explanation
Implementing this in Befunge was a little bit complicated because we're limited to 80x25 characters of "memory" which has to be shared with the source code itself. The trick to fitting a 50x50 map into that area was to flatten the 2D map into a 1D array with two map locations per byte. This 1D array is then wrapped into a 2D array again so that it can fit in the 80 character width of the Befunge playfield.
The infection algorithm starts by converting the initial coordinates into an offset in the 1D array which it pushes onto the stack. The main loop takes a value from the stack and looks up the map state for that offset. If it's uninfected land, it gets marked as infected, and eight new offsets are pushed onto the stack (representing the land all around the current position). This process continues until the stack is empty.
To avoid having to check for out of range values, the map is stored with a one character water border around all the edges.

Pip, 59 bytes
{(ac+b+b*Ya@?n):'%L2*#aa:RVaR.`#(.?.?.{`.y-1.`})?%`'%.@>_a}

A function that takes a multiline string, the row of the initial zombie (0-indexed), and the column of the initial zombie (0-indexed). Try it online!
How?
Because Pip has cyclical indexing (usually a good thing, but bad for this problem because we don't want the map edges to wrap), I went for a regex-replacement solution.
Ya@?n finds the index of the first newline (i.e. the width of the grid) and yanks it into y.
(ac+b+b*Ya@?n):'% after doing the above, computes (width + 1) * row + col, i.e. c+b+b*y, and sets the character at that index to %.
L2*#a loops 2*len(a) times, which gives us enough iterations for the flood fill to fully propagate and makes sure the iteration count is even (that's important).
.`#(.?.?.{`.y-1.`})?%` constructs a regex that matches a # followed by a %, with either 0, width-1, width, or width+1 characters in between. (The . at the beginning makes . in the regex match newlines.) This regex matches any of the following configurations:
#
 %

 #
 %

  #
 %

#%

aR ... '%.@>_ replaces matches of this regex with the character % prepended to . all but the first character @> of the match _; in short, replacing the # with %.
a:RV ... reverses that and assigns it back to a. We reverse because the regex only matches # before % in the string, not after; but when the string is reversed, after becomes before and we can match it on the next iteration. This is also why the number of iterations has to be even.
After the loop is complete, we simply return the modified value of a.

TSQL, 267 bytes
Golfed:
USE master
DECLARE @ varchar(max)=
'##   ##
###   #
## %#
  # ###
#  ####'

WHILE @@rowcount>0WITH C as(SELECT x+1i,substring(@,x+1,1)v,x/z r,x%z c
FROM spt_values CROSS APPLY(SELECT number x,charindex(char(10),@)z)z
WHERE type='P'and x<len(@))SELECT @=stuff(@,d.i,1,'%')FROM C,C D
WHERE'#%'=d.v+c.v and abs(c.r-d.r)<2and abs(c.c-d.c)<2PRINT @

Ungolfed:
USE master-- the script needs to be executed on the default master database
DECLARE @ varchar(max)=
'##   ##
###   #
## %#
  # ###
#  ####'

WHILE @@rowcount>0
WITH C as
(
  SELECT x+1i,substring(@,x+1,1)v,x/z r,x%z c
  FROM
    spt_values
  CROSS APPLY(SELECT number x,charindex(char(10),@)z)z
  WHERE type='P'and x<len(@)
)
SELECT @=stuff(@,d.i,1,'%')FROM C,C D
WHERE'#%'=d.v+c.v and abs(c.r-d.r)<2and abs(c.c-d.c)<2

PRINT @

Try it out

PHP, 209 189 188 183 bytes
may be golfable
for($w=strpos($s=($a=$argv)[1],10),$s[$a[2]*++$w+$a[3]]="%";$t<$s;)for($t=$s,$i=0;""<$c=$s[$i++];)if($c>"$")for($y=-2;++$y<2;)for($x=3;$x--;)$s[$p=$i+$y*$w-$x]>"!"?$s[$p]="%":0;echo$s;

Run with php -r '<code>' '<grid>' <y> <x>

J, 152 Bytes
Not very well golfed, I'm sure there's a way to remove those last few control structures.
f=:4 :0
c=.(' '"_)`({~&<y)@.((*./y<$x)*.*./y>:0 0)x if.c='#' do.x=.'%'(<y)}x[i=.0 while.i<9 do.i=.>:i[x=.x f y+i<:@(|~,<.@%)3 end.end.x
)
g=:>@cutLF@[f]

Implements a flood fill algorithm. The function g formats input into a character array before applying f.
Note that coordinates are a bit weird:
0, 0

is the top left corner. Increasing the first coordinate:
1, 0

Moves the position down in the y direction.
Other than that coordinates are normal.
Example:
    land =: 0 : 0    NB. Define a multi-line string
##   ##
###   #
## ##
  # ###
#  ####
)

    ] l =. >@cutLF land    NB. Cut 'land' on new lines, and form into an array. Assign to 'l'
##   ##
###   #
## ##
  # ###
#  ####
    NB. Looks the same, but it isn't.

    '%' (<2 3)} l    NB. 'Infect' the land at 2, 3
##   ##
###   #
## %#
  # ###
#  ####

    l f 2 3    NB. Flood fill on l (already formatted), starting at 2 3
%%   ##
%%%   #
%% %%
  % %%%
#  %%%%

    land g 2 3    NB. Flood fill on land, formats for us.
%%   ##
%%%   #
%% %%
  % %%%
#  %%%%


text:
Print Polyglot Pieces
Typically, polyglots are constructed in such a manner that each language can ignore parts of the code that are present for other languages, by wrapping them in string literals, using comment syntax, or other similar tricks.
Your goal is to write a polyglot where the output for each language is the code from the polyglot that produces that output. Specifically, the output must be constructed from the polyglot code with only deletions, and it must be a quine in the given language.
Rules

Only proper quines are allowed (no reading the source code, no taking input, output must be to STDOUT or closest alternative if STDOUT is not an option, and the programs must consist of more than just literals that are implicitly printed).
Since different languages can use different encodings, the raw bytes are what matters here. For example, if language A uses UTF-8 and language B uses CP437, the (hex) code C3 88 46 47 would be ÈFG for language A and ├êFG for language B.
All outputs must be distinct (again, comparing raw bytes). This avoids complications with trying to restrict minor language versions - if two languages use the same part of the code to do the same thing, you can't claim them both.

If you have two languages A and B such that XY is a valid output in both, but YZ is also valid in B, you may choose XY as the output for A and YZ as the output for B, so you can claim both of them in your score (but you can't claim XY for both languages because of the above rule).

All outputs must be as short as possible. For example, if your code was print('foo')#something, for Python 3 (ignoring the fact that the output is not correct), the code you would need to output would be print('foo'), and print('foo')# would not be allowed. If there are multiple strings of equal (minimal) length that produce correct output, you may choose any one of them.
Submissions must be polyglots in at least 2 languages.
Your score will be given by (number of programming languages with distinct outputs)**3/(total byte size of polyglot). The highest score wins. In the event that two submissions achieve the same score, the submission that reached that score first will win.

The second to last rule sounds like we need to prove that it's impossible to golf the resulting quine any further by any other possible set of deletions. Is that intentional?

Related.

How do you define "deletions" in the case of a language whose commands aren't 8 bits long? Do you delete from the source a command at a time, or a byte at a time?

@MartinEnder Good faith can be assumed. Unless someone finds a shorter quine that can be formed from the polyglot, the answer is trusted to be valid.

@ais523 Everything is done at the byte level.

Are programs allowed to give errors (after outputting the source code to STDOUT)?

@KritixiLithos Yes

GolfScript + CJam + Fission 2 + Jelly, 4 languages, 24 bytes, score 2.667
Let's start with the hex dump:
00000000:  3322 3024 700a 2721 2b4f 5222 0a3c 3024 700a 6523 7fff cccc

For GolfScript, CJam and Fission 2, we interpret this in some ASCII-compatible single-byte encoding like ISO 8859-1 (the exact encoding doesn't really matter, because the languages only define operators for ASCII characters anyway):
3"0$p
'!+OR"
<0$p
e#<DEL>ÿÌÌ

Where <DEL> is the control character 0x7f.
In Jelly, this is assumed to be in Jelly's own code page, where it looks like this instead:
3"0$p½'!+OR"½<0$p½e#¶”ṘṘ

GolfScript
The e on the last line is an unknown variable and # comments out the remainder of the line, so this prints
"0$p"
0$p

with a trailing linefeed. This is the GolfScript/CJam polyglot version of the standard quine:
".p"
.p

Try the polyglot. | Try the quine.
CJam
Here, e# comments out the last line, so almost identically, this prints
"0$p"
0$p

without a trailing linefeed.
Try the polyglot | Try the quine.
Fission
Fission only sees the second line which is the standard Fission quine, so it prints
'!+OR"

I can't provide an online link for the polyglot here, because TIO sends the file to Fission as UTF-8, but Fission reads the source byte by byte, which makes the last line too long. However, I've tested this locally with an ISO 8859-1 encoded file (in which the last line has the same length as the second), to confirm that this works.
Try the quine.
Jelly
The pilcrow is an alias for linefeeds in Jelly, so the source is equivalent to:
3"0$p½'!+OR"½<0$p½e#
”ṘṘ

All but the last line of a Jelly program are "helper links" (i.e. functions) which can be ignored unless they are called, provided they are syntactically valid. This is actually the reason the 3 comes first in the CJam and GolfScript programs, because otherwise the " can't be parsed in Jelly.
Otherwise, since the function isn't called, the program is equivalent to only its second line, which is the standard Jelly quine.
Try the polyglot. | Try the quine.

><> + Python, 2 languages, 51 46 bytes, score~=0.16 0.17
Since there are no answers yet, I'll start with a simple one
#.09;!?lo}*2+2f"
_='_=%r;print _%%_';print _%_

Try it for ><> and Python
For ><> the first line is a quine (# reflects, " puts the whole line on the stack, then we push 34 (charcode for ") and print everything) , execution never moves from it, so it effectively ignores the rest of the code.
For Python the first line is a comment, while the second one is a quine (standard approach in python, using string substitution with the same string as both arguments).

Slight adaptation on the ><> answer can save you some bytes :- #"~r10gol?!;60.| !

@Tealpelican Thank you for reminding me the use of .! I adapted my quine using this approach, though I prefer to keep the string in reverse (since this saves bytes) and to avoid using g (since it could be interpreted as "reading the source code")

That's a pretty fair point for not using g. Having a look and a little think about it, you can reduce it even further by using the # (ascii 35) from the stack to get your " like; #.09;!?lo}-1"

JavaScript + Python 2 + Japt, 3 languages, 132 bytes, score ~= 0.205
A="`i96d)p2`i96d)p2";1//2;A=1
S="S=%s;console.log(S,uneval(S))";A//2;S="S=%r;print S%%S";"""
console.log(S,uneval(S))//""";print S%S

This prints
S="S=%s;console.log(S,uneval(S))";console.log(S,uneval(S))

in JavaScript (only in Firefox),
S='S=%r;print S%%S';print S%S

in Python 2, and
`i96d)p2`i96d)p2

in Japt. (Test it online!)
JavaScript
This is what JavaScript sees:
A="`i96d)p2`i96d)p2";1
S="S=%s;console.log(S,uneval(S))";A
console.log(S,uneval(S))

The first line is a no-op because A is not used in any way. The second line sets S to the string S=%s;console.log(S,uneval(S)), and the third prints it after replacing the %s with the unevaled representation of S (just S wrapped in quotes). The result is a quine in JavaScript.
Python
This is basically what Python sees:
A="`i96d)p2`i96d)p2";1//2;A=1
S="S=%s;console.log(S,uneval(S))";A//2;S="S=%r;print S%%S"
print S%S

The first line is pretty much a no-op; the only important part is the A=1 at the end. This turns A into a number so that the integer division A//2 on the second line doesn't throw an error.
The second line is mostly the same way, except it sets S to the string S=%r;print S%%S. The third line prints S after replacing the %r with the raw representation of S (just S wrapped in single-quotes). The result is a quine in Python 2.
Japt
This is the JavaScript code the Japt interpreter sees:
A="`i96d)p2`i96d)p2";1//2;A=1
S="S=%s;console.log(S,uneval(S))";A//2;S="S=%r;print S%%S";"","\nconsole.log(S,uneval(S))//","";.p("r".i("n".t(),S%S))

As you can see, it's mostly the same as the JavaScript answer, with one main exception: the last two lines are combined. As a result, this is what the interpreter actually sees:
A="`i96d)p2`i96d)p2";1
S="S=%s;console.log(S,uneval(S))";A

The first line sets A to the Japt quine, and the second sets S to part of the JS quine. In Japt however, only the last expression is sent to output; this is A, so the output is `i96d)p2`i96d)p2.

What is uneval? Doesn't work for me

@Cyoce https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/uneval It only works in Firefox though.

Jolf + ><>, score = 2**3/15 = 0.533....
"r0:g>o<
"Q«Q«

Working on adding another language to this.

><>, Python 2 and 3, 3 languages, 107 bytes, score = 27/107 ~= 0.252
#o<}-1:"
a=1/1is 1;b="(_%(_,b))"[a:-a|9];_='a=1/1is 1;b="(_%%(_,b))"[a:-a|9];_=%r;print %s';print (_%(_,b))

Try it online: Python 2, Python 3, ><>
The Python 3 output is the second line exactly, and the Python 2 output is this quine. The ><> output is the first line.
Explanation
This program is based off of the classic Python 2 quine:
_='_=%r;print _%%_';print _%_

First, to make it compatible with both Python 2 and Python 3, I changed the print statement to a function call, and added an extra space which will come in handy later:
_='_=%r;print (_%%_)';print (_%_)

Next, I needed a way to distinguish Python 2 from Python 3. One of the simplest ways is to take advantage of the fact that / is integer division in Python 2, but float division in Python 3. Thus, the following code evaluates to True in Python 2, but False in Python 3:
1/1is 1

In order to make the outputs distinct between the two languages, I needed to selectively remove the first and last parentheses in the print call (that's why I needed the space earlier - with no space, it wouldn't be a valid print statement in Python 2). Thus, I needed to modify the quine harness like so:
a=1/1is 1;b="(_%(_,b))"[a:-a|9];_='a=1/1is 1;b="(_%%(_,b))"[a:-a|9];_=%r;print %s';print (_%(_,b))

That expression a:-a|9 evaluates to 0:9 in Python 2 and 1:-1 in Python 3. Thus, b is "(_%(_,b))" in Python 3, but in Python 2 the first and last characters are discarded, leaving _%(_,b). And with that modification, the polyglot was valid for this challenge.
As suggested by Teal pelican, the ><> quine #o<}-1:" could be added fairly easily, thanks to the fact that # begins a single-line comment in Python. Simply prepending it and a newline adds another language and increases the score by nearly tenfold.

Python 2 + Retina, 2 languages, 55 bytes, score = 2^3/55 ≈ 0.145
I used $n instead of ¶ to keep them both valid ASCII.
S='S=%r;print S%%S';print S%S#|
#$n\(*S1`$n\(*S1`
#\`#

Python, Retina
Python:
S='S=%r;print S%%S';print S%S

Retina:

\(*S1`
\(*S1`

><> + Pyke + Python 2, 81 bytes, score = 3**3/81 ~0.333
"""r00gol?!;60.
a=%r;print a%%a"""#);"34.Cp\D\Es"DEp00/
a=__doc__[-15:]
print a%a

I've tried to do something different with all the languages.
><> sees:
"""r00gol?!;60.

This is a slight modification of the standard ><> quine to use a triple quoted string at the beginning. This allows the ending triple quotes for Python to be on a different line.
Try it online!
Pyke sees:
"34.Cp\D\Es"DEp00/

I hadn't created a quine in Pyke before and thus had to think of one. I used traditional quining techniques to create a string and then eval it with itself as an input. Note for this to work without visual impact, warnings will have to be disabled. Errors out with a division by 0 error in the generation step.
Try it here! Or just the quine part.
Python sees:
It all. Python uses all of the code to produce its quine. I decided to embed the quine part in the docstring (though ultimately it would save bytes to remove but I think it's cool). It's a modification of the standard quining technique.
Try it online!


text:
Generate me a QFP chip!
Generate me a QFP chip!
From the sandbox!
QFP is a type of form factor for an electrical component where pins come out the sides of a chip.  Here are is a picture of a typical QFP component:

you can see that the general formula is to have 4 sides of equal numbers of pins.
Your challenge is to create a program that takes in an integer, thich represents the number of pins on one side, and creates an ASCII QFP component with numbered pins.
Input:
a single integer which represents the number of pins on one side
Output:
An ASCII QFP chip with an apropriate pinout.
Example:
input:1

  4
 ┌┴┐
1┤ ├3
 └┬┘
  2

input:2

  87
 ┌┴┴┐
1┤  ├6
2┤  ├5
 └┬┬┘
  34

input:12

   444444444333
   876543210987
  ┌┴┴┴┴┴┴┴┴┴┴┴┴┐
 1┤            ├36
 2┤            ├35
 3┤            ├34
 4┤            ├33
 5┤            ├32
 6┤            ├31
 7┤            ├30
 8┤            ├29
 9┤            ├28
10┤            ├27
11┤            ├26
12┤            ├25
  └┬┬┬┬┬┬┬┬┬┬┬┬┘
   111111122222
   345678901234

Rules:

all QFP chips must be enclosed and sealed as well as ascii provides. spacing is of utmost importance. Dust inside a microprocessor is bad stuff!
pin numbering must be done as in the examples (Read left to right, top to bottom, numbered counter clockwise)
You may start numbering at 0, but this must not affect the chip (an input of 12 still needs 12 pins per side)
The only valid characers in your output are 1,2,3,4,5,6,7,8,9,0,┌,┴,┐,├,┘,┬,└,┤, spaces, and newlines.
all encodings for languages are allowed, but your output MUST be consistent with the rules above.

This is a codegolf, and as such, The code with the least number of bytes wins! Good Luck!

Does zero need to be handled.

No, you do not.

Any upper limit on the input?

@Arnauld only limits should be overflows and language-based limits

is this really kolmo complexity?

"all QFP chips must be enclosed and sealed as well as ascii provides." Half of the given characters aren't ASCII.

Mathematica, 271 bytes
c=Table;d=StringPadLeft[#<>"\n",(b=IntegerLength[4a])+a+2]&/@(#)&;d@Reverse@#4<>{e=" "~c~b,"┌"<>"┴"~c~a,"┐
",({#,"┤"," "~c~a,"├",#2,"
"}&)~MapThread~{#,Reverse@#3},e,"└","┬"~c~a,"┘
",d@#2}&@@Partition[Characters@StringPadLeft[ToString/@Range[4#]],a=#]&

Anonymous function. Takes a number as input and returns a string as output. The non-box-drawing Unicode character is U+F3C7 (private use) for \[Transpose].

Kotlin, 397 393 bytes
Unnamed lambda.
You can try it here, but you'll have to paste the source in yourself because the editor doesn't seem to save programs in UTF-8 encoding. The ungolfed version is a full program, so you should be able to use that in its entirety.
Golfed
{n:Int->operator fun String.mod(x:Int){(1..x).map{print(this)}};val l={s:String->s.padStart(n/10+2)};var s=(1..n).map{"${n*4+1-it}".reversed()};val z={i:Int->l(" ")%1;s.map{print(it.getOrElse(i,{' '}))};"\n"%1};(s[0].length-1 downTo 0).map(z);l("┌")%1;"┴"%n;"┐\n"%1;(1..n).map{l("$it┤")%1;" "%n;"├${n*3+1-it}\n"%1};l("└")%1;"┬"%n;"┘\n"%1;s=(1..n).map{"${n+it}"};(0..s.last().length-1).map(z)}

(Sort of) Ungolfed
fun main(args: Array<String>) {
    var q = { n: Int ->
        operator fun String.mod(x: Int) {
            (1..x).map { print(this) }
        }

        val l = { s: String ->
            s.padStart(n / 10 + 2)
        }

        var s = (1..n).map { "${n * 4 + 1 - it}".reversed() }

        val z = { i: Int ->
            l(" ")%1
            s.map { print(it.getOrElse(i, { ' ' })) }
            "\n"%1
        }

        (s[0].length - 1 downTo 0).map(z)

        l("┌")%1
        "┴"%n
        "┐\n"%1

        (1..n).map { l("$it┤") % 1;" " % n;"├${n * 3 + 1 - it}\n" % 1 }

        l("└")%1
        "┬"%n
        "┘\n"%1

        s = (1..n).map { "${n + it}" }
        (0..s.last().length - 1).map(z)
    }

    q(30)
}

Saved a bunch of bytes by overloading the % operator and using it to print. I'll probably revisit this later - I think I can save quite a few bytes if I use mod or some other operator as a concatenation function. More interpolation and less print calls.

Sure, let me include a full program.

@tuskiomi You should be able to use the ungolfed version in its entirety now.

An excellent solution!

Python 2, 352 343 331 bytes
def q(n,j=''.join,k='\n'.join,m=map):a,b,c,d=zip(*[iter(m(str,range(n*4)))]*n);l=len(`n-1`);r=lambda x:k(m(lambda s:' '*(l+1)+j(s),m(j,[m(lambda t:t or' ',v)for v in m(None,*x)])));return k([r(d[::-1]),' '*l+u'┌'+u'┴'*n+u'┐',k(x.rjust(l)+u'┤'+' '*n+u'├'+y for x,y in zip(a,c[::-1])),' '*l+u'└'+u'┬'*n+u'┘',r(b)])

Try it here. Note the file must start with the UTF-8 BOM \xef\xbb\xbf for the unicode literals to work in the standard CPython interpreter.  These 3 bytes are counted against the size here.  repl.it is already using unicode so the link just has the code shown here.
Thanks @tuskiomi for the encoding idea that saved 9 21 bytes.
Partially ungolfed:
def q(n):
  a,b,c,d = zip(*[iter(map(str,range(n*4)))]*n) # get numbers for sides
  l = len(`n-1`) # left padding
  r = lambda x: '\n'.join(
    map(lambda s: ' '*(l+1) + ''.join(s), # padding and row of digits
      map(''.join,
        [map(lambda t: t or ' ', v)  # rows of digits with spaces where missing
          for v in map(None, *x)]))
  )
  return '\n'.join([
    r(d[::-1]), # top row in reverse order
    ' '*l+u'\u250c'+u'\u2534'*n+u'\u2510', # top border
    # 1st, 3rd (reversed) side numbers
    '\n'.join(x.rjust(l) + u'\u2524'+ ' '*n + u'\u251c' + y for x,y in zip(a,c[::-1])),
     ' '*l+u'\u2514'+u'\u252c'*n+u'\u2518', # bottom border
    r(b) # bottom numbers
  ])

Consistent, and fast. Wonderful!

strange. Online, this prints out perfectly. however on my computer's IDLE, it prints out literals instead of code points. Still a valid answer, but you may be able to golf it down further by using the actual characters instead of codepoints!

I thought I would need # -*- coding: utf-8 -*- plus a newline to the top for the interpreter to accept it.  The UTF-8 encoding of each of those characters is 3 bytes, so it wasn't enough to pay for the cost of the encoding directive.  I just checked PEP 263 though and I can get away with just #coding=utf-8 and a newline so it will save some bytes.

The three-byte UTF-8 BOM apparently also works.

JavaScript (ES6), 295 284 bytes (268 chars), non-competing
n=>(a=[...(' '[r='repeat'](W=n+6)+`
`)[r](W++)],a.map((_,i)=>i<n*2&&([p,s,L,R,C]=i<n?[(i+3)*W-1,1,i+1,n*3-i,0]:[i-n+3-W,W,n*5-i,i+1,1],[...(' '+L).slice(-2)+'┤┴'[C]+' '[r](n)+'├┬'[C]+R].map(c=>a[p+=s]=c))),[2,3,W-4,W-3].map((p,i)=>a[W*p+2-6*(i&1)]='┌┐└┘'[i]),a.join``)

This code doesn't support pin numbers above 99 and therefore probably doesn't qualify as a fully valid entry. That's why I mark it as non-competing for now.
It could be easily modify to support an arbitrary large number of pins by using wider static margins around the chip. However, that may infringe the rules as well (not sure about that). Fully dynamic margins would cost significantly more bytes.
Demo

let f =

n=>(a=[...(' '[r='repeat'](W=n+6)+`
`)[r](W++)],a.map((_,i)=>i<n*2&&([p,s,L,R,C]=i<n?[(i+3)*W-1,1,i+1,n*3-i,0]:[i-n+3-W,W,n*5-i,i+1,1],[...(' '+L).slice(-2)+'┤┴'[C]+' '[r](n)+'├┬'[C]+R].map(c=>a[p+=s]=c))),[2,3,W-4,W-3].map((p,i)=>a[W*p+2-6*(i&1)]='┌┐└┘'[i]),a.join``)

console.log(f(2))
console.log(f(4))
console.log(f(12))

Java 11, 451 425 393 bytes
n->{int d=(n+"").length(),i,j=-1,l=(int)Math.log10(n*4);String p=" ".repeat(d),P=p+" ",r=P;for(;j++<l;r+="\n"+(j<l?P:p))for(i=n*4;i>n*3;)r+=(i--+"").charAt(j);r+="┌"+"┴".repeat(n)+"┐\n";for(i=0;i<n;r+="├"+(n*3-i+++1)+"\n")r+=p.substring((i+"").length())+i+"┤"+" ".repeat(n);r+=p+"└"+"┬".repeat(i)+"┘\n"+P;for(j=-1;j++<l;r+="\n"+P)for(i=n;i<n*2;)r+=(++i+"").charAt(j);return r;}

-26 bytes thanks to @ceilingcat.
Explanation:
Try it online.
n->{                      // Method with integer parameter and String return-type
  int d=(n+"").length(),  //  The amount of digits of the input
      i,j=-1,             //  Index integers
      l=(int)Math.log10(n*4);
                          //  Amount of digits of 4x the input, minus 1
  String p=" ".repeat(d), //  Padding String for the corners, set to `d` amount of spaces
         P=x+" ",         //  Padding String for the numbers, set to one additional space
         r=P;             //  Result-String, starting at `P` to pad the number
  for(;j++<l;             //  Loop `j` in the range (-1, l]:
      ;                   //    After every iteration:
       r+="\n"            //     Append a new-line, and padding spaces:
       +(j<l?P:p))        //      `p` if it's the last iteration; `P` otherwise
    for(i=n*4;i>n*3;      //   Inner loop `i` in the range [4n, 3n):
      r+=(i--+"")         //    Convert the current number to a String,
         .charAt(j));     //    and append the `j`'th digit to the result-String
  r+="┌"                  //  Append the top-left corner of the chip
     +"┴".repeat(n)       //  Append the top row of the chip
     +"┐\n";              //  Append the top-right corner of the chip, plus a new-line
  for(i=0;i<n             //  Loop `i` in the range [0, n):
      ;                   //    After every iteration:
       r+="├"             //     Append the right border of the chip
          +(n*3-i+++1)    //     Append the number
          +"\n")          //     And a trailing newline
    r+=p.substring((i+"").length())
                          //   Append padding spaces in front of the left number
       +i                 //   Append the current number
       +"┤"               //   Append the left border of the chip
       +" ".repeat(n);    //   Append the inner spaces
  r+=p                    //  Append padding spaces in front of the corner
     +"└"                 //  Append the bottom-left corner of the chip
     +"┬".repeat(i)       //  Append the bottom part of the chip
     +"┘\n"               //  Append the bottom-right corner of the chip, plus a new-line
     +P;                  //  Append padding spaces in front of the bottom number
  for(j=-1;j++<l;         //  Loop `j` in the range (-1, l]:
      ;                   //    After every iteration:
       r+="\n"            //     Append a new-line
          +P)             //     Append padding spaces for the number
    for(i=n;i<n*2;        //   Inner loop `i` in the range [n, 2n):
      r+=(++i+"")         //    Convert the current number to a String,
         .charAt(j));     //    and append the `j`'th digit to the result-String
  return r;}              //  Return the result-String


text:
A Rather Knotty Conundrum
Write a program to draw a 2-D diagram of a knot based on the knot's structure. A knot is exactly what it sounds like: a loop of rope that's tied up. In mathematics, a knot diagram shows where a piece of rope crosses over or under itself to form the knot. Some example knot diagrams are shown below:

There's a break in the line where the rope crosses over itself.
Input: the input describing the knot is an array of integers. A knot where the rope crosses over itself n times can be represented as an array of n integers, each with a value in the range [0, n-1]. Let's call this array K.
To get the array describing a knot, number each of the segments 0 through n-1. Segment 0 should lead to segment 1, which should lead to segment 2, which should lead to segment 3, and so on until segment n-1 loops back and leads to segment 0. A segment ends when another segment of rope crosses over it (represented by a break in the line in the diagram). Let's take the simplest knot - the trefoil knot. After we've numbered the segmnents, segment 0 ends when segment 2 crosses over it; segment 1 ends when segment 0 crosses over it; and segment 2 ends when segment 1 crosses over it. Thus, the array describing the knot is [2, 0, 1]. In general, segment x starts where segment x-1 mod n left off, and ends where segment K[x] crosses over it.
The below image show knot diagrams, with labeled segments and the corresponding arrays that describe the knot.

The top three diagrams are true knots, while the bottom three are loops of rope that cross over themself but aren't actually knotted (but which still have corresponding codes).
Your task is to write a function which takes an array of integers K (you could call it something different) that describes a knot (or loop of rope that's not actually knotted), and which produces the corresponding knot diagram, as described in the above examples. If you can, provide an ungolfed version of your code or an explanation, and also provide sample outputs of your code. The same knot can often be represented in multiple different ways, but if the knot diagram your function outputs satisfies has the input as one of it's possible representations, your solution is valid.
This is code-golf, so shortest code in bytes wins. The line representing the rope can have a thickness of 1 pixel, however under and over-crossings must be clearly distinguishable (the size of the break in the rope should be greater than the thickness of the rope by at least a pixel on either side).
I will upvote answers that rely on built-in knot theory capabilities, but the one that's selected in the end can't rely on built-in knot theory capabilities.
Everything I know about my notation: I believe that there are sequences of values that don't seem to correspond to any knot or unknot. For example, the sequence [2, 3, 4, 0, 1] seems to be impossible to draw.
Aside from that, suppose that you take a crossing and, starting from that crossing, follow the path of the rope in one direction and label every unlabeled crossing that you come across with succesively greater integral values. For alternating knots, there is a simple algorithm to convert my notation into such a labeling, and for alternating knots it's trivial to convert this labeling into a Gauss Code:
template<size_t n> array<int, 2*n> LabelAlternatingKnot(array<int, n> end_at)
{
    array<int, n> end_of;
    for(int i=0;i<n;++i) end_of[end_at[i]] = i;
    array<int, 2*n> p;
    for(int& i : p) i = -1;
    int unique = 0;
    for(int i=0;i<n;i++)
    {
        if(p[2*i] < 0)
        {
            p[2*i] = unique;
            p[2*end_of[i] + 1] = unique;
            ++unique;
        }
        if(p[2*i+1] < 0)
        {
            p[2*i+1] = unique;
            p[2*end_at[i]] = unique;
            ++unique;
        }
    }
    return p;
}
template<size_t n> auto GetGaussCode(array<int, n> end_at)
{
    auto crossings = LabelAlternatingKnot(end_at);
    for(int& i : crossings) ++i;
    for(int i=1;i<2*n;i+=2) crossings[i] = -crossings[i];
    return crossings;
}

You should probably ban builtins for doing this. (At this point, I'd be shocked if Mathematica doesn't have one.)

My proposed notation is different from the one mathematica supports, but I added a no-built-ins condition

@ais523 Now I can't use KnotData in Mathematica... :'(

I'll upvote your answer if you figure out how to implement my notation with KnotData!

I'm curious about the notation you use for the knot crossing diagram. Does it have a name? Is it possible for two non-equivalent knots to have the same array?

I am unsure on either of those counts. I came up with the notation because it seemed simple enough to explain, and because I liked how elegant it was. I don't believe it's possible for non-equivalent knots to have the same array, but I haven't proven it yet. I do know that there are multiple arrays which all represent the same knot.

@JHM I don't think KnotData will be useful here. In order to use KnotData you would need to 1) determine the knot from the K-notation, then 2) produce a diagram of that knot that has that K-notation. The former will not be unique since a knot can have more than one K-notation depending on the diagram, different knots can have the same K-notation (e.g. trefoil and its mirror), and even a single diagram can have more than one K-notation depending on where you start the numbering and which direction you travel. As for the latter, nothing in KnotData allows you to create arbitrary knot diagrams.

@ngenisis Yep. You're correct.

@ais523: Mathematica totally has a Knot builtin! Example usage: << Units\; Convert[Knot, Mile/Hour]yields1.1507794480235425 Mile/Hour`. (I think this is funny regardless of whether it's true or false; but it's actually true.)

@GregMartin Knot is a unit commonly used in maritime navigation.

Right, I know that is true—I meant whether it's true that Mathematica has that functionality implemented.

I would try this challenge, but all this numerical describing is very ambiguous. [0]  is analagous to a loop that is not crossed,, as well as [0,1]. thus [0,1] is equal to [0]. I don't think any program will give you homologous to the examples you provide. Most notably, for the last 3 test cases.

[0], [0,1], [0,1,2], [1,0] and a variety of other arrays all produce "knots" that are equivalent to the unknot, however outputting a simple loop would be incorrect in any of those cases. The notation [0] very specifically means a loop of rope that intersects itself exactly once, and it is very easy to tell whether a figure drawn to the screen satisfies the input notation or not.

@JorgePerez but it does not matter weather or not the loop crosses, as the knots are topologically the same thing. they are the same knot. no difference. A program will not be able to simulate the last three test cases any differently from each other. I would also add that your representation is incomplete. The knots that you give for the arrays that you give are analagous to other knots, and can yield more than one proper output.  For now, it seems as if your expected outputs are much more complex, and ambiguous than any program can handle with a 1- output limitation. I'm voting to close.

This should use a different notation (see: http://www.indiana.edu/~knotinfo/descriptions/dt_notation.html)

@GáborFekete magnificent!

I'm trying to prove your notation wrong but I couldn't yet. There is a funny value which got me thinking:
[0, 0, 0] (using your notation) which is basically the unknot with two twists in it.

I came up with an algorithm to convert my notation into a gauss code for alternating knots, and added some additional information about it

Will inputs be guaranteed to represent alternating knots, or does your notation support non-alternating knots as well?

I found a possible problem with your notation. You mapped it onto a Gauss Code, but according to this website, "In general, the Gauss Code for some knot diagram cannot reconstruct an equivalent diagram, but a minor revision of the notation will make the reconstruction possible. The revision is called the Extended Gauss Code." The extension is necessary because otherwise there is no means of knowing what the "handedness" of a crossing is.

It shouldn't matter for the purpose of this challenge if direction doesn't matter, though.

I decided to solve this challenge, but optimizing for (algorithmic) speed, not for golfing. I may optimize for golfing later. My program can do [2, 0, 1] in .05s, and [3, 4, 0, 1, 2] in 8s. I've put in on github here: knot

GNU Prolog, 622 634 668 bytes in code page 850
Update: The previous version of the program was sometimes making crossings so tight that they wouldn't render properly, which violates the spec. I've added in some extra code to prevent that.
Update: Apparently PPCG rules require extra code to make the program exit and restore the state exactly as it was at the start. This makes the program somewhat longer and adds no algorithmic interest to it, but in the interests of rule compliance, I've changed it.
Golfed program
Using GNU Prolog because it has a constraint solver syntax that's slightly shorter than portable Prolog's arithmetic syntax, saving a few bytes.
y(A,G):-A=1;A= -1;A=G;A is-G.
z(A/B,B,G):-y(A,G),y(B,G),A=\= -B.
v(D,E,G):-E=1,member(_-_,D),p(D);F#=E-1,nth(F,D,M),(M=[_];M=L-S/R,z(L,O,G),J is F+O,nth(J,D,I/U-T/Q),(I=O,Q#=R-1,S=T;K is J+O,R=0,n(S-T-V),y(U,G),U\=O,U=\= -O,I=U,nth(K,D,O/_-V/_))),v(D,F,G).
i([H|K],S):-K=[]->assertz(n(S-H-0));T#=S+1,assertz(n(S-H-T)),i(K,T).
t([],1,_):-!.
t(D,R,G):-S#=R-1,t(E,S,G),H#=G-1,length(F,H),append(F,[[x]|E],D).
s(1,2).
s(-1,1).
s(S,T):-S>1->T=3;T=0.
r(I/O-_,C):-s(I,J),s(O,P),N#=J*4+P+1,nth(N,"│┐┌?└─?┌┘?─┐?┘└│",C).
r([X],C):-X\=y->C=10;C=32.
p([]).
p([H|T]):-r(H,C),put_code(C),!,p(T).
g(4).
g(G):-g(H),G#=H+1.
m(K):-i(K,0),g(G),t(D,G,G),length(D,L),v(D,L,G),abolish(n/1).

Algorithm
This is one of those problems where it's hard to know how to start. It's not obvious how to work out the shape of the knot from the notation given, because it doesn't let you know whether you're meant to bend the line to the left or the right at any given location (and as such, the notation might be ambiguous). My solution was, effectively, to use the old golfing standby: write an incredibly inefficient program which generates all possible outputs and then see if they match the input. (The algorithm used here is slightly more efficient, as Prolog can throw out the occasional dead end, but it doesn't have enough information to improve the computational complexity.)
The output is via terminal art. GNU Prolog seems to want a single byte character set that's consistent with ASCII, but doesn't care which one is used (as it treats characters with the high bit set as opaque). As a result, I used IBM850, which is widely supported and has the line drawing characters we need.
Output
The program searches all possible knot images, in the order of the size of their bounding box, then exits when it finds the first. Here's what the output looks like for m([0]).:
 ┌┐
┌│┘
└┘

This took 290.528 seconds to run on my computer; the program isn't very efficient. I left it running for two hours on m([0,1]), and ended up with this:
┌┐┌┐
└─│┘
 └┘

Ungolfed version with comments
Stack Exchange's syntax highlighter seems to have the wrong comment symbol for Prolog, so instead of % comments (which Prolog actually uses), this explanation uses % # comments (which are of course equivalent due to starting with %, but highlight correctly).
% # Representation of the drawing is: a list of:
% #     indelta/outdelta-segment/distance  (on path)
% # and [x] or [_]                         (off path; [x] for border).
% # A drawing is valid, and describes a knot, if the following apply
% # (where: d[X] is the Xth element of the drawing,
% #         k[S] is the Sth element of the input,
% #         n[S] is S + 1 modulo the number of sections):
% # d[X]=_/O-S-R, R>1 implies d[X+O]=O/_-S-(R-1)
% # d[X]=_/O-S-0 implies d[X+O]=_/_-k[S]-_
% #                  and d[X+O*2]=O/_-n[S]-_
% # all outdeltas are valid deltas (±1 row/column)

% # not technically necessary, but makes it possible to compile the
% # code (and thus makes the program faster to test):
:- dynamic([n/1]).

% # legal delta combinations:
y(A,G):-A=1;A= -1;              % # legal deltas are 1, -1,
        A=G;A is-G.             % # grid size, minus grid size
z(A/B,B,G):-y(A,G),y(B,G),      % # delta components are valid
            A=\= -B.            % # doesn't U-turn
% # z returns the outdelta for convenience (= byte savings) later on

% # We use v (verify) to verify the first E-1 elements of a drawing D.
% # nth is 1-indexed, so we recurse from length(D)+1 down to 2, with
% # 1 being the trivial base case. After verifying, the grid is printed.
% # This version of the program causes v to exit with success after
% # printing one grid (and uses p to do the work of deciding when that is).
v(D,E,G):-E=1,                  % # base case:
          member(_-_,D),        % # ensure the grid is nonempty
          p(D);                 % # print the grid (and exit)

                                % # otherwise, recursive case:
          F#=E-1,nth(F,D,M),    % # check the last unchecked element
          (
            M=[_];              % # either it's not on the path; or
            M=L-S/R,            % # it's structured correctly, and
            z(L,O,G),           % # it has a valid delta;
            J is F+O,           % # find the outdelta'd element index
            nth(J,D,I/U-T/Q),   % # and the outdelta'd element
            (
              I=O,Q#=R-1,S=T;   % # if not an endpoint, points to next pixel
              K is J+O,         % # else find segment beyond the path:
              R=0,              % # it's an endpoint,
              n(S-T-V),         % # it points to the correct segment,
              y(U,G),           % # ensure we can do NOT comparisons on U
              U\=O,U=\= -O,     % # the line we jump is at right angles
              I=U,              % # the line we jump is straight
              nth(K,D,O/_-V/_)  % # the pixel beyond has a correct indelta,
                                % # and it has the correct segment number
            )
          ),
          v(D,F,G).             % # recurse

% # We use i (init) to set up the k, n tables (k and n are fixed for
% # any run of the program, at least). S is the number of elements that
% # have been removed from K so far (initially 0). To save on characters,
% # we combine k and n into a single predicate n.
i([H|K],S):-K=[]->             % # if this is the last element,
            assertz(n(S-H-0)); % # section 0 comes after S;
            T#=S+1,            % # otherwise, add 1 to S,
            assertz(n(S-H-T)), % # that section comes after S,
            i(K,T).            % # and recurse.

% # We use t (template) to create a template drawing. First argument is
% # the drawing, second argument is the number of rows it has plus 1,
% # third argument is the number of columns it has plus 1.
t([],1,_):-!.
t(D,R,G):-S#=R-1,t(E,S,G),      % # recurse,
          H#=G-1,length(F,H),   % # F is most of this row of the grid
          append(F,[[x]|E],D).  % # form the grid with F + border + E

% # We use s (shrink) to map a coordinate into a value in the range 0, 1, 2, 3.
s(1,2).
s(-1,1).
s(S,T):-S>1->T=3;T=0.
% # We use r (representation) to map a grid cell to a character.
r(I/O-_,C):-s(I,J),s(O,P),N#=J*4+P+1,nth(N,"│┐┌?└─?┌┘?─┐?┘└│",C).
r([X],C):-X\=y->C=10;C=32.
% # We use p (print) to pretty-print a grid.
% # The base case allows us to exit after printing one knot.
p([]).
p([H|T]):-r(H,C),put_code(C),!,p(T).

% # We use g (gridsize) to generate grid sizes.
g(4).
g(G):-g(H),G#=H+1.

% # Main program.
m(K):-i(K,0),                  % # initialize n
      g(G),                    % # try all grid sizes
      t(D,G,G),                % # generate a square knot template, size G
      length(D,L),             % # find its length
      v(D,L,G),                % # verify and print one knot
      % # Technically, this doesn't verify the last element of L, but we know
      % # it's a border/newline, and thus can't be incorrect.
      abolish(n/1).            % # reset n for next run; required by PPCG rules

I downloaded GNU prolog, copied your code into a .txt file, saved it as an ascii-encoded .pl file, and in the console called m([0])

Are there any ways you could make the program more efficient?

I suspect the program can be made more efficient, but there's no obvious or easy way. Changing the evaluation order to move along the knot, rather than left-to-right/top-to-bottom, would likely help, but I'm not sure how much it would help (and it'd also be substantially more code, thus not viable in a [tag:code-golf]).

You understand why I'm reluctant, right? I mean... even the best code needs to be tested, and your solution is so complex that I can't even verify that it'll reproduce the very simplest knot (the [2, 0, 1] knot).

I understand, yes. However, this is kind-of inherent in [tag:code-golf], especially when it comes to Prolog. The code is actually very simple, which is the reason it runs so slowly; [tag:code-golf] on a complex problem pretty much always leads to a brute-force solution that checks all possible outputs against the specification. Doing something to make the program more efficient would make it substantially longer, and would quite possibly make it harder to understand and prove correct as well.

You should let it run for a few other inputs. Try a slightly larger one and run it for a couple days.