New Sandboxed Posts

 The Nineteenth Byte

The Nineteenth Byte: General discussion for codegolf.stackexc...
Aug 18, 2018 23:54
0
A: Sandbox for Proposed Challenges

Erik the OutgolferShould I index like this or like that? code-golf integer decision-problem Challenge Let's take a 0-indexed array of length \$l\$. You can index into it with \$i\$, where \$-l\le i<l\$, and the returned element is the element in position \$[i<0]\times l+i\$ (\$[\dots]\$ is the Iverson bracket). ...

Aug 18, 2018 23:39
0
A: Sandbox for Proposed Challenges

Rushabh MehtaPolite Near-Sighted Drunk Bot on a Minefield As the title may suggest, this problem is semi-inspired by the Polite Near-Sighted Drunk Bot by @N.P. Our poor bot is placed on a cartesian grid at the origin, and after each minute, it moves 1 unit in one of four directions (Up, Down, Left, Right)....

Aug 17, 2018 21:48
0
A: Sandbox for Proposed Challenges

flawrP Pr Pre Pref Prefi Prefix Prefixe Prefixes code-golflistarray Given some finite list, return a list of all its prefixes, including an empty list, in ascending order of their length. (Basically implementing the Haskell function inits.) Details The input list contains numbers (or another ty...

Aug 17, 2018 19:02
0
A: Sandbox for Proposed Challenges

Conor O'BrienChain Classification answer-chaining related Objective: Write a program (whose index in the chain of answers is \$n\$) which, when given any program with index \$i\$ (\$ 1 \le i \le n\$), outputs \$i\$. (The program may do anything else given any other string input, including but not limited ...

Aug 15, 2018 14:02
0
A: Sandbox for Proposed Challenges

ngnMeta: I'm reposting this in the sandbox on behalf of behalf of @RushabhMehta. It was in main for a couple of days but we decided that it needs more time in the sandbox to resolve some issues. Today's challenge will involve some interesting knot theory, and involve you calculating one of the mo...

Aug 15, 2018 10:29
0
A: Sandbox for Proposed Challenges

Beta DecayReverse the Flags code-golf kolmogorov-complexity Challenge Given a flag emoji as input, output its reversed emoji. What does this mean? Well, if you take the UK flag emoji, 🇬🇧, and run it through the python program: print(''.join(reversed("🇬🇧"))) Try it online! Then the output will b...

Aug 14, 2018 20:53
0
A: Sandbox for Proposed Challenges

WoofmaoGolf me some Golf code-golf game Write a program to play Golf solitaire! (I'm somewhat surprised that I haven't seen this pun yet.) How to play Golf uses a standard 52 card deck. Play begins with 7 stacks of 5 cards each, one card forming the foundation, and the remaining 16 cards forming the...

Aug 14, 2018 19:52
0
A: Sandbox for Proposed Challenges

Rushabh MehtaGraph 5-Coloring Honestly, I can't believe this hasn't already been asked, but here it is Background Given a simple undirected planar (the graph can be drawn in the plane without intersections) graph, it is a proven theorem that the graph is 4-colorable, a term we will explore in a bit. Howeve...

Aug 14, 2018 18:06
0
A: Sandbox for Proposed Challenges

Aidan F. PierceMost distinct Turing-complete character subsets (Inspired by Fewest (distinct) characters for Turing Completeness) code-challenge restricted-source Challenge: In any language you choose, find the greatest number of distinct and disjoint subsets of characters allowed in that language (i.e. no ...

Aug 13, 2018 13:20
0
A: Sandbox for Proposed Challenges

Beta DecayArt Attack KoTH king-of-the-hill javascript Challenge Try to fill the canvas with as much paint as possible. Controller The controller can be found here: https://gist.github.com/beta-decay/10f026b15c3babd63c004db1f937eb14 Or you can run it here: https://beta-decay.github.io/art_attack Win...

Aug 13, 2018 05:01
0
A: Sandbox for Proposed Challenges

Esolanging FruitExpand and Contract code-golf number decimal Take a positive integer \$k\$ as input. Start with \$n := 1\$ and repeatedly increase \$n\$ by the largest integer power of ten \$i\$ such that \$i \le n\$ and \$i + n \le k\$. Repeat until \$n = k\$, returning all intermediate values of \$n\$. Dur...

Aug 12, 2018 20:59
0
A: Sandbox for Proposed Challenges

Rushabh MehtaA Knotty situation Today's challenge will involve some interesting knot theory, and involve you calculating one of the most important objects in all of knot theory. But before that... Background Although there are more technical definitions, for this challenge, it is enough to think of a knot ...

Aug 12, 2018 11:41
0
A: Sandbox for Proposed Challenges

NeilMake a reversible formula For the purposes of this question: a basic formula \$ y = f(x) \$ takes one of the following forms: $$ x \\ g(x) + c \\ c + g(x) \\ g(x) - c \\ c - g(x) \\ g(x) c \\ c g(x) \\ \frac {g(x)} c \\ \frac c {g(x)} $$ where \$ g(x) \$ is a basic formula; a reversible f...

Aug 12, 2018 00:52
0
A: Sandbox for Proposed Challenges

Chas BrownalphabeTree Challenge When looking at a list of words, sometimes it seems like a lot of redundancy is present. Consider the following list of words: balderdash ballet balloonfish balloonist ballot brooding broom All of the words start with b, and the first 5 start with bal. If we just look a...

Aug 11, 2018 22:06
0
A: Sandbox for Proposed Challenges

OMá—º4B/5B Encoding Tags: code-golf, encode, kolmogorov-complexity, string To transmit data in binary there's a technique called NRZI where a transition from +V to -V or vice-versa encodes a 1 and the absence of such a transition a 0. In case there are a lot of 1 s this is a good method because t...

Aug 11, 2018 17:35
0
A: Sandbox for Proposed Challenges

Nathan MerrillGame of Circles king-of-the-hill This is a hidden-identity game with Detectives and Robbers. You will write either a Detective bot or a Robber bot. All Robbers know the identity of all other Robbers. Each turn, a bot must either: Draw a private circle: The actual circle drawn is public in...

Aug 10, 2018 20:41
0
A: Sandbox for Proposed Challenges

Rushabh MehtaGoldbach's Comet I was playing around with Goldbach's conjecture, and decided to plot evens (on the x-axis) vs the number of ways that two primes could be found to sum to a given even on the y axis. The two plots I've made below in Python are for 10,000 and 1,000,000 evens. The structure of...

Aug 10, 2018 16:39
0
A: Sandbox for Proposed Challenges

Beta DecayCount Like a Babylonian code-golf number Challenge Given an ASCII representation of a Babylonian number as input, output the number in Western Arabic numerals. Babylonian Numeral System How did the Babylonians count? Interestingly, they used a Base 60 system with an element of a Base 10 syst...

Aug 10, 2018 14:38
0
A: Sandbox for Proposed Challenges

Jeff ZeitlinMingle and Select The programming language INTERCAL has two operators, "mingle" or "interleave" (represented by $), and "select" (represented by ~). Mingle takes two 16-bit values and produces a 32-bit value by taking single bits alternately from its left and right operands, and concatenating t...

Aug 10, 2018 13:22
0
A: Sandbox for Proposed Challenges

FatalizeFill up to duplicate ranges Let \$L\$ be a list of positive integers with no particular ordering, and which can contain duplicates. Write a program or function which outputs a list of positive integers \$M\$ (whose ordering is unimportant) such that the union of \$L\$ and \$M\$ results in a list...

Aug 10, 2018 12:37
0
A: Sandbox for Proposed Challenges

Luis felipe De jesus MunozNumbers Addition Challenge Given a list of numbers K and a desired result N your task is to output the expression which can be used to get N using only plus operator + and minus operator - Example: [3,7,9,3,-5,7,0,-5], 11 => 3 + 7 + 9 - 3 - -5 - 5 + 0 + -5 Rules Only one operator can be us...

Aug 10, 2018 01:50
0
A: Sandbox for Proposed Challenges

xnorPrimality testing expression code-golf restriced-source decision-problem Your goal is to determine whether a given number n is prime in the fewest bytes. But, your code must be a single Python 2 expression consisting of only operators the input variable n integer constants parentheses No lo...

Aug 9, 2018 23:04
0
A: Sandbox for Proposed Challenges

BeefsterBidirectional Reverse Quine quine code-golf Create a program that outputs its own source code in reverse order. This reversed quine should also be a program with the same properties. More succinctly, abc outputs cba and vice-versa. Rules No palindromes. There are already palindrome quine c...

Aug 9, 2018 05:45
0
A: Sandbox for Proposed Challenges

labmannA function to traverse an array and re-generate the same array We take an array, then write a function that will traverse the array and generate the array in a format given in the example below. For example, given the array: Array ( [0] => Array ( [name] => Tom [age] => 32 [k...

Aug 8, 2018 20:50
0
A: Sandbox for Proposed Challenges

Redwolf ProgramsRobot Economy king-of-the-hill In this KoTH, your bot will try to get rich. There are 3 ways to get money: Farming, Mining, and Fishing. As the bots collect items, they must sell these items to other bots. They can also upgrade tools. At the end of the time period, whichever bot has the most to...

Aug 8, 2018 16:38
0
A: Sandbox for Proposed Challenges

AdmBorkBorkMake the biggest and smallest numbers Inspired by this post over on Puzzling. Spoilers for that puzzle are below. Given three positive integers as input, (x, y, z), construct the inclusive range [x, y], concatenate that together, then remove z not-necessarily-consecutive digits to produce the l...

Aug 8, 2018 05:50
0
A: Sandbox for Proposed Challenges

tshCompare version numbers Input two version numbers (decimal numbers joined by dots in string format), compare them, and, output 3 distinct values for the result. I cannot find a duplicate, if some one find it, please point it out. Details will come up later if no duplicate found.

Aug 7, 2018 15:23
0
A: Sandbox for Proposed Challenges

l4m2Define X as non-empty non-self-contain array of X and "1". Split an X into smallest amount of continuous parts Y, length of each of Y don't exceed n, so that each X is either part of a Y, or exactly some Ys. It's fine if output only express which part has how many 1's. Samples: [1,[1,1,1]],3 =>...

Aug 7, 2018 11:59
0
A: Sandbox for Proposed Challenges

OMá—ºMost Turing-incomplete Instruction Set Tags: code-challenge, language-design This challenge expects you to define an instruction set \$I = \{ \texttt{instr}_1 \dots \texttt{instr}_n \}\$ which is provably Turing complete. The catch is that any subset \$I'\$ that is proper (ie. \$I' \neq I\$) ...

Aug 7, 2018 09:24
0
A: Sandbox for Proposed Challenges

tshJust like the BSOD Write a program (or a function), which will display a full screen blue background with some optional white texts. Input No input. Output Output a full screen blue background with some optional white texts. Output must be displayed on the monitor. Not to a file or other w...

Aug 6, 2018 22:12
0
A: Sandbox for Proposed Challenges

Rushabh MehtaNote: this is my first time posting, so I need help fleshing out the details. I'm aware there are plenty of Roman Numeral problems, but this is somewhat different. When in Rome, count as Romans do! This problem is inspired by this website, which published the following diagram: This diagram ...

Aug 6, 2018 15:18
0
A: Sandbox for Proposed Challenges

Luis felipe De jesus MunozBalancing list of strings Lets define a balanced list of string as a list of strings where the length of each other are equal. Example: - Hello - House Above strings are balanced since both lengths = 5 - Codegolf - Puzzles Above strings are not balanced since the first one length = 8 and ...

Aug 6, 2018 05:47
0
A: Sandbox for Proposed Challenges

OMá—ºGomoku Tags: king-of-the-hill,board-game Related: Connect-n time! Gomoku or Five in a row is a board game played by two players on a \$15 \times 15\$ grid with black and white stones. Whoever is able to place \$5\$ stones in a row (horizontal, vertical or diagonal) wins the game. Rules In ...

Aug 5, 2018 19:59
0
A: Sandbox for Proposed Challenges

MegoThe Onion, or Not The Onion? test-battery classification decision-problem The Onion (warning: many articles are NSFW) is a satirical news organization that parodies traditional news media. In 2014, The Onion launched ClickHole (warning: also frequently NSFW), a satirical news website that parodi...

Aug 5, 2018 18:56
0
A: Sandbox for Proposed Challenges

OkxWork out Naismith's Rule code-golfnumber Naismith's rule helps to work out the length of time needed for a walk or hike, given the distance and ascent. Given a non-empty list of the altitude at points evenly spaced along a path and the total distance of that path in metres, you should calculate...

Aug 5, 2018 16:01
0
A: Sandbox for Proposed Challenges

AnushEdit distance for sparse strings The input to this challenge will be two strings of length one million each. Each string contains only zeros and ones. However each string will contain at most 100 ones and so will be represented by a sorted list of integers. The integers will indicate where the ...

Aug 5, 2018 01:12
0
A: Sandbox for Proposed Challenges

JungHwan MinAdvanced Transposition code-golf array-manipulation Inspired by the obscure 3rd optional argument of Mathematica's Flatten function Introduction Matrix transposition involves swapping the two indices in a rectangular 2d matrix. For example, $$ \begin{bmatrix} 1 & 2 & 3 & 4\\ 5 & 6 & 7 & 8\\ 9

Aug 4, 2018 17:16
0
A: Sandbox for Proposed Challenges

lol"Winner Winner Chicken Dinner" king-of-the-hillgamegrid In PUBG, 100 people fight in a large virtual arena. We, on the other hand, have neither 100 people, nor time to make such large virtual arena. So, We get our codes ready, and let them fight! == IN PROGRESS, ADVICE NEEDED ==

Aug 3, 2018 12:45
0
A: Sandbox for Proposed Challenges

Jo KingSixty percent of the time, it works every time code-golf random kolmogorov-complexity Your submission is a series of characters, that when rearranged in all possible permutations, should output Sex Panther* (in any case combination, so sex panther or SEx PaNTHer are valid) 60% or more of the ti...

Aug 3, 2018 08:34
0
A: Sandbox for Proposed Challenges

Kevin CruijssenCodegolf Rainbow : Fun with Integer-Arrays code-golfinteger Introduction: (Source: Wikipedia) When we look at a rainbow it will always have the colors from top to bottom: Red; orange; yellow; green; blue; indigo; violet If we look at these individual rings, the red ring is of course bigger t...

Aug 3, 2018 03:36
0
A: Sandbox for Proposed Challenges

OMᗺEncoding nested tuples Tags: code-golf, number-theory, set-theory, binary-tree Related: this Working on my recent esolang μ6 I found myself a neat puzzle: Given the set of all natual numbers and the set of all nested tuples over the natural numbers, find a bijection between those two sets. ...

Aug 2, 2018 04:19
0
A: Sandbox for Proposed Challenges

Redwolf ProgramsGold Collectors king-of-the-hill In this KoTH, the aim is to be the last bot alive. Coins will be placed in random areas, and your bot must get the coins first. If a bot runs into another bot, the bot with more coins wins, and the other bot dies. More details below. Coin types There will be 2...

Aug 1, 2018 10:30
posted on August 01, 2018 by sundar

Sort by what the digit pairs describe code-golf number sequence math Given a positive integer, we can form a new number that's described by its digits taken pairwise (with a leading 0 added for numbers with odd number of digits). For eg., 1234 can be read as one 2, three 4s - so, the output for 1234 is 2444. 643 has an odd number of digits, so a leading zero is added to make it even.

Aug 1, 2018 08:40
posted on August 01, 2018 by sundar

RTA (Reverse-Then-Add) root of a number code-golf number math The reverse-then-add sequence is a sequence obtained by adding a number to its reverse, and repeating the process on the result. For eg., $$ 5 + 5 = 10 \Rightarrow 10 + 01 = 11 \Rightarrow 11 + 11 = 22 \Rightarrow 22 + 22 = 44 \Rightarrow\text{ }... $$ Thus, 5's RTA sequence contains 10, 11, 22, 44, etc. The RTA root of

Aug 1, 2018 06:50
posted on August 01, 2018 by DLosc

DRAW me a picture: A QBasic metagolf challenge metagolf test-battery graphical-output binary-matrix The DRAW command in QBasic takes a string argument, consisting of instructions for moving the cursor and drawing line segments, and produces the appropriate line segments on the screen. The syntax of the instructions is very terse--perfect for a metagolf challenge! The challenge Write a p

Jul 31, 2018 21:07
posted on July 31, 2018 by Amphibological

Is this number evil? code-golfnumber Introduction In number theory, a number is considered evil if there are an even number of 1's in it's binary representation. In today's challenge, you will be identifying whether or not a given number is evil. The aim of this question is to become a catalogue of the shortest answers to this question, somewhat like the other catalogues we have. Challe

Jul 31, 2018 20:19
posted on July 31, 2018 by ngm

Order times fully written out in English, alphabetically A 12h format time of day can be fully written out in English according to the following rules: a word from one to twelve; a space; optionally a word from one to fifty-nine followed by a space; the "word" AM or PM. Examples: 1:31 AM => "one thirty-one AM" 11:12 PM => "eleven twelve PM" 4:00 AM => "four AM" Chal

Jul 31, 2018 13:40
posted on July 31, 2018 by wnnmaw

Evaluate Words Based on "Rules" (Skeptics.SE Crossover) I came across this picture, which I initially questioned and thought about posting to Skeptics. Then I thought they'll only tell me if this one case is true, but wouldn't it be great to know how true any "rule" really is? Today you're going program a skeptic-bot Challenge Write a program or function which when given a dictionary of v

Jul 31, 2018 11:13
posted on July 31, 2018 by Beta Decay

Stack Exchange Stock Exchange - V3 king-of-the-hill Challenge Write a program that buys and sells shares on the Stack Exchange Stock Exchange with the aim of making as much money as possible. Gameplay All players will start with 5 shares and $100. The game always starts with a share price of $10. Each game will have 100 rounds. In each round, your program will be supplied three arg

Jul 31, 2018 09:53
posted on July 31, 2018 by Kevin Cruijssen

crossed out 44 is still regular 44 ;( code-golfstringdatenumber Introduction On March 24th, 2015 @isaacg golfed his Pyth answer from 44 to 42 bytes. Since a cross out 44 (44) looks a lot like a regular 44, @Optimizer made the following comment: striked out 44 is still normal 44 :( After that, on October 21st, 2015, @Doorknob♦ golfed his Ruby answer from 44 to 40 (and later 38) byt