# Cast your vote for “Best of PPCG 2017”!

### Final phase

You have chosen the categories and the nominees for PPCG's annual “Best of”. Now it is time to pick the winners!

Each of the thirteen categories is represented by an answer to this question, and each of these answers contains all nominations by the members of our community.

### Voting mechanism

Each nominee has been added as a comment to its category's answer. In each category, the nominee whose comment has the highest number of votes by February 9, 03:00 UTC will be declared the winner of that category.

### Further details

• Feel free to vote for multiple nominees of the same category, including your own posts.

• Just wondering, was Tetris in CGOL (answers) eligible for nomination? It would've made a good Slowest Gun in the West Feb 3 '18 at 5:58
• @mbomb007 No, Tetris was explicitely not eligible for best-of due to being too awesome. To quote Mego, "Allowing Tetris to compete would be like allowing Michael Phelps to compete in a high school swimming meet". Feb 3 '18 at 6:17

Every once in a while, an answer takes the challenge to the extreme. This prize will be awarded to an answer which went far beyond the expectations of the challenge. This could include

• a code golf answer that brute-forced/proved the shortest program in some language
• a graphical-output popcon answer of extreme size and quality
• a KOTH answer of high complexity which absolutely dominated the competition

This category was featured in both Best of 2015 and Best of 2016.

## Build a digital clock in Conway's Game of Life by dim

Nomintated by Draco18s

This answer was posted 7 months after the challenge was posed. It seemingly came out of nowhere and the result is beautiful. No other answers have ever been posted, due to the sheer complexity of the challenge.

## Print a Variable's Name by Poke

Nominated by Caleb Kleveter

A rather brilliant solution to a challenge I proposed, using a stack trace to get the name of a variable. There is a very good explanation that goes with the solution. This answer was also the most popular.

## Paint Starry Night, objectively, in 1kB of code by Anders Kaseorg

Nominated by Ian Gödel

This answer deeply impressed me, because it doesn't use built-in compression (and it is also in Pyth!), and the amount of effort the poster has made is just amazing. There is a detailed explanation, and the graphical output is of extreme quality. These things make it worthy of a some of our rep points.

## How high can you count? by Dennis

Nominated by DJMcMayhem

A very impressive answer, with a very impressive score. I think Dennis went above and beyond in 1) Continually coming back and improving the score (36 revisions), and 2) Posting a very extensive test-suite.

## Display random colored pixels by BradC

Self-nomination

"Simple" graphical challenge solved by placement of colored wool blocks using Minecraft redstone/command blocks. Complete with detailed pictures and descriptions, an update that chopped 1,483 bytes off the score, and even an accompanying YouTube video and downloadable NBT file if you want to reproduce it yourself.

• Feb 2 '18 at 2:12
• Feb 2 '18 at 2:12
• Feb 2 '18 at 2:12
• Feb 2 '18 at 2:12
• Feb 2 '18 at 2:12

# Overall best challenge

This category is for a challenge that is exceptionally well written, is properly specified, and most of all, an interesting challenge.

Due to the "HNQ effect", easy, simple challenges often get more attention than more interesting, harder puzzles, and this award is intended to recognize effort in writing complex challenges.

## Formic Functions: Queen of the Hill by trichoplax

Nominated by Draco18s

Incredible dedication to maintaining the KOTH challenge and running tournaments as new answers were added and old ones updated (even now, over a month after the chatroom was automatically suspended, a new edit was made and trichoplax will still run another tournament). The challenge was one that looked like it wouldn't have much diversity in the answers at first, but as people tried things and got to know the playing field, approaches to the problem got very complex, varied, and beautiful.

## Let's Play Mafia! by undergroundmonorail and Christopher 2EZ 4RTZ

Self-nomination (kinda)

This is a really cool KoTH but as I didn't write it the potential winnings will go to the actual author :).

It is a really cool and hard challenge that was sandboxed forever! It was well written and is very cool.

## Fewest (distinct) characters for Turing Completeness by Julian Lachniet

Nominated by Laikoni

An unusual challenge in the sense that instead of code size the "size" of the language itself should be reduced as much as possible while maintaining Turing Completeness. The challenge produced a lot of interesting answers with methods as diverse as the used languages, e.g. the 5 characters for JavaScript.

• Feb 2 '18 at 2:19
• Feb 2 '18 at 2:20
• Feb 2 '18 at 2:20

# Rookie of the Year - Answers

For the best answer by someone who hasn't submitted an answer prior to 2017 (i.e., not necessarily a new user, but just someone who's a new answer writer).

## Build a fewest-moves freecell solver By Christopher 2EZ 4RTZ

Self-nomination

I know this was also nominated by me but it fits in both categories. My first answer was back on January 24th and I really fell in love with this site. I bet other people will have better choices but what is the fun without a little chance!

## Output with the same length of the code aka Segmentation Fault, MD XF

Self-nomination

Well, it was my 14th answer on this site (all in 2017) and the first to get more than two votes. I repcapped about 3 times from this answer and it became a PPCG meme, which was fueled when I got another 56 upvotes for a seg-fault.

## When do I get my sandwich? by Jonathan Frech

Nominated by plannapus

Could be a good candidate for Kansas City Shuffle as well. Original, unexpected way to solve the challenge, great explanation and alternative solutions make for a great answer.

## Letter, Number, Symbol, Space, Repeat by Ørjan Johansen

Nominated by H.PWiz

This is the user's first submission to the site. It answers a restricted source challenge that was previously thought to be unsolvable in a conventional language. Ørjan, however was able to answer in Haskell. Overall, it is a fantastic answer and exhibits some truly obfuscated Haskell.

## [CHRISTMAS THEME DISCLAIMER HERE] by tfbninja

Self-nomination

This was my first in-depth answer to a non-trivial challenge. I spent a lot of time on it and felt pretty good about it. It was later golfed on, but it was still quite difficult and took a lot of effort.

## Display random colored pixels by BradC

Self-nomination

My first posted answer, solved using Minecraft redstone/command blocks. High bit count, but complete with detailed pictures and descriptions, and even an accompanying YouTube video and downloadable NBT file if you want to reproduce. I haven't attempted another Minecraft answer since.

## In Honor of Adam West by Uriel

Self-nomination

One of my earlier answers, that caught way much attention than expected. Getting to the challenge after most answers were already quite short, and having my history with memorial challenges, I figured one made out of the memorated's name could cause no harm. The west is history.

• Feb 2 '18 at 2:10
• Feb 2 '18 at 2:10
• Feb 2 '18 at 2:10
• Feb 2 '18 at 2:10
• Feb 2 '18 at 2:10
• Feb 2 '18 at 2:11
• Feb 2 '18 at 2:11

# Novel scoring mechanism

A challenge posted in 2017 that used a new approach to scoring that made for interesting competition.

This could be a with a defined score calculation, or a modification of an existing challenge type like , , or .

## Disconnect 4 bits by Pavel

Nominated by Poke

In this challenge the scoring was not solely based on shortest number of bytes but also the shortest number of sets of 4 bits in the binary representation of the source code. This meant that sometimes it was worth it to make the code a little longer in order to avoid characters or character sequences which negatively affected your score.

## Unique is Cheap by Laikoni

Nominated by Kevin Cruijssen

In this challenge the scoring was the same as the challenge itself: the cost of each character is equal to how many times this character has occurred in the string thus far. I.e. abaacab has a score of 1+1+2+3+1+4+2 = 14. In some programming languages this actually meant increasing the byte-count could benefit a lower score. An interesting concept which was fun to do.
I wouldn't mind seeing more challenges where the score is based on the challenge itself.

• Feb 2 '18 at 2:24
• Feb 2 '18 at 2:24

# Rookie of the Year - Challenges

For the best challenge written by someone who has not written a challenge prior to 2017 (i.e., not necessarily a new user, just a new challenge writer).

## Garbled Phone Numbers by Draco18s

Self-nomination

It was my first ever challenge in any tag that got several answers, including one of the longest Jelly answers ever written (its like 3rd or 4th). Writing good challenges is hard and I want to do more.

## cool untitled sequence thingy by totallyhuman

Self-nomination

Typical sequence challenge with barely any appreciation but I like this challenge (not only because it's mine). The nth element of a simple sequence and it led to a diversity of approaches where each of them had a mathematical backing, with none being obviously the golfiest, something that I want to see in more challenges. Also, it totally has the best title.

## The Quantum Drunkard's Walk by stellatedHexahedron

Nominated by DLosc

A fun ASCII-art challenge about outputting the pattern of a cellular automaton after a given number of steps. It's well-specified but allows appropriate flexibility in output format. The automaton's symmetry and some other properties led to interesting ways of golfing the generation algorithm. As LuisMendo commented, "Great first challenge!"

## I double the source, you double the output! by Mr. Xcoder

Self-nomination

Although I've had a couple of well-received challenges before this one was posted, I feel like this was my best challenge overall. The thing I enjoyed most about this post is the fact that the solutions were incredibly diverse, ranging from sheerly ridiculous esolang answers (ab)using language features to clever solutions in more practical languages. I haven't posted any challenges (nor answers) prior to 2017.

## One OEIS after another by caird coinheringaahing

Self-nomination

I joined this site in May 2017, and since posting, this has become the third most answered challenge ever, the fifth highest voted answer chaining challenge and my highest voted challenge, with contributions from 60 users for over 6 months. It has lead to some very impressive and amusing answers, even extending to other SE sites. It even has a chat room dedicated to it.

• Feb 2 '18 at 2:16
• Feb 2 '18 at 2:17
• Feb 2 '18 at 2:18
• Feb 2 '18 at 2:18
• Feb 2 '18 at 2:19

# Best use of the wrong language for the job

This category is for an exemplary answer written in a language that was not adequately equipped to solve the challenge.

## Write a brain-flak classic interpreter by Nitrodon

Nominated by DLosc

Most interpreter challenges attract answers in high-level languages like Python and Java. And then Nitrodon goes and writes a Brain-Flak Classic interpreter... in Brain-Flak Classic. In case you weren't aware, Brain-Flak is an extremely simple esolang, with only two stacks for storage and eight commands. Using this language to interpret itself is completely crazy--in the best possible way. Nitrodon's post also contains a thorough explanation.

## Disconnect 4 bits by Poke

Self-nomination

I originally wrote this in what I thought was a golfy manner with a couple tricks to avoid known characters that would cause demerits. After tweaking my method and variables I managed to golf almost 50% off of my score by increasing my bytecount. I feel like this was possibly more of a challenge for Java than other languages since Java is naturally more verbose causing there to be more cases where you're forced to take demerits. There's also a comment arguing my case.

## Find the shortest Golomb rulers by Peter Taylor

Self-nomination

The Mathematica answer is really 7 lines. This C# answer is over 300 lines, not counting argument validation, comments, and blanks; doesn't have entirely satisfactory types; and only does about twice as much from an abstract mathematical point of view. It is a classic example of pretending that the problem is a nail because I only have a hammer.

• Feb 2 '18 at 2:12
• Feb 2 '18 at 2:13
• Feb 2 '18 at 2:13

## SGITW (Slowest Gun in the West)

For the best 2017 answer in a challenge which received no answers within 48 hours of posting. The challenge itself does not need to be from 2017 and the nominated answer doesn't need to be the first answer to the challenge, but the first answer to the challenge does need to be from 2017. Tips questions are not counted for this category.

It's very easy to get drawn to the fast-rising HNQ-hitting questions with a plethora of answers, so I thought this would be a good way to bring attention to answers that really needed to earn their love.

## Build a fewest-moves freecell solver By Christopher 2EZ 4RTZ

Self-nomination

I spent a while trying to make the code work, it took me WEEKS to calculate my score and a week or so to get a bash script to auto-test score my answer. I spent a long time getting this to work and really like how it turned out.

## Build a digital clock in Conway's Game of Life by dim

Nomintated by Poke

This answer was posted 7 months after the challenge was posted. It seemingly came out of nowhere and the result is beautiful.

• Feb 2 '18 at 2:25
• Feb 2 '18 at 2:25

# Best mathematical insight

On this site we often see answers in languages specifically designed for short code, or designed to be fast. Sometimes, a nice golfing trick or speed-up technique surprises us with its ingenuity, beyond the standard use of that language.

And occasionally an answer shows up that uses an unexpected approach to greatly simplify the problem, and makes us wonder how the author could ever think of that. This usually involves some far-from-obvious mathematical equivalence, or a particularly simple approach to the problem that was not evident at all (once revealed, other answers often follow the same approach).

This category is for the answer with the best mathematical insight or unexpected approach that led to greatly simplifying the problem, in any challenge type (code golf, fastest code, or others). The insight should have led to a significant improvement according to the challenge's metric (code length, run time, or whatever applicable).

## Approximate Brun's Constant by Dennis

Nominated by Mr. Xcoder

I don't have much to say about this answer. The mathematics behind it is amazing, and so is its explanation and its implementation. The author, Dennis, has put some incredible effort into creating and explaining it (and this is one of the posts that would benefit from having MathJax :P).

## Quadrants passed through by a line by Leaky Nun

Nominated by Esolanging Fruit

I posed what I thought would be an interesting challenge, but Leaky revealed it was dependent simply on the number of zeroes in the input. Leaky originally used an array lookup to switch on the number of zeroes, but this was later changed to bit manipulation.

## What an Odd Function by Dennis

Nominated by Peter Taylor

Most of the answers to this question case-split in some way or do fiddly things with lists of even and odd numbers. After thinking about it for a while (note the time lag between his first answer and this one), Dennis spotted an elegant approach based on prime factorisation which is the clear winner as things stand.

• Feb 2 '18 at 2:15
• Feb 2 '18 at 2:15
• Feb 2 '18 at 2:16

# Kansas City Shuffle

Too often, once someone devises a generic golfy method of solving a challenge, most people will use that method for their answers. This award goes to those answers that utilize an alternative method as a better solution than the method that the majority of other answers use (prior to the posting of the rewarded answer).

## Golf a transcendental number by xnor

Nominated by Mr. Xcoder

This answer provides a whole new approach to the challenge, alongside a strong proof of validity and a good explanation. It also shows a lot of research effort from its poster, xnor, with multiple references to Math.SE questions and answers and OEIS. In my opinion, the way the OP tackled the problem is just amazing and therefore worthy of an additional bounty.

## When do I get my sandwich? by Jonathan Frech

Nominated by Riker

This answer takes an alternative approach just to eke out a one-byte advantage over the next largest answer. And neither answer is even that long! And the use of a generator to choose the numbers is just as impressive.

• Feb 2 '18 at 2:06
• Feb 2 '18 at 2:06

## Best Showcase of a New Language

This is for new languages (golfing or otherwise) created in or after December 2016 (meaning, the first commit on GitHub or the like was from that date). The category is designed to highlight the answer that best shows the features, tricks, and benefits of using this new language. The author of the answer does not necessarily need to have been the author of the language.

## Division and remainder in BitCycle by DLosc

self-nomination

BitCycle is a low-level 2D language that works by moving bits around on a playfield. (Think of it as the lovechild of ><> and Bitwise Cyclic Tag.) Even though the only tools it has for computation are 0's, 1's, and some queues for storage, it is Turing-complete.

This answer shows off nearly all of BitCycle's features and performs an integer-arithmetic task in a language that doesn't even have integers. It comes with a GIF showing the ungolfed version in action, plus a point-by-point explanation.

## Klein Topololyglots in Klein by 0 '

nominated by Heeby Jeeby Man

Klein is a language about topology and no answer shows off the mind bending nature of Klein better than this answer. In this answer 0 ' makes a polyglot that runs in all of the Kleins 12 topologies and prints a different result in each. With its excellent explanation this answer provides a full showcase of what Klein does.

## Generate ;# code in ;#+ by Conor O'Brien

self-nomination

;#+ is a language designed to redeem the relatively uninteresting language ;#. This specific answer highlights the unconventional nature of the language, showing that the shortest approach is not like a Brainf*** or similar esoteric answer, for it outgolfs the first ;#+ answer here. The answer serves as a general guide as to how to write tersely in the language, showing off most of its programmatic features in a simple way. The answer explains itself well, and summarizes ;#+ pithily.

## The Crow and The Taxicab in Add++ by caird coinheringaahing

self-nomination

Add++ is a language that started as not very complex, using a single accumulator, and eventually evolving into a language with functions and complex structures. This answer is the first that demonstrates usage of all three memory systems Add++ has to offer and is a good example of how to switch between functions and accumulator coding in Add++.

## Repeated Digit Primes in Alice by Martin Ender

self-nomination

Alice is a feature-rich 2D language (of the Fungeoid family), which has a ton of built-ins, and either uses string manipulation commands or arithmetic commands, depending on which direction the instruction pointer is moving in. This is one of the most complex programs that has been written and golfed in Alice at this point, and it shows off the benefit of mixing both Cardinal (integer) and Ordinal (string) mode in a single program to get things done. The answer also shows off the usefulness of Alice's somewhat seemingly random built-ins (e.g. "divide all factors less than k out of n") and how to build interesting nested loops with Alice's control flow commands. I personally also really like the neatness of how the four short Ordinal sections interleave perfectly in the layout without wasting any bytes (which is a big part of golfing any Alice program that makes nontrivial use of both modes).

## DropSort it like it's hot in Husk by Zgarb

Self-nomination

Husk is a pure functional golfing language created in 2017 by PPCG users Zgarb and Leo. This answer highlights two of the distinctive features of Husk golfing: casual handling of infinite lists (as produced by ¡ and then chopped by U) and abuse of higher-order functions by giving them arguments that defy the "intended" semantics (like ü<, where ü is supposed to remove duplicates based on a binary equality predicate). Even with the intended semantics, ü is arguably a weird built-in; Husk has lots of similar higher-order functions.

• BitCycle: Division and remainder by DLosc Feb 2 '18 at 2:21
• Feb 2 '18 at 2:21
• Feb 2 '18 at 2:22
• Feb 2 '18 at 2:22
• Feb 2 '18 at 2:22
• Feb 2 '18 at 2:22

# Best Explanation

This category is for the answer with the best explanation accompanying it. Ideally, the winner will be an answer with a very detailed explanation that is accessible to anyone, regardless of the amount of relevant knowledge already possessed.

## How on earth did llhuii output the Evil Numbers in 42 bytes of Python? by xnor

Even though xnor was the original poster of the question, the explanation provided on this answer is well written and very thorough -- to the point that even I, as a non-Python programmer, could follow along and understand the steps taken to get to the new 39-byte record. xnor takes the reader along exactly through the thought process to get to the next byte savings, and the result is something truly extraordinary.

## How lit is this mountain? 🔥 by Mr. Xcoder

Nominated by Ian Gödel

Although it has later been outgolfed by xnor, this answer includes a detailed explanation to a geometry problem, including drawings and references to multiple theorems, while still being accessible to anyone with basic geometry knowledge. It shows the viewers what the program does step-by-step, explaining both the mathematics behind it and the functionality of the code. Therefore, I think this answer perfectly fits this category.

## One OEIS after another by Christian Sievers.

Nominated by Peter Taylor

Christian has three answers in this chain which use not-Burnside's lemma to tackle some non-trivial sequences. This is perhaps the most detailed, and certainly the most interesting as it explains how the standard approach can be golfed.

• Feb 2 '18 at 2:13
• Feb 2 '18 at 2:13
• Feb 2 '18 at 2:13

# The student becomes the master

This category aims to reward an answer that fulfils the following conditions:

• It is an answer to a challenge

• The poster is not the creator of the language, and the code has byte count N.

• The creator of the language already submitted an answer, with byte count M.

• And finally N < M, but the restriction is that no language features used have been added in the meantime.

## Is it true? Ask Jelly! in Jelly by hvd

Dennis' comment on this submission really sums up the reason why I nominated the answer here -- "Outgolfed in my own challenge and my own language... Well done!"

## Are the brackets fully matched? in Brain-Flak by Nitrodon

Nominated by DJMcMayhem

Are the brackets fully matched is one of my favorite challenges I have ever posted. Mostly because it's the challenge that inspired me to write brain-flak, which is a minimalist stack based esolang where the only valid programs are balanced strings of brackets. I had always wanted to answer it in brain-flak, but this is a very difficult task because of brain-flak's bad support for string processing. When I finally got around to answering it in brain-flak, it took me about 2 hours of work to get it working at all. I had given up on golfing it because it was a monumental task to get it working in the first place. Nitrodon came along 9 months later, and outgolfed me by 800 bytes.

## Is this number a prime? in Hexagony by H.PWiz

Martin Ender wrote an answer to the challenge in Hexagony shortly after creating the language in 2015. A week or so later, Etoplay posted another Hexagony answer, which was only half as long as the previous answer and had a smaller side-length. Etoplay's answer (their first answer on the site) remained the shortest Hexagony answer for two years, until, in November 2017, H.PWiz, having been outgolfed by Etoplay in another challenge, managed to write a Hexagony answer one byte shorter than that of Etoplay's. So, not only did H.PWiz outgolf the language creator, they also outgolfed the previous outgolfer.

## Multiply two numbers in Retina by Leo

Nominated by Martin Ender

Leo outgolfed me by coming up with better solutions for both parts of the challenge: a) figuring out the result's sign and b) multiplying the absolute values, by avoiding the conversion of one of the two values to unary. Since multiplying numbers is a fairly common operation, especially the second half of the answer was a pretty big deal for Retina at the time.

## Pro tip

Best answer to any general question. That is, candidates should be drawn from "Tips for golfing in X" questions (as opposed to specific "how do I shorten this piece of code" questions).

Some of the most useful content that we generate for other golfers is in our tips questions, so it would be nice to reward an exceptional golfing trick this way.

Candidates should be tips which show deep insight into the language, yet are applicable in wide range of situations. The exact amounts of bytes saved by the tip is not relevant.

## Tips for Golfing in Brain-Flak by Heeby Jeeby Man

Nominated by Poke

Brain-Flak only has two stacks on which to perform operations. The third stack is always present but not always made use of. The concept and application of the third stack is widely used when golfing brain-flak code as it allows for implicit re-use of certain values so they do not need to be computed again later. This can easily be seen in the Hello World answer written in brain-flak

## Shorter Header in Tips for golfing in C++ by user202729

Nominated by Mego

C++ has a lot of headers, and unlike C, you have to actually include them if you want to use library functions. This answer tells of a GCC precompiled header file that includes every standard library header, and whose name is fairly short. So, if you need to include multiple headers (like string and iostream), #include<bits/stdc++.h> will almost certainly be shorter. This header file isn't documented very well, so the tips answer is a huge help.

## Compressing String Arrays in Tips for Golfing in Japt by Shaggy

Self-nomination

I'm not great at these types of self-promotional blurbs but I put a good bit of work into researching and writing this tip as well as writing tools to help people make use of it. Includes a bonus tip for compressing integer arrays!