Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [puzzle-solver]

Use this tag if your challenge is about writing programs that solve puzzles such as Sudoku, Rubik's Cube, Crossword puzzles, etc.

10
votes
1answer
193 views

Tatamibari solver

Background Tatamibari is a logic puzzle designed by Nikoli. A Tatamibari puzzle is played on a rectangular grid with three different kinds of symbols in it: +, <...
24
votes
2answers
505 views

Nonogram line brute-force solving

Background Nonogram, also known as Picross or Griddlers, is a puzzle where the objective is to determine if each cell on the 2D grid should be colored or left blank, using the numbers of consecutive ...
8
votes
2answers
953 views

Solve a Rubik's Cube

Your challenge is to write a program to solve a 3x3x3 Rubik's Cube. This challenge is based on this one from 2013, rewritten to adhere to current community standards, and reposted with the original ...
8
votes
9answers
460 views

Make sets disjoint without emptying them

Suppose you have a set of sets of integers. It's possible that some of the sets will overlap (i.e. sharing elements). You could get rid of the overlaps by deleting elements from the sets, but then ...
39
votes
3answers
1k views

Solve this Alcazar for me

Recently I've been playing a game called Alcazar. It is a board puzzle game where your goal is to enter from one door, pass through all squares, and exit through another door. The only rules are: ...
17
votes
2answers
507 views

Solve a Matchstick puzzle

On puzzling SE there are what are called "matchstick problems" in which math is written in match sticks and you are allowed to move a certain number of them to get a certain property. In this ...
13
votes
5answers
297 views

Lights out, 7-segment version

Given a 7-segment display with some segments switched on and some off, find a sequence of digits (0-9), such that after toggling the corresponding segments for each digit, all segments are switched ...
12
votes
1answer
291 views

Help Beth escape the desert

While similar to the other water-carrying puzzle, the unique aspects of this challenge make it entirely different. Beth is located at an oasis in the middle of a desert. There is plenty of water in ...
4
votes
1answer
511 views

Witness My Challenge (Tetris Puzzle)

Introduction In the game The Witness (possible spoilers ahead) there is a group of puzzles that involve drawing a Tetris piece with your line while making sure that the symbol for the Tetris piece ...
13
votes
1answer
337 views

Group these cells!

This challenge is based on the game Layerz. Given, on stdin or as a function argument, a 2D rectangular array of cells where each cell contains either a blank (you may choose to use 0s instead of ...
14
votes
1answer
429 views

Taxicab in San Francisco

You are a taxicab driver in San Francisco. As is typical of taxicab drivers, you are navigating a grid where the only valid directions you can move are the left, right, up, and down. However, San ...
3
votes
4answers
612 views

100 Prisoners and a light bulb

100 Prisoners and a light bulb You may have seen this puzzle over on the puzzles exchange or perhaps heard it somewhere else. If you are unfamiliar with this puzzle check out: 100 Prisoners and a ...
8
votes
5answers
377 views

Retrieve all possible marks that can be placed in a Sudoku puzzle [closed]

Given a Sudoku puzzle, find all possible marks that can be filled into each empty cell. Test case Input: ...
4
votes
4answers
233 views

Counterfeit Coins on a Pointer Scale

You sell gold coins. Each gold coin you sell is supposed to be 1 ounce. However, you find out that one of your coin suppliers is cheating you. By alloying the gold material with something else, their ...
22
votes
1answer
1k views

Solve Grid-Tangram

The Tangram is a dissection puzzle made from seven shapes: Five differently sized triangles, a parallelogram and a square. Given a shape, the goal is recreating the shape using all the pieces and ...
20
votes
6answers
2k views

Can you beat the British Intelligence? (Nonogram Solver)

It is time to embark on a perilous quest to defeat the British Intelligence. The aim of this challenge is to write the shortest code that will solve a Nonogram. What is a Nonogram? The rules are ...
35
votes
6answers
1k views

Solve the chromatic puzzle

Over at our friends at Puzzling.SE, the following puzzle was posted: Is this chromatic puzzle always solvable? by Edgar G. You can play it here. Puzzle explanation Given a ...
33
votes
7answers
2k views

A Tiny Explorer

You are an explorer, mapping an unknown world. Your ship is carried on the wind. Where it goes, who knows? Each day, in your spyglass, you see features to the north, south, east and west. You always ...
11
votes
1answer
707 views

Easy as ABC Solver

Easy As ABC, also known as "End View", is a puzzle where you are given an empty grid with letters around it; you must partially fill in the grid so that exactly one of each letter is in every row and ...
19
votes
1answer
622 views

Solve an 0h n0 board

0h n0 is a very simple and enjoyable game, a bit like Sudoku or minesweeper. Game rules (I recommend using the tutorial in the game if you can, it is very simple and useful) The puzzle starts with ...
22
votes
2answers
382 views

A Peak Experience: Quickly Visit All the Peaks

I am standing at point (0,0) in a H x W map where the altitude is represented by digits, for ...
12
votes
4answers
485 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 ...
10
votes
2answers
331 views

Crack the safe!

Inspired by https://puzzling.stackexchange.com/questions/24334/to-catch-a-thief You are given an n by n (...
7
votes
1answer
470 views

The Light Up Game

The Challenge The game Light Up! is a simple puzzle game where the objective is to light up every cell in an n-by-n array with light bulbs. However, there are blocks in the way that will prevent ...
16
votes
1answer
488 views

Given a list of lengths, and a string representing those lengths, do they match?

Given a pattern representing a list of lengths, and a string representing those lengths, do they match? For those interested, this is question equivalent to verifying if a row or column of a Nonogram ...
1
vote
1answer
298 views

The Truck Problem [closed]

I am a teacher who was given a problem a few years ago. Every year since I have given it to my advanced students as a bonus assignment, but in ~10 years only 8 solved it, each with a slightly ...
-7
votes
7answers
337 views

Puzzle: Factor these 256-bit semiprimes [closed]

Challenge Write a program to factor this set of 10 numbers: ...
-10
votes
1answer
623 views

Hard Puzzle Game Solver [closed]

There is an app called Hard Puzzle which is a game where there is a red circle, and you have to fill all of the surface area with five smaller white circles it may seen easy, but it's harder than it ...
16
votes
1answer
857 views

We love our weird puzzles, us Brits

In a few British newspapers there is a game known as Hidato. It is somewhat similar to Sudoku, albeit instead of having 1-9 in a line and block, it's about placing numbers such that they connect in ...
3
votes
0answers
461 views

Stone Maze Chess solver [closed]

Background: Every war eventually comes to an end, but the end is never absolute. The Stone Maze Chess scenario takes place after a game of chess is finished. The enemy King is dead and the pieces is ...
16
votes
3answers
993 views

Build a poisoned wine testing scheduler

Recently at Puzzling.SE, there was a problem that I wrote about determining which two bottles out of a larger number are poisoned when the poison only activates if both components are drunk. It ended ...
18
votes
3answers
990 views

Stringing a Pearl Necklace

Overview Pearls (or Masyu) is a logic game played on a grid. There are black and white pearls placed on the grid. The object is to form a single, closed loop that travels through each pearl using ...
5
votes
1answer
710 views

Solving a Jigsaw Puzzle!

I've just bought a new jigsaw puzzle but, as a programmer, I'm too lazy to do it by myself. So I've devised a way to encode the pieces, and now I need a way to solve the puzzle itself. Challenge A ...
13
votes
4answers
902 views

Is the word typeable with keys adjacent to each other?

Before reading this I suggest reading this little puzzle: https://puzzling.stackexchange.com/questions/11408/longest-word-with-adjacent-letters-on-a-keyboard I want you to make a program that takes ...
15
votes
2answers
769 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, ...
6
votes
1answer
409 views

Evening Commute Solver

I recently moved to an apartment overlooking the inner ring-road of town, and every day, a beautiful scene unfolds. The traffic lights are apparently so confusing (mostly because the Dutch are used to ...
15
votes
2answers
857 views

How do I get more Klotski in my life?

I really love sliding tile puzzles, but recently, I haven't had time for them. Hence, I need a program to give me my fix of sliding-tile puzzles, specifically Klotski puzzles. Your input will be in ...
11
votes
1answer
627 views

Constructing an Orthogonal-Diagonal Greco-Latin Square

Consider a grid of NxN unique elements. Each element has a letter (from A to the Nth letter,...
22
votes
2answers
508 views

Water held in a hexagonal rod scuplture

I have bunch of hexagonal rods glued together into an odd sculpture. The rods are 1 to 99 centimetres (cm) long and 1 square cm in cross-section area. All rods are glued on a hexagonal face to at ...
12
votes
2answers
1k views

Logical Dot Shapes

The Game Recently, much of my time has been taken up by an addicting game on my phone, called Logic Dots, which inspired me to write this challenge. It's easier to explain the rules if I show you the ...
3
votes
0answers
557 views

Chess Light Solver

Challenge Write a solver for the Chess Light puzzle game, in the smallest amount of code. The input will be a representation of a chessboard, how in yours is up to you. My examples below is textual, ...
13
votes
4answers
1k views

Solve the BattleBlock Theater Puzzle

The game BattleBlock Theater occasionally contains a puzzle which is a generalised version of Lights Out. You've got three adjacent blocks, each of which indicates a level between 1 and 4 inclusive ...
16
votes
2answers
705 views

A Good Time to Refuse

The Setup Suppose you're given n fuses, with 1 ≤ n ≤ 5, each of which is a meter long, and where each fuse has an associated burn rate of N meters per D hours. A fuse can be lit at one or ...
18
votes
1answer
867 views

Can you connect the dots?

This challenge is based off of Flow Free. An online version can be found here: http://www.moh97.us/ You will be given a puzzle, and you must return 1 if the ...
16
votes
2answers
4k views

Solve the (Rubiks) Pocket Cube

Your task .. is to do what Brian Fantana apparently couldn't do, and solve the 2x2x2 Rubik's Cube. The Layout ...
5
votes
0answers
311 views

Write a FAST word equation solver [duplicate]

This question is similar to Write a word equation solver by David Frank but different in three important ways: (1) David asked for just the first solution found, and I am asking for all the solutions. ...
16
votes
1answer
2k views

Build a MU puzzle solver

The MU puzzle is a puzzle in which you find out whether you can turn MI into MU given the following operations: If your string ...
17
votes
10answers
2k views

Write a word equation solver

Introduction Consider the following example: CODE + GOLF —————— GREAT This is an equation where each letter represents a decimal digit and the words ...
20
votes
4answers
2k views

Build a pair of spies that will throw stones into a river

Recently at the newly released Puzzling.SE, there was a problem about spies throwing stones into a river that was actually quite challenging: Two spies must pass each other two secret numbers (one ...
7
votes
3answers
574 views

Optimally solve the Flux Puzzle

Flux is very similar to the Fifteen Puzzle. However, instead of numbers, the squares are colors. There are 4 colors: Red, Yellow, Blue, and Gray. There are exactly 4 red squares, 4 yellow squares, ...