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
29 votes
10 answers
3k views

What's my type? Well... Probably

There are a lot™ of pokemon. One of the defining characteristics of pokemon is their type, of which every1 pokemon has up to two types, a primary type and an optional secondary type. There are ...
DJMcMayhem's user avatar
  • 58.9k
12 votes
2 answers
285 views

Classify a surface from its fundamental polygon

This question is an extension of Who's that Polygon? to arbitrary numbers of sides. A fundamental polygon for a surface is an polygon with a prescribed pairing for all its \$2n\$ sides, each ...
Parcly Taxel's user avatar
  • 3,707
5 votes
2 answers
244 views

Canonical form of a cubic Bézier curve

On Pomax's Primer on Bézier Curves this "fairly funky image" appears: This is related to the fact that every cubic Bézier curve can be put in a "canonical form" by an affine ...
Parcly Taxel's user avatar
  • 3,707
11 votes
17 answers
434 views

Normal Subgroups of \$S_4\$

Objective Given a permutation of 4 distinct items, classify the permutation by the normal subgroup(s) it belongs. Input/Output Format You gotta choose the followings as the hyperparameters for your ...
Dannyu NDos's user avatar
  • 5,477
14 votes
5 answers
736 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 ...
KeizerHarm's user avatar
  • 1,171
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
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 ...
Rydwolf Programs's user avatar
6 votes
4 answers
251 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, ...
Bubbler's user avatar
  • 73.8k
12 votes
2 answers
306 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 ...
hyper-neutrino's user avatar
  • 41.3k
7 votes
5 answers
267 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 ...
Wasif's user avatar
  • 12.3k
7 votes
1 answer
390 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 ...
Rushabh Mehta's 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 ...
Spitemaster's user avatar
  • 2,125
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 ...
Beefster's user avatar
  • 9,891
10 votes
10 answers
800 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: ...
SimpleBinary's 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 ...
Adám's user avatar
  • 29.9k
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 ...
Charlie's user avatar
  • 12.8k
13 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: ...
Adám's user avatar
  • 29.9k
3 votes
4 answers
541 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 ...
Voile's user avatar
  • 406
16 votes
8 answers
699 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 ...
Mr. Xcoder's user avatar
  • 42.3k
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 ...
Adám's user avatar
  • 29.9k
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 ...
AJFaraday's user avatar
  • 11.8k
16 votes
4 answers
699 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 ...
Jonathan S.'s user avatar
0 votes
1 answer
159 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: ...
ericw31415's user avatar
  • 2,284
11 votes
3 answers
353 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 ...
Socratic Phoenix's 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 ...
Adám's user avatar
  • 29.9k
-2 votes
2 answers
368 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, ...
Joe's 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 ...
Mr. Xcoder's user avatar
  • 42.3k
14 votes
31 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: ...
officialaimm's user avatar
  • 2,779
2 votes
6 answers
714 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 ...
caird coinheringaahin g's user avatar
12 votes
19 answers
814 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 ...
Adám's user avatar
  • 29.9k
25 votes
10 answers
874 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 ...
musicman523's user avatar
  • 4,772
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 ...
Peter Olson's user avatar
  • 7,722
14 votes
2 answers
408 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 ...
Wheat Wizard's user avatar
  • 96.5k
25 votes
6 answers
536 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 ...
DJMcMayhem's user avatar
  • 58.9k
18 votes
6 answers
795 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
7k 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: ...
Steadybox's user avatar
  • 16.5k
19 votes
5 answers
879 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 ...
Nathan Merrill's 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 ...
clismique's user avatar
  • 6,972
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 ...
Laikoni's user avatar
  • 26.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 ...
Oliver Ni's user avatar
  • 10.6k
27 votes
1 answer
845 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
546 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 ...
Joe Z.'s user avatar
  • 34.7k
10 votes
11 answers
4k 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 ...
helloworld922's 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, ...
Dave's user avatar
  • 8,451
11 votes
8 answers
545 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 ...
Fatalize's user avatar
  • 38.4k
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 ...
wnnmaw's 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. ...
lirtosiast's user avatar
  • 21.4k
9 votes
1 answer
373 views

Human Friendly Filename Detection

Introduction File names can be wildly varying things, ranging from a simple blah.txt to 303549020150514101638190-MSP0.txt. The ...
Mwr247's user avatar
  • 3,574