# Draw a fuzzy grid

Print the ASCII version of a random grid.

################################################################################
#    #   #  #    #   #   #     #     #   #  #    #   #     #   #   #   #  #   #
#    #   #  #    #   #   #     #     #   #  #    #   #     #   #   #   #  #   #
#    #   #############   #     #     #   #  #    #   #     #   #   #   #  #   #
##########   #   #   #####################  #    #   #     #   #####   ########
#    #   #   #   #   #   #   #   #       #######################   #####   #  ##
#    #   #   #   #   #   #   #   #       #  #   #     #   #    #   #   #   #  #
#    #   #   #   #   #   #####   #       #  #   #     #   #    #   #   #########
##########################   #######################################   #    #  #
#    #    #   #   #  #   #   #    #      #   #   #   #   #     #   #####    #  #
#    #    #   #   #  #   #   #    #      #   #   #   #   #     #   #   #    ####
###############   #  #   #####    #      #   #   #   #   #     #   #   #    #  #
#    #   #    ########   #   ###################################   #   ######  #
#    #   #    #   #  #####   #     #    #  #    #   #   #      #########    #  #
######   #    #   #  #   #   #     #    #  #    #   #   #      #   #   #    #  #


The picture should illustrate the constraints:

• # is solid, is empty.
• Print 80 columns, at least 80 rows.
• On the first and last columns and first and last rows there is some freedom, but at least the printout must be extendible to a legal grid.
• Boxes contain empty areas between 1x1 and 7x7.
• Constraints: Boxes are rectangular, no lonely corners (1), no empty boxes (2), no broken lines(3) or gaps (4), when in doubt refer to the image above.
• A grid is considered "random", if the first 80 rows contain: 1.) 60 unique rows and 60 unique columns. 2.) At least one box with inner area of size (2, 2), (3, 2), (4, 2), (5, 2), (2, 3), (3, 3), (4, 3), (5, 3), (2, 4), (3, 4), (4, 4), (5, 4), (2, 5), (3, 5), (4, 5), (5, 5) each. You can verify the randomness and some constraints with this julia script.
• The program should nondeterministically produce a minimum number of 1000 grids fulfilling the constraints with different first 80 rows, where rotations, circular shifts and reflections counted as same and the majority of produced grids should be "random" as specified above.
    #####4########################
#                #   #    #
#    #       #   #   #    3
#    #       #########   #
#########1   #   #   #########
#    #   #   #   ##2##   #   #
#    #   #   #   #####   #   #
#    #   #   #   #   #   #####


Code golf!

• You need to specify exactly what you mean by random. "Do not systematically produce homogeneous rows of boxes..." also needs to be made objective.
– xnor
Nov 10 '19 at 0:28
• @xnor I created a rule specifying "randomness". Nov 10 '19 at 11:22
• You say "at least 80 rows" but - specifically - "80 columns". Is that indended? Also, your program gives a warning for more than 80 rows. Nov 10 '19 at 12:39
• The program expects you to submit the first 80 rows of your output, the remainder can be anything, as long as it is a valid labyrinth. Nov 10 '19 at 13:03
• I added a requirement discouraging to encode a hand drawn valid grid as 80*80 bit number ;-) Nov 10 '19 at 13:13

# Julia, 254 bytes

Not very golfed, just to keep it going;

l=length
function f(M,r,s)
l(r)<7&&return l(s)>6&&g(M,r,s)
h,j=rand([f,g],2)
a,c=extrema(r)
b=rand(a+1:c-1)
M[b,s].=2
h(M,b+1:c,s)
j(M,a:b-1,s)
end
g(M,r,s)=f(M',s,r)
n=80
M=fill(1,n,n)
f(M,1:n,1:n)
for i∈1:n
print.(getindex.(" #",M[i,:]))
println()
end


Verification, try it yourself