Questions tagged [classification]
Classification challenges involve grouping input data into certain classes based on the properties of that data.
61
questions
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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:
...
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 ...
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 ...
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 ...
15
votes
16
answers
5k
views
Is the bus load legal?
I was in the bus today, and noticed this sign:
...
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 ...
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 ...
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 ...
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 ...
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 ...
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:
...
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 ...
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 ...
-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, ...
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 ...
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:
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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
...
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:
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
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.
...
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 ...