Skip to main content
Grammar, clarified a few points, added some more detail
Source Link
AdmBorkBork
  • 43.5k
  • 2
  • 26
  • 41

Based on a challenge idea I posted in chat and the ensuing conversation. Thanks to NathanMerrill and, zgarb, and Jonathan Frech for assistance in fleshing this out.

There exists a 50x50You're writing two separate programs/functions/routines/etc. The first, which we'll call the helper program, takes the input maze and calls the second, which we'll call the solving bot. The solving bot must solve the maze based on its interaction with the helper program.

The maze is 51x51 characters in size. For clarity herein this challenge description, it is composed of # walls and corridors, but you can use any two distinct, consistent ASCII characters of your choice. E.g., use ! for walls and x for corridors, use 1 for walls and 0 for corridors, etc. This maze is one of many that will be the input to your helper program/function.

The maze start is always guaranteed to be somewhere on the left-most column, and the exit is always guaranteed to be somewhere on the right-most column. The maze is guaranteed to have at least one path from the start to the exit. As a result of this construction, the very top row and very bottom row are all #, and the very left and right columns are all # except for the start and exit.

The maze-solvingsolving bot (as a program or function) that you're creating needs to find a solution to the maze (not necessarily the shortest), but is limited in that it can only "see" a new 5x5 section of the maze at a time. The bot is scored by how many times it needs to request a new 5x5 section from the helper program/function.

The upper bound is obviously to simply request every possible 5x5 section, for a score of around 100. The lower bound is where someone with perfect knowledge of the maze can request only those 5x5 sections containing the exact route of the shortest solution, possibly as low as 10. Your bot will be run through (1000?) different mazes, and the bot with the lowestfewest total requests will be the winner.

The solving bot is placed on the left-hand side where the start is, and the first 5x5 section is provided for free. However, the bot doesn't know where, vertically, it is on the left-hand side of the maze. It could be in the top corner (as in the example below), in the bottom corner, or somewhereanywhere in between.

The code you're writing be required to take the maze as an input (STDIN, a file to read, etc.) and call a subroutine of some sort for the solution bot. 

Input: 50x50 maze, output(1000?) 51x51 mazes Output: howHow many total requests your solving bot took. Rinse/repeat 1000 times.

Based on a challenge idea I posted in chat and the ensuing conversation. Thanks to NathanMerrill and zgarb for assistance in fleshing this out.

There exists a 50x50 maze. For clarity here, it is composed of # walls and corridors, but you can use any two distinct, consistent ASCII characters of your choice. E.g., use ! for walls and x for corridors, use 1 for walls and 0 for corridors, etc. This maze is the input to your helper program/function.

The start is always guaranteed to be somewhere on the left-most column, and the exit is always guaranteed to be somewhere on the right-most column. The maze is guaranteed to have at least one path from the start to the exit. As a result of this construction, the very top row and very bottom row are all #.

The maze-solving bot (as a program or function) that you're creating needs to find a solution to the maze (not necessarily the shortest), but is limited in that it can only "see" a 5x5 section of the maze at a time. The bot is scored by how many times it needs to request a new 5x5 section from the helper program/function.

The upper bound is obviously to simply request every possible 5x5 section, for a score of 100. The lower bound is where someone with perfect knowledge of the maze can request only those 5x5 sections containing the exact route of the shortest solution, possibly as low as 10. Your bot will be run through (1000?) different mazes, and the bot with the lowest total requests will be the winner.

The bot is placed on the left-hand side where the start is, and the first 5x5 section is provided for free. However, the bot doesn't know where, vertically, it is on the left-hand side of the maze. It could be in the top corner (as in the example), in the bottom corner, or somewhere in between.

The code you're writing be required to take the maze as an input (STDIN, a file to read, etc.) and call a subroutine of some sort for the solution bot. Input: 50x50 maze, output: how many requests your bot took. Rinse/repeat 1000 times.

Based on a challenge idea I posted in chat and the ensuing conversation. Thanks to NathanMerrill, zgarb, and Jonathan Frech for assistance in fleshing this out.

You're writing two separate programs/functions/routines/etc. The first, which we'll call the helper program, takes the input maze and calls the second, which we'll call the solving bot. The solving bot must solve the maze based on its interaction with the helper program.

The maze is 51x51 characters in size. For clarity in this challenge description, it is composed of # walls and corridors, but you can use any two distinct, consistent ASCII characters of your choice. E.g., use ! for walls and x for corridors, use 1 for walls and 0 for corridors, etc. This maze is one of many that will be the input to your helper program/function.

The maze start is always guaranteed to be somewhere on the left-most column, and the exit is always guaranteed to be somewhere on the right-most column. The maze is guaranteed to have at least one path from the start to the exit. As a result of this construction, the very top row and very bottom row are all #, and the very left and right columns are all # except for the start and exit.

The solving bot that you're creating needs to find a solution to the maze (not necessarily the shortest), but is limited in that it can only "see" a new 5x5 section of the maze at a time. The bot is scored by how many times it needs to request a new 5x5 section from the helper program/function.

The upper bound is obviously to simply request every possible 5x5 section, for a score of around 100. The lower bound is where someone with perfect knowledge of the maze can request only those 5x5 sections containing the exact route of the shortest solution, possibly as low as 10. Your bot will be run through (1000?) different mazes, and the bot with the fewest total requests will be the winner.

The solving bot is placed on the left-hand side where the start is, and the first 5x5 section is provided for free. However, the bot doesn't know where, vertically, it is on the left-hand side of the maze. It could be in the top corner (as in the example below), in the bottom corner, or anywhere in between.

The code you're writing be required to take the maze as an input (STDIN, a file to read, etc.) and call a subroutine of some sort for the solution bot. 

Input: (1000?) 51x51 mazes Output: How many total requests your solving bot took

Formatting.
Source Link
Jonathan Frech
  • 7.3k
  • 1
  • 10
  • 14
Changed maze style
Source Link
AdmBorkBork
  • 43.5k
  • 2
  • 26
  • 41
############################################################################
            #     #  #              #              #           #     #     #
#  ####  #  #  #  #  #  ##########  #  ##########  #  #######  #  #  #  #  #
#  #     #     #     #  #  #        #     #     #  #  #     #  #  #     #  #
#  #  ################  #  #  #######  #  #  #  ####  #  #  #  #  #######  #
#  #     #        #     #  #     #     #     #     #     #  #     #        #
#  ####  #######  #  ####  ####  #  #############  #######  #######  #######
#     #     #        #           #     #           #        #     #  #     #
####  #  #  #  #  #######  ####  ####  #  ##########  ####  #  #  #  #  #  #
#     #  #  #  #  #     #     #  #     #     #  #     #  #  #  #     #  #  #
#  #######  ####  #  #  #######  #  #######  #  #  ####  #  #  #######  #  #
#  #        #     #  #  #        #     #  #  #  #     #  #  #           #  #
#  #  ####  #  #######  ####  #######  #  #  #  #  #  #  #  ####  #######  #
#  #     #  #  #              #        #  #  #     #     #  #     #        #
#  #######  #  #  ######################  #  #############  #######  #######
#        #     #  #           #        #           #     #     #           #
#######  #  ####  #  #######  #  ####  ####  ####  ####  ####  #  #######  #
#        #  #        #           #        #     #        #  #  #  #     #  #
#  #######  ##########  ##########  ##########  #######  #  #  #  #  #  #  #
#  #        #     #     #     #  #           #  #        #     #     #  #  #
#  #  #######  #  #  #######  #  #######  #  #  #  #######  ##########  #  #
#  #        #  #  #  #     #  #  #        #     #     #     #           #  #
#  #######  #  #  #  #  #  #  #  ###################  ####  #  #############
#  #     #     #  #     #  #  #              #        #     #              #
#  ####  #######  #######  #  #############  #  ####  #  #############  #  #
#     #  #     #        #     #           #  #     #     #           #  #  #
####  #  #  ##########  #######  #######  #  ####  ################  ####  #
#  #     #     #     #              #     #        #  #     #        #     #
#  #  #######  #  ################  #  #######  ####  #  #  #  #######  ####
#  #     #  #  #  #        #        #     #     #     #  #  #        #     #
#  #  #  #  #  #  #  ####  ####  #######  #  #######  #  #  #######  ####  #
#     #     #  #     #     #     #        #        #  #  #           #     #
##########  #  #######  ####  ####  ##########  #  #  #  #############  ####
#           #     #     #     #        #        #     #                 #  #
#  ##########  ####  ####  ####  ####  ############################  ####  #
#  #        #  #           #  #     #  #        #     #     #     #     #  #
#  #  ####  #  #  ##########  ####  ####  ####  #  #  ####  ####  #  ####  #
#  #  #     #  #     #     #     #  #     #     #  #        #     #     #  #
#  #  #######  ####  #  #  #  #  #  #  ##########  ##########  ####  #  #  #
#  #     #           #  #     #     #        #     #           #     #     #
#  #  #  ##########  #  #######  ##########  #  ####  ###################  #
#  #  #        #  #  #  #     #     #     #  #  #     #     #  #        #  #
#  #  #######  #  #  #  ####  ####  #  #  #  #  #  ####  #  #  #  ####  #  #
#  #        #  #     #     #        #  #  #        #  #  #  #        #  #  #
#  ##########  ##########  ##########  #  ####  ####  #  #  #######  #  #  #
#              #        #           #  #     #  #     #  #  #     #  #  #  #
#  #############  ####  ####  #  #  #  ####  #  #  #  #  #  #  #  ####  #  #
#  #     #           #        #  #  #     #  #  #  #  #  #     #     #  #  #
#  ####  #  #############  ####  #######  #  #  #  ####  ##########  #  #  #
#        #              #     #           #              #           #      
############################################################################
###################################################
            #     # #   # #   #   #         #   # #
# ######### ##### # # # # # # # # # ####### ### # #
#   #       #   #   # # #   # # #         #   # # #
### # ####### # # ### # ### # # ############# # # #
#   #   #   # # #   # #     # #   #   #   # #   # #
# ####### # ### ### ####### # ### # # # # # # ### #
#     #   #       #       # # #   # # # # # # #   #
##### # ################# # # # ### ### # # # # ###
#   #       #     #         # #         # # # #   #
### ####### ##### # ######### ##### ##### # ##### #
#   #           #   #       #     # #   # #   #   #
# ##### ### ### # ### ########### # # # # # # ### #
#       # # #   # # #   #         # # # #   # #   #
######### # ### # # ### # ######### # ##### # # ###
#       # #   #   # # #   #       # # #     # # # #
# ##### # ### ##### # ##### ##### # # # ##### # # #
#     #   #       # # #   #     # #   # #     # # #
### # ####### # ### # # # ##### # ### # ####### # #
#   #     #   #   # #   #   #   #   # # #         #
# ####### # ##### # ####### # ### # ### # ### # ###
# #     # #     # #       # # #   #   #   #   #   #
# # ### # ##### # # ####### # # ##### ####### ### #
#   #   #       # #     #   # #     #   #   # # # #
##### ########### ##### # ########### # # # # # # #
# #   #       #   #   # #       #   # # # # #   # #
# # ### # ##### ### # # ### ### # # # ### # ##### #
#   # # #       #   #     # # #   # #   # #   #   #
##### # # ##### # ##### # # # ##### ### # ### # ###
#   # # #     # #   #   # #   #         #   # #   #
# # # # ##### # ### # ### ##### ### ##### # # ### #
# # #   #     #     # # #         #       # # #   #
# ####### ########### # ############### ##### # ###
#     #   #   #       #             # #   #   # # #
##### # ### # # ####### ######### # # ### # ### # #
#   #     # # # #       #       # #   #   # #   # #
# ##### # ### # # ######### ### ##### # ### # ### #
# #     #   #   #     #   # #   #     # #   #     #
# # ####### ######### # # # ##### ### # # ##### ###
# # # #     #     #   # # #     # # #   #     #   #
# # # # ######### # ##### ##### # # ##### ### # # #
#   #   # #     # # #     #   #     #   # #   # # #
### ##### # ### # # # ### # # ####### ### ### # # #
# #     # # #   # # # #   # #       #       #   # #
# ##### # # # ### # # ##### ####### ####### ##### #
#       #   # #   # #       # #   # #       #   # #
### ######### # # # ######### # # # # ####### # # #
#   #   #   # # # #   #         #   #     #   #   #
# ### # # # # # ##### # ####### ########### ##### #
#     #   #   #       #       #             #      
###################################################
#####
     
#  #####
#  # 
 # 
### # 
############################################################################
            #     #  #              #              #           #     #     #
#  ####  #  #  #  #  #  ##########  #  ##########  #  #######  #  #  #  #  #
#  #     #     #     #  #  #        #     #     #  #  #     #  #  #     #  #
#  #  ################  #  #  #######  #  #  #  ####  #  #  #  #  #######  #
#  #     #        #     #  #     #     #     #     #     #  #     #        #
#  ####  #######  #  ####  ####  #  #############  #######  #######  #######
#     #     #        #           #     #           #        #     #  #     #
####  #  #  #  #  #######  ####  ####  #  ##########  ####  #  #  #  #  #  #
#     #  #  #  #  #     #     #  #     #     #  #     #  #  #  #     #  #  #
#  #######  ####  #  #  #######  #  #######  #  #  ####  #  #  #######  #  #
#  #        #     #  #  #        #     #  #  #  #     #  #  #           #  #
#  #  ####  #  #######  ####  #######  #  #  #  #  #  #  #  ####  #######  #
#  #     #  #  #              #        #  #  #     #     #  #     #        #
#  #######  #  #  ######################  #  #############  #######  #######
#        #     #  #           #        #           #     #     #           #
#######  #  ####  #  #######  #  ####  ####  ####  ####  ####  #  #######  #
#        #  #        #           #        #     #        #  #  #  #     #  #
#  #######  ##########  ##########  ##########  #######  #  #  #  #  #  #  #
#  #        #     #     #     #  #           #  #        #     #     #  #  #
#  #  #######  #  #  #######  #  #######  #  #  #  #######  ##########  #  #
#  #        #  #  #  #     #  #  #        #     #     #     #           #  #
#  #######  #  #  #  #  #  #  #  ###################  ####  #  #############
#  #     #     #  #     #  #  #              #        #     #              #
#  ####  #######  #######  #  #############  #  ####  #  #############  #  #
#     #  #     #        #     #           #  #     #     #           #  #  #
####  #  #  ##########  #######  #######  #  ####  ################  ####  #
#  #     #     #     #              #     #        #  #     #        #     #
#  #  #######  #  ################  #  #######  ####  #  #  #  #######  ####
#  #     #  #  #  #        #        #     #     #     #  #  #        #     #
#  #  #  #  #  #  #  ####  ####  #######  #  #######  #  #  #######  ####  #
#     #     #  #     #     #     #        #        #  #  #           #     #
##########  #  #######  ####  ####  ##########  #  #  #  #############  ####
#           #     #     #     #        #        #     #                 #  #
#  ##########  ####  ####  ####  ####  ############################  ####  #
#  #        #  #           #  #     #  #        #     #     #     #     #  #
#  #  ####  #  #  ##########  ####  ####  ####  #  #  ####  ####  #  ####  #
#  #  #     #  #     #     #     #  #     #     #  #        #     #     #  #
#  #  #######  ####  #  #  #  #  #  #  ##########  ##########  ####  #  #  #
#  #     #           #  #     #     #        #     #           #     #     #
#  #  #  ##########  #  #######  ##########  #  ####  ###################  #
#  #  #        #  #  #  #     #     #     #  #  #     #     #  #        #  #
#  #  #######  #  #  #  ####  ####  #  #  #  #  #  ####  #  #  #  ####  #  #
#  #        #  #     #     #        #  #  #        #  #  #  #        #  #  #
#  ##########  ##########  ##########  #  ####  ####  #  #  #######  #  #  #
#              #        #           #  #     #  #     #  #  #     #  #  #  #
#  #############  ####  ####  #  #  #  ####  #  #  #  #  #  #  #  ####  #  #
#  #     #           #        #  #  #     #  #  #  #  #  #     #     #  #  #
#  ####  #  #############  ####  #######  #  #  #  ####  ##########  #  #  #
#        #              #     #           #              #           #      
############################################################################
#####
     
#  ##
#  # 
 #  # 
###################################################
            #     # #   # #   #   #         #   # #
# ######### ##### # # # # # # # # # ####### ### # #
#   #       #   #   # # #   # # #         #   # # #
### # ####### # # ### # ### # # ############# # # #
#   #   #   # # #   # #     # #   #   #   # #   # #
# ####### # ### ### ####### # ### # # # # # # ### #
#     #   #       #       # # #   # # # # # # #   #
##### # ################# # # # ### ### # # # # ###
#   #       #     #         # #         # # # #   #
### ####### ##### # ######### ##### ##### # ##### #
#   #           #   #       #     # #   # #   #   #
# ##### ### ### # ### ########### # # # # # # ### #
#       # # #   # # #   #         # # # #   # #   #
######### # ### # # ### # ######### # ##### # # ###
#       # #   #   # # #   #       # # #     # # # #
# ##### # ### ##### # ##### ##### # # # ##### # # #
#     #   #       # # #   #     # #   # #     # # #
### # ####### # ### # # # ##### # ### # ####### # #
#   #     #   #   # #   #   #   #   # # #         #
# ####### # ##### # ####### # ### # ### # ### # ###
# #     # #     # #       # # #   #   #   #   #   #
# # ### # ##### # # ####### # # ##### ####### ### #
#   #   #       # #     #   # #     #   #   # # # #
##### ########### ##### # ########### # # # # # # #
# #   #       #   #   # #       #   # # # # #   # #
# # ### # ##### ### # # ### ### # # # ### # ##### #
#   # # #       #   #     # # #   # #   # #   #   #
##### # # ##### # ##### # # # ##### ### # ### # ###
#   # # #     # #   #   # #   #         #   # #   #
# # # # ##### # ### # ### ##### ### ##### # # ### #
# # #   #     #     # # #         #       # # #   #
# ####### ########### # ############### ##### # ###
#     #   #   #       #             # #   #   # # #
##### # ### # # ####### ######### # # ### # ### # #
#   #     # # # #       #       # #   #   # #   # #
# ##### # ### # # ######### ### ##### # ### # ### #
# #     #   #   #     #   # #   #     # #   #     #
# # ####### ######### # # # ##### ### # # ##### ###
# # # #     #     #   # # #     # # #   #     #   #
# # # # ######### # ##### ##### # # ##### ### # # #
#   #   # #     # # #     #   #     #   # #   # # #
### ##### # ### # # # ### # # ####### ### ### # # #
# #     # # #   # # # #   # #       #       #   # #
# ##### # # # ### # # ##### ####### ####### ##### #
#       #   # #   # #       # #   # #       #   # #
### ######### # # # ######### # # # # ####### # # #
#   #   #   # # # #   #         #   #     #   #   #
# ### # # # # # ##### # ####### ########### ##### #
#     #   #   #       #       #             #      
###################################################
#####
     
# ###
#   #
### #
Clarified that the bot knows where it starts and the first 5x5 is free
Source Link
AdmBorkBork
  • 43.5k
  • 2
  • 26
  • 41
Loading
Clarified and expanded several points. Still in draft format.
Source Link
AdmBorkBork
  • 43.5k
  • 2
  • 26
  • 41
Loading
Source Link
AdmBorkBork
  • 43.5k
  • 2
  • 26
  • 41
Loading