Questions tagged [test-battery]
A problem whose scoring criterion involves running the output of a program through a large number of test cases.
37
questions
19
votes
6answers
1k views
The 1+ Metagolf Challenge
I'm letting this one out of the sandbox. Hopefully it is well-written and make sense, feel free to improve.
So in order to make 1+ more popular (and ease the creation of golfed 1+ text-printing ...
6
votes
2answers
297 views
2D interpolation
Given required values for an expression with 2 variables, output a short expression which fulfill these values
Input
You may take the input in any reasonable format, e.g. ...
15
votes
3answers
488 views
Bridge the Gaps
Given a black and white image with a white background and a set of black dots, paint a set of white pixels red, such that there is a path between each pair of black pixels.
Details
A path is a set ...
10
votes
0answers
296 views
Captcha Capture [closed]
Captchas aren't meant to be machine-readable, and that's terrible. It is time to end this obvious bout of unfounded hatred for machines just trying to let you know about great deals on ṗḧ@ṛḿ4ćëüẗ1ċäḷṡ ...
11
votes
5answers
1k views
The Onion, or Not The Onion?
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 ...
28
votes
4answers
1k views
Where's Blackhat?
Challenge
Write code which, given an image of a panel from a random xkcd comic, returns a truthy value if Blackhat is in the comic or falsey if not.
Who is Blackhat?
Blackhat is the unofficial name ...
33
votes
3answers
894 views
Build a golfing language with me
A lot of PPCG users helped with the creation of this challenge, both in chat and the Sandbox, specifically Martin Ender, AdmBorkBork, Emigna and user202729
Our community has found it necessary to ...
13
votes
6answers
981 views
Text to Brain-Flak
Your challenge is to turn input text to brain-flak code that will output the text.
Tutorial taken from here with permission here
Brain-Flak has two stacks, known as 'left' and 'right'. The active ...
15
votes
1answer
343 views
Strategic Vanishers
This post is loosely inspired by this mathoverflow post.
A Vanisher is any pattern in Conway's Game of life that completely disappears after one step. For example the following pattern is a size 9 ...
14
votes
1answer
550 views
Let's write a Minifier
Background
Minifiers are used, commonly, when serving JavaScript to your Web Browser. It is commonly used to reduce the number of bytes that have to be sent. Saving bandwidth is useful for obvious ...
15
votes
2answers
954 views
Mathematical Expression Showdown!
You are given 6 numbers: 5 digits [0-9] and a target number. Your goal is to intersperse operators between the digits to get as close as you can to the target. You have to use each digit exactly once, ...
22
votes
9answers
1k views
Is it a noun or not?
Given a string as input, determine whether it is a noun or not.
You will be scored on the 1000 most common English words, by how many you correctly label as a noun or not.
The program or function ...
11
votes
4answers
2k views
Remove the Salutations
Challenge
Hi, given a string as input, remove any salutations found at the start of the string.
The program which performs the most correct substitutions in under 50 bytes wins.
Salutations
Hey, a ...
2
votes
0answers
308 views
Is it a bird, is it a plane? [closed]
Challenge
Supplied an image, you must determine if the subject of the image is a bird or a plane.
If the image is a bird, your program must output
bird
and if ...
19
votes
5answers
836 views
Chess Analysis with Limited Information
In this challenge, you are given a limited amount of information about a particular game of chess, and you need to predict who won the game.
You are given two sets of data:
Piece counts (What pieces ...
12
votes
3answers
618 views
Combinatory Conundrum!
Introduction: Combinatory Logic
Combinatory logic (CL) is based off of things called combinators, which are basically functions. There are two basic "built-in" combinators, ...
11
votes
3answers
528 views
Print a specific value in the Wythoff matrix modulo 2
The Wythoff matrix is an infinite matrix consisting of the Grundy numbers of each square on a chessboard in Wythoff's game.
Each entry in this matrix is equal to the smallest nonnegative number that ...
44
votes
10answers
4k views
There can be only 1!
Your task is, given a positive integer n, to generate an expression that equals the number n.
The catch is: you're only allowed ...
27
votes
9answers
2k views
Golf a Brain-Flak Integer
Integers are tedious to represent in Brain-Flak. There are 8 operators:
...
8
votes
4answers
385 views
Sort a list of unknown values with the least amount of comparisons
In this optimization challenge you will write a program that sorts a single array by only comparing elements through asking the user on stdout to input comparison results on stdin.
The below protocol ...
24
votes
2answers
1k views
Guess the language
Introduction
This site is rapidly building up a huge dataset of code snippets, so let's do something with it!
Here's a data file. It contains 9,066 unique language+snippet pairs for 113 languages, ...
24
votes
1answer
591 views
Domain Name Appraisal
Domain name trading is big business. One of the most useful tools for domain name trading is an automatic appraisal tool, so that you can easily estimate how much a given domain is worth. ...
12
votes
2answers
937 views
Reconstruct a missing RGB channel
Look at these photographs of natural scenes, with one of the RGB channels taken out of them:
Source (with red): https://en.wikipedia.org/wiki/File:Altja_j%C3%B5gi_Lahemaal.jpg
Source (with green): ...
9
votes
4answers
555 views
Find the shortest way to advance a counter to a certain number
I have a counter. It's a small device that looks like this:
The display goes from 0000 to 9999. It has a little push-button at ...
20
votes
2answers
1k views
Fun with flags!
Write a full program with a source code of 256 bytes or less that looks at an image of a flag and determines what country that flag is from. A zip file containing the 196 different flags in the ...
16
votes
6answers
929 views
Who said that? 2016 Presidential election
In this challenge, your task is to make write a program with less than 300 characters that takes a short paragraph or a few sentences that a candidate has said and output who said it.
Input: Can be ...
330
votes
7answers
42k views
Upgoat or Downgoat?
Given an image of a goat, your program should best try to identify whether the goat is upside down, or not.
Examples
These are examples of what the input may be. Not actual inputs
Input:
Output:
<...
17
votes
4answers
2k views
What's the Language?
Recently, the PPCG design leaderboard has been having some trouble parsing answer html headers.
In this challenge you'll be taking your own shot at parsing answer headers.
Example Test Cases
These ...
8
votes
7answers
611 views
The branch predictor challenge
Every day, every minute, ... every microsecond, many decisions are made by your computer. In high-level languages, these typically take the form of statements like ...
41
votes
9answers
5k views
Predict whether a message will be starred or not in 50 bytes
Given an input of a string consisting of any message from our site
chatroom taken
from the list described and linked below, output either a truthy or a falsy
value attempting to predict whether that ...
12
votes
4answers
589 views
Build a Nonographic Magnitude Optimizer™
A nonogram is a Japanese puzzle game in which the goal is to draw a black-and-white picture according to a list of contiguous regions, like so:
Define the nonographic magnitude of a row or column to ...
15
votes
5answers
983 views
Build a minimum-clue Sudoku unsolver
My attempt at stating this question, but with a more objective solving criterion.
Your task is to build a program or function that takes a solved Sudoku grid S in ...
15
votes
2answers
819 views
Build a top-front-side puzzle solver
A top-front-side puzzle is a puzzle where you are required to construct a 3-D shape of (usually cubic) blocks given three orthogonal views: a top view, a front view, and a side view.
For example, ...
33
votes
1answer
3k views
Voice recognition: “Yes” or “No”?
Task
Implement a program in minimum bytes of source or binary code that does voice recognition of a voice sample (me saying "yes", "yeah" or "no" in voice or in whisper, plainly or quirkily) based on ...
34
votes
17answers
5k views
Create a Flood Paint AI
In the game of Flood Paint, the goal of the game is to get the entire board to be the same colour in as few turns as possible.
The game starts with a board that looks something like this:
...
7
votes
2answers
905 views
Build a program that creates a minimal one-ohm resistor diagram for a given resistance
You are a contractor for a company who designs electrical circuits for the various products they make. One day, the company accidentally gets a huge shipment of one-ohm resistors and absolutely ...
49
votes
10answers
9k views
Build a random number generator that passes the Diehard tests
While there are many code golf questions on here involving randomness, I haven't seen one yet that actually asks for building an algorithmic pseudorandom number generator. There's this one that asks ...