Generating crossword frameworks

From: Nameless (news.mail_at_chello.no)
Date: 04/14/04

  • Next message: Martin Fuchs: "simple list recursion"
    Date: Wed, 14 Apr 2004 05:07:16 +0200
    
    

    "reader" wrote in message
     news:a9Zec.5489$Fo4.66948@typhoon.sonic.net...
    >. . .
    > When I visualize a crossword puzzle, I see a matrix in which
    > some cells are blacked out, so that's how I would represent it.
    >
    > Accordingly, in PDC Prolog, I might say
    >
    > domains
    > TEMPLATE = ROW*
    > ROW = CELL*
    > CELL = is(CHAR) ; nil
    >
    > and a puzzle layout like
    >
    > _ _ _ _ x x
    > _ x x x x _
    > _ _ _ _ _ _
    > _ x _ x x _
    > _ x _ _ _ x
    > x x x _ x x
    > _ _ _ _ _ x
    >
    > would be represented by
    >
    > predicates
    > puzzle(TEMPLATE)
    > clauses
    > puzzle([
    > [_,_,_,_,nil,nil],
    > [_,nil,nil,nil,nil,_],
    > [_,_,_,_,_,_],
    > [_,nil,_,nil,nil,_],
    > [_,nil,_,_,_,nil],
    > [nil,nil,nil,_,nil,nil],
    > [_,_,_,_,_,nil]
    > ]).
    >. . .

    A more interesting challenge would be how to efficiently
    generate a 'random' crossword framework (pattern) given a
    number of constraints such as grid/matrix size, minimum and
    maximum site (word) length, and no isolated sites (there
    exists a path from any one site to another).

    For those readers who are game enough to try, here's a
    concrete example problem:

       Write a Prolog programme which will generate a 'random'
       crossword framework given the following constraints:

       - Matrix: 10x10
       - Min. site length: 2
       - Max. site length: 6
       - At least one site shall be max. site length
       - No isolated sites

       The programme should facilitate use of other values than
       the first three given above, i.e. the programme should
       be generic.

    It would be interesting to see and discuss solutions here.

    -- 
    Mail sent to this email address is automatically deleted
    (unread) on the server. Send replies to the newsgroup.
    

  • Next message: Martin Fuchs: "simple list recursion"

    Relevant Pages

    • Re: Araucaria in Whos Who
      ... >Tiger Woods of crossword compiling"? ... On the 80th birthday of the 'Tiger Woods of crossword ... Or to be more precise, it takes John Graham, 80 today, who for 42 ... The puzzle speaks for itself. ...
      (rec.puzzles.crosswords)
    • Times puzzle fails to appear AGAIN
      ... Subject: The Times Cryptic Crossword Number: 23417 ... subscribers to access the puzzle daily; zero hour GMT being my 8am. ... surely not for your overseas customers, ...
      (rec.puzzles.crosswords)
    • Re: The Sunday NYTimes - 15 Down
      ... crossword puzzle in 1913, would be astonished to see how computers are ... Wynne had the job of creating puzzles for the New York World's ... When Clinton finished the call, Shortz checked the puzzle for accuracy. ...
      (rec.music.opera)
    • Re: The Sunday NYTimes - 15 Down
      ... crossword puzzle in 1913, would be astonished to see how computers are ... Wynne had the job of creating puzzles for the New York World's ... When Clinton finished the call, Shortz checked the puzzle for accuracy. ...
      (rec.music.opera)
    • Re: The Sunday NYTimes - 15 Down
      ... crossword puzzle in 1913, would be astonished to see how computers are ... Wynne had the job of creating puzzles for the New York World's ... When Clinton finished the call, Shortz checked the puzzle for accuracy. ...
      (rec.music.opera)