Stack Exchange Network

Stack Exchange network consists of 174 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 [maze]

for challenges involving mazes.

13
votes
3answers
440 views

Multi-level free parking space finder

Kids-related intro Whenever I take my kids to an amusement park, the kids get more nervous the closer we are to the park, with the nerve peak when we are in the parking lot and find no place to park. ...
24
votes
3answers
702 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 ...
13
votes
7answers
355 views

Cutpoints in a maze

A maze is given as a matrix of 0s (walls) and 1s (walkable space) in any convenient format. Each cell is considered connected to its 4 (or fewer) orthogonal neighbours. A connected component is a set ...
17
votes
7answers
453 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 ...
30
votes
2answers
761 views

Help Pac-Man count the Pac-Dots

On the advice of Ms. Pac-Man who's worried about him getting overweight, Pac-Man has decided to keep track of his daily Pac-Dot intake. Help him count the number of Pac-Dots on a given path in the ...
30
votes
5answers
1k 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); + (...
11
votes
12answers
449 views

Match coordinates with their values

Given 3 input items, a list of coordinate pairs, a 2D string, and a single-character string, output whether the character at each coordinate of the 2D string is equal to the single character. You can ...
19
votes
2answers
522 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 ...
18
votes
5answers
694 views

Generate an ascii-art non-intersecting path

Given 2 integer inputs representing the size of the field, x and y, output a path through the field. Example output for ...
21
votes
20answers
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 (...
28
votes
2answers
996 views

2D Maze Minus 1D

This challenge is about converting 2D mazes into 1D mazes. Overview ...
4
votes
1answer
324 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
3answers
733 views

Generate a map for a roguelike

Today, we'll be generating a map for a roguelike RPG! Example Map: ...
13
votes
12answers
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 ...
23
votes
2answers
907 views

A Mouse with Dynamite

You're a mouse. Your mouse friends have all been captured, and are unconscious and trapped in a maze that has only one entrance/exit. You happen to have a perfect map of the maze, so you can plot a ...
15
votes
5answers
515 views

Walk the labyrinth

Or maybe it's not really a labyrinth, but still. Rules: Input is a two-line string, consisting of *, 1, ...
25
votes
7answers
1k views

Find the Cheese

Update: There are 6 mazes. They are included in the controller. There is a tar.gz of the mazes and their .bmp files here (dropbox). There is also a utility for making more mazes at that link (the ...
14
votes
2answers
669 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 ...
27
votes
6answers
1k views

Hexagonal maze time!

This challenge has an open 500 rep bounty by lirtosiast for a Hexagony solution Time for another maze challenge, but not as you know it. The rules for this challenge are a little different than most ...
14
votes
1answer
323 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 ...
20
votes
1answer
615 views

Generating Picture Mazes

Challenge Write a program/function that accepts an "image" and outputs a picture maze formed from that image. Input Your program should accept two arguments: I, the image to form the maze from S, ...
14
votes
3answers
577 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. ...
44
votes
2answers
3k views

Shortest universal maze exit string

A maze on an N by N grid of square cells is defined by specifying whether each edge is a wall or not a wall. All outer edges are walls. One cell is defined as the start, and one cell is defined as the ...
12
votes
1answer
199 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 <...
35
votes
4answers
657 views

Successfully navigating an asteroid field

Introduction Everyone knows that the possibility of successfully navigating an asteroid field is approximately 3,720 to 1. But despite your warning, Han Solo is still willing to try his luck. ...
15
votes
2answers
630 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 (...
35
votes
4answers
3k views

Infinite Labyrinths

Background You are the apprentice of a powerful wizard, and your master is currently developing a spell for creating an inter-dimensional labyrinth to trap his enemies in. He wants you to program his ...
19
votes
8answers
2k views

Can maze be solved?

The puzzle Print 0 if a maze n*m can not be solved Print 1 if a maze n*m can be solved (in 1 or more ways) (so I'm not asking for paths but if it's possible to solve!!!) Input array(2d): ...
14
votes
1answer
1k views

Design and Solve a Maze [on hold while sandboxing]

Your task is to play the roles of both characters in this scene from Inception. In it, Cobb gives Ariadne a challenge: You have two minutes to design a maze that takes one minute to solve. Some ...
41
votes
14answers
7k 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 ...
19
votes
3answers
2k views

aHHHH! The Beasts are HHHHere!

As we learned from the IBM PC AT, YouTube (see video), Wikipedia (see article), and Sesame Street: The letter H is the most merciless letter of the alphabet! (...
16
votes
9answers
1k 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 ...
18
votes
3answers
1k views

Dungeon Construction Set

When I was a kid, I played the Intellivision game Advanced Dungeons and Dragons: Treasure of Tarmin. The 3-D graphics put you in a first-person-perspective point of view with shocking realism: But ...
11
votes
3answers
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 ...
10
votes
4answers
985 views

Knock down walls in a maze

Rules: In this game you start at the top of a rectangular grid of size N x M made up of walls and open spaces. The input is N lines of M characters, where a . ...
14
votes
4answers
915 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 ...
9
votes
1answer
2k views

Build an engine for a maze game

This is a follow up of Print a maze question. If you like this question, please add more maze generation algorithms ;). For this task you'll have to implement a game engine for one player who must ...
19
votes
5answers
4k views

Print a random maze

Write a program that generates and prints a random maze using the algorithm of your choice. The maze should be different for multiple runs of the program. Height and width are given as command line ...