Questions tagged [maze]
This tag is for challenges relating to mazes, typically generating or navigating them. This often is used with the [ascii-art] tag, a common method of demonstrating the mazes
51 questions
4
votes
1
answer
187
views
Through maze with a compressed guide
Given a wall maze of 50x50, exactly same generating algorithm, at different RNG, so every two positions are connected by exactly one path, etc.
Write two functions:
One takes the maze as input and ...
18
votes
5
answers
1k
views
Hide from the "left-hand wall" robot
You need to hide in a maze from a robot which methodically follows the left hand wall rule. That is, it enters, immediately turns left, and will always move keeping its left hand on the wall. It only ...
3
votes
1
answer
336
views
Sokobunny I (Sokoban, but the boxes are sentient)
Sokobunny 1
You love buns!
You love them so much, that you chased one down a bunburrow. The burrows are like mazes, and YOU WANT TO CATCH THE FLUFFBALLS!!!! However, the buns are smart! You can't ...
7
votes
2
answers
397
views
Largest Compatible Maze
Background
Consider an \$n\times n\$ grid, where each cell is either empty (denoted by .) or a wall (denoted by #). We say that ...
42
votes
8
answers
3k
views
Constructing an evil maze against random exploration
RollerCoaster Tycoon 2's maze is the inspiration for this question. Credit to Marcel Vos for thoroughly breaking the classic RCT2 AI. The pathfinding AI in this question is the AI in the latest ...
45
votes
6
answers
4k
views
ASCII Maze Rendering 3000
I don't like typing, so I draw my mazes in a very simple format:
# #####
# #
# ### #
# # # #
# # #
##### #
Isn't it a-maze-ing? Of course, I think all ...
10
votes
2
answers
2k
views
ASCII Maze Compression
Challenge
Design a compression algorithm specialized for compressing ASCII mazes. You will need to create both a compression algorithm and a decompression algorithm. Your score will be based on the ...
24
votes
3
answers
865
views
Ice Golf Challenge
The goal of this challenge is to write a program or function that returns the least amount of strikes needed to complete a given course.
Input
The layout of the course can be passed in any suitable ...
18
votes
8
answers
1k
views
1D Hopping Array Maze
Inspired by We do tower hopping and related to 2D Maze Minus 1D
Introduction
Your task is to find the shortest path to get out of an array maze following specified rules.
Challenge
A 1D array a with n ...
35
votes
5
answers
2k
views
Life is a Maze: We take the wrong Path before we learnt to walk
Input:
A maze containing the characters:
-- (horizontal wall);
| (vertical wall);
+ (...
22
votes
3
answers
1k
views
Solve an Ice Maze
Ice mazes have been one of my favorite staples of Pokémon games since their debut in Pokémon Gold and Silver. Your task will be to make a program that solves these types of problems.
Ice mazes ...
23
votes
22
answers
2k
views
Find all the coordinates on a path
Given a 2D string as input, either as a string with newlines or a list of lines, output the coordinates (x, y) of all the hashes (...
4
votes
1
answer
419
views
Labyrinth Polyglot [closed]
Create a program that can create a randomly arranged maze (The path of the maze changes each time) with exactly 1 exit and one enterance and a minimum size of 8x4 and max size of 32x32, with the exact ...
12
votes
12
answers
2k
views
Generate a one-path maze
Given an odd integer N (5 <= N <= 51), generate a maze with side length N that follows the following requirements:
The maze must be composed of the characters ...
15
votes
5
answers
630
views
Walk the labyrinth
Or maybe it's not really a labyrinth, but still.
Rules:
Input is a two-line string, consisting of *, 1, ...
13
votes
2
answers
821
views
Chessboard maze
Chess pieces (kings, queens, rooks, bishops, and knights) and pawns are on a board, but not on the a1 or h8 square. Your task is to travel from the empty a1 to the empty h8 squares, passing through ...
14
votes
1
answer
445
views
The arrow maze escape
Question
You have a 50 by 50 character array. Each cell has an arrow pointing in any one of four directions. No cell is empty. On entering a cell, you must exit it in the direction specified by the ...
19
votes
3
answers
1k
views
Maze generating one liner
The famous C64 basic one liner
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
prints a maze of slashes and backslashes.
...
13
votes
1
answer
289
views
Number of valid mazes
Given a WxH grid, how many possible mazes are there?
Things you know about the maze:
The grid is exactly H squares high and <...
15
votes
2
answers
825
views
Programs to build a rat maze
You have been hired as a research assistant, and asked to create a small program
that will build rat mazes. The rat box is always 62x22 and has an entrance (a)
and exit (A) for the rat, like this (...
22
votes
10
answers
3k
views
Can the maze be solved?
Task
Print 0 if an n*m maze cannot be solved
Print 1 if an n*m maze can be solved (in 1 or more ways)
(so I'm not asking for ...
40
votes
14
answers
10k
views
Maze Generation [closed]
I know there is an (old) thread similar to this (here), but I'd like to reboot it with some modifications.
The goal: generate a random-looking maze using an algorithm of your choice, then output the ...
16
votes
9
answers
2k
views
Portal Maze Shortest Path
Your goal is to write a program that creates a random 10x10 map using 0, 1, and 2, and finds ...
12
votes
3
answers
1k
views
Create a multi-level 5x5x5 Labyrinth with only one solution
The aim of this challenge is to create the shortest code (in characters) that successfully do the following:
Specifications:
Must create a 5x5x5 labyrinth with ...
17
votes
8
answers
1k
views
Textual maze solver
Given a maze on stdin and an entry point, write a program that prints a path to the exit on stdout. Any path is acceptable, as long as your program does not generate the trivial path (passing through ...