wordsnake


wordsnake a Fortran90 code which tries to find a good solution to the "Wordsnake Puzzle", in which a list of words is reordered, trying to maximize the overlap of successive words.

The code is given a list of words and tries to arrange them in a list so that the end of one word has maximum overlap with the beginning of the next word. The entire list is called a "wordsnake", and is scored by squaring the overlaps of each consecutive pair, and adding. We allow the wordsnake to "wraparound", so there's one extra score for overlap from the last word to the first.

Licensing:

The computer code and data files made available on this web page are distributed under the MIT license

Languages:

wordsnake is available in a Fortran90 version.

Related Data and Programs:

wordsnake_test

anagram, a C++ code which determines anagrams of a string, by James Cherry;

puzzles, a Fortran90 code which solves various puzzles.

subanagram, a Fortran90 code which finds words which are anagrams formed from some of the letters of a given master word.

words, a dataset directory which contains lists of words;

Reference:

  1. Dennis Shasha,
    Wordsnakes,
    Dr Dobb's Journal,
    July 2000, pages 143-144.

Source Code:


Last revised on 29 February 2024.