Questions tagged [classification]

Classification challenges involve grouping input data into certain classes based on the properties of that data.

Filter by
Sorted by
Tagged with
14 votes
5 answers
704 views

Is this propositional formula an instance of an axiom?

Please help me automate my discrete mathematics homework. Given a valid propositional formula, check if it is an instance of one of Łukasiewicz's axioms. Here's how it works. A term can be defined ...
user avatar
3 votes
9 answers
1k views

int, float or neither?

Given a string, determine if it is an int, a float or neither. Examples 123 - int 62727.0033 - float 644c.33 - neither Your code should output a different value depending on which it is. For example ...
user avatar
  • 393
14 votes
3 answers
1k views

Recognize a Roboto Mono character

Your input will consist of an 18×18 image in any reasonable format, containing a horizontally and vertically centered 14px Roboto Mono character. This can be any of 94 printable ASCII characters (not ...
user avatar
6 votes
4 answers
185 views

Ordered, linear, affine, or relevant?

Background Supplementary reading 1, Supplementary reading 2 Linear lambda calculus is a limited form of lambda calculus, where every bound variable must be used exactly once. For example, ...
user avatar
  • 62.9k
12 votes
2 answers
277 views

Classify a graph

Challenge Given a graph (a structure consisting of nodes and vertices), classify it according to a few categories. Specifically, you will be given an unweighted directed graph, which is a set of nodes ...
user avatar
  • 40.2k
7 votes
5 answers
261 views

Matching homologous groups

Homologous series, any of numerous groups of chemical compounds in each of which the difference between successive members is a simple structural unit. As an example, Alkane is a homologous group ...
user avatar
  • 11.9k
7 votes
1 answer
363 views

Identify the Kaomoji!

Background This is loosely based on the now closed Kaomoji question asked a few hours ago. Kaomojis are sequences of characters designed to express a given emotion. In this code-challenge, you'll be ...
user avatar
33 votes
9 answers
4k views

Is it a still-life?

The Problem: You receive a (section of) a Conway's Game of Life grid. Your task is to output whether it represents a still-life (subsequent generations are identical to the current grid), a ...
user avatar
  • 2,005
8 votes
9 answers
1k views

Shantae Dance Matching

In the original Shantae game, there are transformation dances that you have to input in time using the D-Pad, A, and B. If you complete a predefined sequence while dancing, you will transform into the ...
user avatar
  • 9,791
10 votes
10 answers
729 views

Check type of an integer

You will receive an integer less than 2000000000 and bigger than -2000000000 and you have to test what type(s) of number this is out of: ...
user avatar
19 votes
4 answers
1k views

What have we got?

Inspired by, and in memory of, our beloved genius, R.I.P. He invented and implemented dfns — his magnum opus and the subject of the challenge. For the interested: latest full dfns documentation and ...
user avatar
  • 27.7k
20 votes
23 answers
3k views

Playing with the musical turtle

My two kids like to play with the following toy: The colored areas with the shapes inside can be touched and the turtle then lights the area and plays a sound or says the name of the color or the ...
user avatar
  • 12.6k
12 votes
5 answers
2k 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 ...
user avatar
15 votes
16 answers
5k views

Is the bus load legal?

I was in the bus today, and noticed this sign: ...
user avatar
  • 27.7k
3 votes
4 answers
508 views

Pocket Pokemon Type Evaluator

Yes, I know there are already three pokemon type questions, but almost all submissions hardcode the whole chart in one way or other. I think it'd be nice to change the requirement a bit to encourage ...
user avatar
  • 406
16 votes
8 answers
694 views

Classify a region by its slope

Definitions The kth ring of a square matrix of size N, where 1 ≤ k ≤ ceiling(N/2) is the list formed by the elements of the kth and (N-k+1)th rows and columns, but without the first and last k-1 ...
user avatar
  • 41.4k
16 votes
10 answers
3k views

Assign Airliner Seats

Inspired by last week's APL lesson. Given an uppercase 2D seat map and a 1D list of customers, return the seat map and the customer list but modified as follows (to indicate occupied seats and seated ...
user avatar
  • 27.7k
36 votes
21 answers
4k views

Woody words, tinny words

Note: There are some rude words in this question. There's an implicit puzzle posed in this classic Monty Python sketch (you can also ready the script online). Various phrases are described as being ...
user avatar
  • 11.1k
16 votes
4 answers
684 views

There's no such thing as a "half empty glass"

You probably know the rhetorical question of whether a glass is half full or half empty. I'm getting a little tired of the phrase, so I decided that it's time to eliminate this confusion about glass ...
user avatar
0 votes
1 answer
156 views

In which number set do I belong? [closed]

Introduction Mathematicians often work with number sets. These are groups of numbers that share common properties. These are number sets are, in order from most specific to most broad: ...
user avatar
  • 2,273
11 votes
3 answers
346 views

What's assignable to what?

related What's assignable to what? In this challenge you will be given two types, A and B and determine if ...
user avatar
13 votes
17 answers
1k views

Ten-row bar chart

This is Hole-1 from The Autumn Tournament of APL CodeGolf. I am the original author of the problem there, and thus allowed to re-post it here. Given a list of numbers, produce a horizontal bar chart ...
user avatar
  • 27.7k
-2 votes
2 answers
364 views

Is my password secure?

Task: Take a string as input and if it meets the requirements, accept the password. Input: a string, e.g. someString, ...
user avatar
  • 115
15 votes
17 answers
3k views

Tic-Tac-Toe - X or O?

Background Skip to "Task" if you are familiar with Tic-Tac-Toe (I think most are!) Tic-Tac-Toe is a famous two-player game. It consists of a 3x3 board that is filled gradually by two players ...
user avatar
  • 41.4k
14 votes
29 answers
3k views

Weird grading system

Weirdo Incorporates have a weird way of grading their staffs by the number of days they were present in the office: ...
user avatar
  • 2,759
3 votes
6 answers
627 views

Perfect, Germain, Vampire, Mersenne! (Don't forget narcissistic) [duplicate]

Six is a number perfect in itself, and not because God created all things in six days; rather, the converse is true. God created all things in six days because the number six is perfect. I am ...
user avatar
12 votes
19 answers
804 views

Make a lookup index

Given a string, return a table where the first column has the unique letters of the string in order of occurrence and subsequent columns list the indices of that letter in the string, using zero or ...
user avatar
  • 27.7k
25 votes
10 answers
859 views

Help me golf my numbers!

When writing code-golf programs, I usually end up using some numeric constants. I always put them in decimal because that's how I think, but I just realized that my language supports other number ...
user avatar
  • 4,672
27 votes
13 answers
3k views

Write a pluralization function for Russian

In English, nouns can take on two different forms depending on whether they are singular (one) or plural (anything else). For example, we would say "1 dog" but "2 dogs", "0 dogs", "57 dogs" and so ...
user avatar
  • 7,672
14 votes
2 answers
369 views

Who's that Polygon?

A convenient and useful way to represent topological surfaces is with a fundamental polygon. Each side on a polygon matches to another side and can be either parallel or anti-parallel. For instance ...
user avatar
  • 88.7k
25 votes
6 answers
523 views

Appends or Prepends? Depends

Brain-flak turns one year old tomorrow! In honor of it's birthday, we're having a PPCG style birthday party, where several users post brain-flak related questions! Help us celebrate! :) Brain-flak is ...
user avatar
  • 57.2k
18 votes
6 answers
785 views

Lossy or Lossless?

Given an audio file, determine whether it is encoded in a lossy format or a lossless format. For the purposes of this challenge, only the following formats need to be classified: Lossy AC3 AMR AAC ...
user avatar
37 votes
8 answers
6k views

Read ASCII-Art Text

Inspired by Golf me an ASCII Alphabet, of which this challenge is (almost) a direct inverse. Task: Take a string of ASCII-art text and output the content of the text as regular ASCII text. Input: ...
user avatar
  • 16.2k
19 votes
5 answers
859 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 ...
user avatar
35 votes
26 answers
6k views

Do you know that language?

Task: Your challenge is, given previous submissions and itself as input, output the language that they're written in, in the following format: Say the first program is in Ruby. It must output ...
user avatar
  • 6,942
35 votes
10 answers
3k views

Help me recognise my monster

Background The computer game NetHack dates from 1987, before the use of graphics in computer games was widely established. There are lots of monsters in the game, and potentially a lot need to fit on ...
user avatar
60 votes
3 answers
1k views

Thinking outside the box - Am I doing it right?

I keep hearing that thinking outside the box is a goal worth achieving, but how can I tell if I'm successfully doing it? To solve this dilemma I have already wrote a Brainwave-to-ASCII-translator ...
user avatar
  • 25.1k
12 votes
9 answers
1k views

Polygonal Numbers!

Introduction In mathematics, a polygonal number is a number represented as dots or pebbles arranged in the shape of a regular polygon. The dots are thought of as alphas (units). These are one type ...
user avatar
  • 10.3k
27 votes
1 answer
833 views

Who's that PRNG?

Given a sequence of 625 32-bit unsigned integers (that is, in the range [0, 2**32)), output which of the following pseudorandom number generators generated the ...
user avatar
11 votes
3 answers
539 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 ...
user avatar
  • 33.8k
10 votes
11 answers
3k views

Is it truthy or falsy?

There are so many different ways to express whether something is true or not! The goal of this challenge is to produce a standardized output of truthy or ...
user avatar
24 votes
2 answers
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, ...
user avatar
  • 8,351
11 votes
8 answers
530 views

Golf the K-means algorithm

K-means is a standard unsupervised clustering algorithm, which, given a set of "points" and a number of clusters K, will assign each "point" to one of K clusters. Pseudo-Code of K-means Note that ...
user avatar
  • 35.8k
21 votes
6 answers
2k views

Determine If a Challenge is Worth Answering

I am a very casual code golfer, and don't often see posts until they show up in the "Hot Network Questions" sidebar over on StackOverflow. Usually, I'm late to the game, and since the only language I ...
user avatar
  • 1,628
21 votes
6 answers
1k views

Is this number random?

I asked random.org for 128 random integers between 0 and 232 - 1. Since the random number generator was so eager to give the first 64 numbers first, they're obviously more random than the other 64. ...
user avatar
  • 21.2k
9 votes
1 answer
371 views

Human Friendly Filename Detection

Introduction File names can be wildly varying things, ranging from a simple blah.txt to 303549020150514101638190-MSP0.txt. The ...
user avatar
  • 3,538
21 votes
6 answers
2k views

How many characters are there on the icon of a Stack Exchange site?

Given the name of a Stack Exchange site which doesn't have their own design yet, decide how many ASCII characters (non-ASCII ones are counted separately) are there on their icons. Your code should ...
user avatar
  • 36.1k
16 votes
6 answers
950 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 ...
user avatar
  • 4,434
350 votes
7 answers
45k 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: <...
user avatar
  • 28.4k
15 votes
3 answers
728 views

What language is this word?

Your should write a program or function that determines the language of a given word. The task is to recognize some of the 5000 most common words in 4 languages: English German Italian Hungarian ...
user avatar
  • 20.5k