Skip to main content

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

Filter by
Sorted by
Tagged with
4 votes
1 answer
187 views

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 ...
l4m2's user avatar
  • 32.5k
18 votes
5 answers
1k views

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 ...
Steve Bennett's user avatar
3 votes
1 answer
336 views

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 ...
ToAskOrNotToAsk's user avatar
7 votes
2 answers
397 views

Background Consider an \$n\times n\$ grid, where each cell is either empty (denoted by .) or a wall (denoted by #). We say that ...
Delfad0r's user avatar
  • 6,276
42 votes
8 answers
3k views

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 ...
orlp's user avatar
  • 39.4k
45 votes
6 answers
4k views

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 ...
Hiatsu's user avatar
  • 719
10 votes
2 answers
2k views

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 ...
Beefster's user avatar
  • 10k
24 votes
3 answers
865 views

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 ...
Manfred Radlwimmer's user avatar
18 votes
8 answers
1k views

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 ...
Weijun Zhou's user avatar
  • 3,657
35 votes
5 answers
2k views

Input: A maze containing the characters: -- (horizontal wall); | (vertical wall); + (...
Kevin Cruijssen's user avatar
22 votes
3 answers
1k views

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 ...
Wheat Wizard's user avatar
  • 103k
23 votes
22 answers
2k views

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 (...
Riker's user avatar
  • 7,928
4 votes
1 answer
419 views

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 ...
GracefulLemming's user avatar
12 votes
12 answers
2k views

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 ...
Oliver Ni's user avatar
  • 10.7k
15 votes
5 answers
630 views

Or maybe it's not really a labyrinth, but still. Rules: Input is a two-line string, consisting of *, 1, ...
nicael's user avatar
  • 4,811
13 votes
2 answers
821 views

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 ...
msh210's user avatar
  • 3,501
14 votes
1 answer
445 views

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 ...
ghosts_in_the_code's user avatar
19 votes
3 answers
1k views

The famous C64 basic one liner 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 prints a maze of slashes and backslashes. ...
Moritz Schauer's user avatar
13 votes
1 answer
289 views

Given a WxH grid, how many possible mazes are there? Things you know about the maze: The grid is exactly H squares high and <...
Nathan Merrill's user avatar
15 votes
2 answers
825 views

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 (...
Logic Knight's user avatar
  • 6,812
22 votes
10 answers
3k views

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 ...
dwana's user avatar
  • 553
40 votes
14 answers
10k views

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 ...
geometrian's user avatar
  • 1,025
16 votes
9 answers
2k views

Your goal is to write a program that creates a random 10x10 map using 0, 1, and 2, and finds ...
Vereos's user avatar
  • 4,491
12 votes
3 answers
1k views

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 ...
ajax333221's user avatar
  • 3,694
17 votes
8 answers
1k views

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 ...
Lowjacker's user avatar
  • 4,919