Questions tagged [sliding-puzzle]

Sliding puzzles are combination puzzles that involve moving flat pieces around to achieve a target configuration. Examples are 15-game or 2048.

Filter by
Sorted by
Tagged with
9 votes
1 answer

Sliding retrieval

Thanks, Uncle (the story) My slightly mad uncle recently left for the space colonies, and passed his pallet goods business to me. The rectangular warehouse is full of pallets of goods except for the ...
Phil H's user avatar
  • 1,432
6 votes
0 answers

Minimum cost of solving the Eni-Puzzle

You're tasked with writing an algorithm to efficiently estimate cost of solving an Eni-Puzzle from a scrambled state as follows: You're given m lists of containing n elements each(representing the ...
Conor James Thomas Warford Hen's user avatar
27 votes
22 answers

Is it a good 2048 board?

This is my first question here, so any suggestions in the comments would be appreciated! Thanks ;) Introduction One very common strategy for the 2048 game is never ever swiping down. This positions ...
dv02's user avatar
  • 393
14 votes
1 answer

Make a picture into a sliding puzzle

Summary The goal of this challenge is to create an undone image-version of a 15-puzzle / sliding puzzle also called taquin in french. Details: Given an input composed of: an image, an integer ...
Frédéric's user avatar
  • 2,119
101 votes
51 answers

2048-like array shift

Assume we want to shift an array like it is done in the 2048 game: if we have two equal consecutive elements in array, merge them into twice the value element. Shift must return a new array, where ...
greenwolf's user avatar
  • 1,051
14 votes
2 answers

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 ...
Nathan Merrill's user avatar
13 votes
1 answer

Code a Code Slidey Puzzle!

The most recognizable sliding puzzle is the fifteen puzzle. It has a 4 by 4 grid, 15 tiles, and one empty grid space. The tiles can only move into the empty space and must always be in line with the ...
Calvin's Hobbies's user avatar
17 votes
4 answers

Program a 2048 AI using an existing Framework

EDIT : Recently, my question has been proposed as a duplicate of 2048 Bot Challenge. I would like to stress that this question is different from that question, and will require answers to be thought ...
Sam Weaver's user avatar
15 votes
5 answers

Solve the Rotation puzzle

On some old Nokia phones, there was a variation of the fifteen puzzle called Rotation. In this variation, instead of sliding one tile at a time, you rotated four tiles at a time in one direction. In ...
Joe Z.'s user avatar
  • 34.9k
19 votes
1 answer

Play a perfect game of 2048

Your job is to simulate a mathematically perfect game of 2048. The idea is to find the theoretical upper limit of how far a 2048 game can go, and find how to get there. To get an idea of what this ...
Kendall Frey's user avatar
  • 2,473
19 votes
5 answers

2048 Bot Challenge

We have been cloning 2048, analyzing 2048, but why haven't we played it yet? Write a 555 byte javascript snippet to play 2048 automatically, the best score after an hour will count (see scoring below)....
David Mulder's user avatar
18 votes
1 answer

Solve a deterministic version of 2048 using the fewest bytes

Write a program that generates a winning sequence of moves to the deterministic variant of the game 2048. The sequence should be in the form of a string of numbers 0-3, with 0: up, 1: right, 2: down, ...
QuadmasterXLII's user avatar
56 votes
9 answers

Create a simple 2048 game clone

2048 is an incredibly fun and addictive game in which the goal is to create a tile with 2048 on it. Here's a short description of the game: Pressing an arrow key will slide all the blocks in the ...
Doorknob's user avatar
  • 71.5k
9 votes
2 answers

Check if the 15 puzzle is solvable

The fifteen puzzle is peculiar in that only half the possible states of arrangement are solvable. If you flip the 14 and 15 tiles, there is no way you can slide the blocks so that they are flipped ...
Joe Z.'s user avatar
  • 34.9k
26 votes
3 answers

Solve the 15 Puzzle (the tile-sliding puzzle)

The 15 Puzzle is a famous puzzle involving sliding 15 tiles around on a 4x4 grid. Starting from a random configuration, the goal is to arrange the tiles in the correct order. Here is an example of a ...
PhiNotPi's user avatar
  • 29.1k
15 votes
1 answer

Solve the 8 Puzzle

The 8 Puzzle is the smaller variant of the 15Puzzle (or the Sliding puzzle). You have a 3x3 grid which is filled with numbers from 0-8 (0 denotes the blank tile) ...
st0le's user avatar
  • 2,228