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
223 views

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 ...
user avatar
  • 1,412
6 votes
0 answers
281 views

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 ...
user avatar
27 votes
22 answers
6k views

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 ...
user avatar
  • 393
14 votes
1 answer
789 views

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 ...
user avatar
  • 2,079
96 votes
47 answers
8k views

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 ...
user avatar
  • 1,001
15 votes
2 answers
1k 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 ...
user avatar
12 votes
1 answer
824 views

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 ...
user avatar
17 votes
4 answers
1k views

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 ...
user avatar
14 votes
5 answers
4k views

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 ...
user avatar
  • 33.8k
19 votes
1 answer
3k views

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 ...
user avatar
  • 2,472
19 votes
5 answers
4k views

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)....
user avatar
17 votes
1 answer
3k views

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, ...
user avatar
56 votes
9 answers
33k views

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 ...
user avatar
  • 70.6k
9 votes
2 answers
2k views

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 ...
user avatar
  • 33.8k
26 votes
3 answers
21k views

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 ...
user avatar
  • 28.6k
14 votes
1 answer
4k views

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) ...
user avatar
  • 2,140