New answers tagged

0

Score a Scrabble Play Background In Scrabble, players take turns placing tiles on a grid so that each contiguous set of (more than one) tiles in every row and column makes a word. In one play, tiles can be placed anywhere in a single row or column as long as they are all part of the same word. A word is scored (without considering premium score spaces) by ...


1

Play chess (KOTH) Your task is to write a chess engine that will compete with other submissions in a chess tournament. Well, almost. Since writing a full engine can be a bit tedious, you only need to write the evaluation function. An evaluation function takes a chessboard as input and returns how "favorable" the position is. If white is winning, ...


1

500 reps for answering Is this hexagon symmetric? in Hexagony... with symmetric source code "Symmetric source code" here is defined roughly as follows: replace all the nops in your program with 0s, and all the non-nops in your programs with 1s. When this string of 0s and 1s is input into your program as a hexagon, it should accept it as symmetric. ...


0

Approximate Euler's Number Euler's number (e) is one of the most well-known mathematical constants, with a simple way to approximate it. All you have to do is repeatedly generate a random number between 0 and 1, and add it to an accumulator. Record how many times you have to do this for the accumulator to exceed 1. If you do this over and over again, the ...


0

Deterministic oozes code-golf Related This challenge is similar to the above linked challenge except the task is to output the next state of the input. Input Input can be taken as: A list of characters of states of cells A string A list of code points of characters Task Output the next generation of the input. These conversions happen if there is food . or ...


5

Papers or technical documents originated by a challenge This includes papers or documents about problems proposed in a PPCG challenge, or directly derived from it. On the number of tiles visited by a line segment on a rectangular grid (Arxiv pre-print), by Luis Mendo and xnor. Originated from this challenge.


-1

Convert decimal to unary in fewest regex codes code-challengeregular-expression Your task is to Convert decimal to undary in fewest regex codes Every regex code is substitution mode. A example ^2, |11 ^3, |111 ^4, |1111 ... \|, <empty> This scores infinity, But don't try this. Rules Your score is always non-infinity Any flavor is allowed. Your ...


-2

Who Loses The number guessing game? You are playing a number guessing game. You know everyone's guesses, and who won, and want to figure out who was in last place. Task Your task is to take a dictionary of guesses as input, along with the name of the winner. You should then return the name of the player whose guess was the farthest from the winner's, or if ...


2

Von Neumann Probe Battle (king-of-the-hill) This is just an idea for now, placing it here as a draft and to collect feedback. Basically, your goal would be to design a set of machines, including factories and spacecraft, which start on earth and spread outward into the universe. You'd be able to design these machines. Not just their code, but the parts that ...


3

Only one from each set


7

If you think it is low-effort and low-quality, downvote it. That's what downvotes are for. We allow duplicate answers on CGCC even in the same language with identical code, so this isn't against our rules.


2

code-golf Trap the hero in a maze You are an evil wizard, doing evil wizard business, when suddenly your crystal ball alerts you of a hero on their way to defeat you. To crush their hopes and dreams, you decide to trap the hero in a maze. You could just make a big maze but where would be the fun in that? Instead, you decide you want to make the maze as small ...


0

Piet Piet is an esoteric language in which programs are images. For example, here's a Hello World program: This unusual format means Piet is a bit awkward to score for code golf, and it hasn't been used much on this site. Such rules considerations shouldn't be an issue for learning it in chat, though. I love the idea of a colorful programming language, and ...


-2

TDG - Test Driven Golf popularity-contest Our company requires unit testing before code can be deployed to production. Unfortunately, my code is written in esoteric programming languages, none of which have test runners. Please help me get to production! Challenge Write a test runner for a programming language (here after called Language X) that takes ...


1

Navigate the city The government of your country has just completed a city designed to accommodate a few hundred thousand people. It has all sorts of facilities including roads, restaurants, malls, houses, etc. You have been invited to test the road system, but you are completely unfamiliar with it, so you need a GPS. Your challenge is to make one. ...


1

Biggest katlani noun dictionary in 400 bytes Post


2

Move to Right and left


3

Shanghai ascii game sticks code-golfascii-artpath-finding Posted


1

Off the Charts For an answer that has been proven to work correctly but can't realistically be run, for example because it would take an enourmous amount of time to execute.


5

Most complex answer For the answer so complex that few people or even no people can understand, yet it works beautifully while remaining golfed. These answers could be creative and long (but are not generated or just repeat the same code) The logic inside the code can't be understood by us mortals, but it works anyway. Geiger Counter in Klein XXX by Wheat ...


1

Kansas City Shuffle Reposted from 2018 Too often, someone devises a particularly golfy method of solving a challenge, which 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 ...


3

Breaking The Mold (Most Original Challenge) Reposted from 2018 It's really easy to come up with normal code-golf and ascii-art, or sequence challenge, etc. Don't get me wrong, there's nothing wrong with these challenges. They're the meat of the challenges on our site. However, they're not the most imaginative. This category is for a challenge that re-invents ...


2

Most improved answer This category is to reward the continued work users put into answers long after they have been posted. After the FGITW effect has dissipated there stops being so much incentive to work on an old answer, but some users put in the effort and really make it shine. The ideal answer here would be one that demonstrates a significant ...


3

Most helpful commenter Repost of 2020 2018 One of the things that stands out about this community is that although it's highly competitive, there is nearly always someone on hand to offer advice both on improving challenges and improving answer scores. It's part of what made this site seem so welcoming to me. In recognition of this, nominees should be people ...


3

Wild card Repost of 2020. For a deserving challenge, answer, or user that isn't a good fit for any of the other categories. quintopia's Befunge-93 in Befunge-93 Interpreting Befunge 93 is already not very easy, but doing it within Befunge 93 is a behemoth in itself. This uses the existing features of befunge to simulate the program within its own playing ...


1

Most helpful Sandbox commenter The Sandbox is a very useful tool to help improve people's challenges, and functions best when users provide helpful advice and feedback on the drafts. This category should reward the users who helped the most in the Sandbox during 2021 Razetime Nominated by Redwolf Programs Using my offline copy of TNB's transcript, I compiled ...


2

Best trickiest challenge Similar to a category from 2020 (but slightly reworded to reward not purely hard, but also fun, challenges). It should look simple and tempt you to start coding right away, but coming up with a good solution should be hard. Infinite ordinals from a well-ordering by AnttiP Nomination by Bubbler This one fits in many categories (Rookie ...


1

Most Interesting King of the Hill Submission For the best answer to a KotH challenge. Specifically, the one with the most interesting or complex strategy. We had 14 KotHs this year, with a total of 179 answers, so it's quite likely there's some really great ones that should be recognized. I think it's especially important to recognize good answers to KotH ...


3

The most unexpected outcome An answer that you didn’t expect to work, or do something else, but unexpectedly did some weird behavior and made the answer valid. This could involve some interpreter bug, or obscure feature that wasn’t documented nor known by many people. Print instructions for typing \` in chat by DLosc Self-nomination At first, I thought this ...


3

Most significant impact via Meta Meta is an important yet often overlooked portion of this site, where significant rules changes are decided, and the site becomes the most democratic. It allows people to present their visions of the site, and for others to show their agreement or disagreement, and contributions can be just as important - if not more - than ...


1

Most Underappreciated Challenge Repost from 2020 For the best challenge that didn't really get noticed. Sometimes a challenge, especially one that's tough or not vanilla code golf, only gets a few votes, maybe an answer, then disappears. Solving a difficult challenge is rewarding; there's no reason we shouldn't reward the difficult challenges (that don't get ...


2

Best Tip Repost from 2020 For the best answer to a question tagged with tips, because this site isn't just about competing with one another, but also about helping each other improve our golfing skills The shortest infinite for comprehension (self-nomination by pxeger) While answering Write an infinitely nested generator comprehension, I discovered a way to ...


3

Wrong tool for the job Repost from 2018 This category is for an answers that use the worst possible language to accomplish a task, while still making an effort to optimize the score. For example, writing a non-trivial program while using an extremely minimalist language like 7, or an inconvenient language like lost, or even a normal language that's missing ...


2

Rookie of the Year - Answers Repost from 2020 and other years. For the best answer written by a new user in 2021. This doesn't have to be a user who created their account in 2021 - rather, this is for any answer posted by a user in 2021 where that answer was that user's first answer on the site. SEDE query modified from the 2020 one Counting universal n-ary ...


4

Most involvement in an answer/answers Repost of 2020 For an answer or multiple answers where multiple people were involved. This could be multiple people helping out a user on a single answer, or a back-and-forth between two or more answers trying to outgolf each other. 69 answers to Print X Without X by lyxal, Aaroneous Miller and emanresu A Partial self-...


1

Best Explanation Repost from 2020, 2019, 2018, 2017, 2016 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.


2

Best non-code-golf challenge Repost from 2020 Best challenge with a winning criteria other than code-golf. While code-golf is our bread and butter, we have some very interesting others with fastest-code, proof-golf, atomic-code-golf, (some) code-challenges, etc. Concatenated halting problem: no + no + ... = yes by Bubbler Self-nomination I think this one was ...


2

Rookie of the Year - Challenges Repost of 2020, 2019, 2018. For the best challenge written by someone who has not written a challenge prior to 2021 emanresu A for pretty much all their questions (nominated by pxeger) Being a new user in 2021 and posting consistently high-quality, interesting, and well-received challenges. I'd like to specifically point out ...


2

Best mathematical insight Repost of 2020, 2019, 2018. 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 ...


2

Slowest Gun in the East Too often, late answers are overlooked, and end up with fewer upvotes than answers posted immediately after the challenge is posted. This category is aimed to reward impressive answers posted a while after the challenge was originally posted and that went unappreciated, compared to the FGITW answers.


0

Animate finding the middle (hypercube edition) Given a multidimensional array of integers where all dimensions are the same length, animate finding the centre of it. Simply output the array, then remove the first and last items of every array within it and output it, until it has less than 3 elements left. For example, with this 2-dimensonal array: [ [7, 2, ...


6

Sort every dimension


2

Allowed byte count is \$\log_{256}k\$ If a chosen length has \$k\$ states, then it has \$\log_{256}k\$ bytes. Allowing arbitrary byte count lead to some weird languages(lenguage but the length ^-1). Trying to abuse it save at most half of length.


2

Regex ordinals Inspired by this xkcd comic, your job is to write an extremely meta regex. Specifically, the depth of a regex is an ordinal defined as follows: regex golf has depth 0. meta-x has depth 1 greater than the depth of x. The depth of <regex> is the supremum of the depths of everything <regex> matches. Of course, it's possible for a ...


0

Euler Irregular Primes Your challenge is to find all Euler Irregular Primes (A prime p is Euler-irregular if it divides an Euler number E(2n) with 0<2n<p−1) under n. Scoring Your goal is to use the least amount of bytes.


5

Inject arbitrary code into a compiler cops-and-robbers In this challenge, cops will invent a (likely simple) programming language, and write an interpreter, transpiler, or compiler that allows you to run it. Robbers will write a program in this language that manages to inject arbitrary code into the interpreter, transpiler, or compiler. Cops Cops should ...


0

Move the next greater number, with fewest fails to take everything Your task is to move the next greater number, with fewest fails to take everything A fail counts if a step is the lower number (not counting equal) The starting point is the top left corner Example: 1234 Can do like this >>> Because moves to right, the next number is greater than ...


1

Cell Evolution Your lab needed to simulate how a particular cell evolves over time in a 2D grid space. A sample 2D grid space below shows a single cell at the centre of the grid. 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 The cell evolution follows these rules: '0' indicates no live cell A positive number indicates a live cell. The number indicates ...


3

Is this continuous terrain? Part II


0

Help Bob split his apples Bob has a lot of apples, and he wants to split his apples with his friends evenly. (Including Bob.) However, every \$k\$th friend already has a lot of apples and does not need apples. Bob, however, is kind so he gives each \$k\$th friend the number of apples the friend already gives floor divided by three. Given the input format ...


Top 50 recent answers are included