I’ve been playing a lot of Scrabble over dinner lately. A common way to add points is to add a word perpendicular to an existing word, extending it:

Scrabble instructions page describing how to add tiles.

I’ve also been doing a lot of, well, not-coding recently, since becoming a manager. So, I was motivated enough to acquire a word dictionary and write a little Python script to find out the answer.

def stackable(word, valid_words):
    if len(word) == 1:
        return True
    # "ASDF" is stackable if "ASDF" is a valid word and either "SDF" or "ASD" is stackable too.
    return word in valid_words and (stackable(word[:-1], valid_words) or stackable(word[1:], valid_words))


def main():
    words = set([line.strip() for line in open("words.txt")])
    stackable_words = sorted([w for w in words if stackable(w, words) and len(w) >= 9], key=len, reverse=True)
    print("longest stackable words:\n" + "\n".join(stackable_words))


if __name__ == "__main__":
    main()

The answer? It’s a tie between BREECHINGS and FLEECHINGS, composed of the intermediate words (or “words”, given Scrabble’s generous dictionary):

  • HI: hello
  • CHI: the Greek letter
  • CHIN: part of your face
  • CHING: a high-pitched ringing sound
  • ECHING: an obsolete form of “eke”, to augment or to support oneself with difficulty
  • EECHING: also an obsolete form of “eke”
  • REECHING: emitting smoke
    • –> BREECHING(S): a harness strap; a rope securing a cannon to to a ship
  • LEECHING: clinging on and draining
    • –> FLEECHING(S): flattery

If you only add on to the end of the word (by just checking if stackable(word[:-1])), it’s MODERNEST, consisting of the intermediate words (“words”):

  • MO: short for “a moment”
  • MOD: to modify a machine or piece of software
  • MODE: mathematical mean; a manner of acting
  • MODER: an intermediate layer in humus (soil); also an obsolete verb meaning “to moderate”
  • MODERN: pertaining to the present time
  • MODERNE: pretentiously modern (1920s and 1930s art style)
  • MODERNES: pretentiously modern (1920s and 1930s art style)
  • MODERNEST: most modern

Modernest on a scrabbly board. Ok, I admit I just wrote this version first and only realized this isn’t the longest after taking the picture.

$ time python3 stack_finder.py
longest stackable words:
BREECHINGS
FLEECHINGS
RELAPSERS
ISLANDERS
SMOOTHERS
GLASSIEST
CLASSISTS
WHOOPINGS
CLASSISMS
SPARKIEST
FLEECHING
STROWINGS
SWASHIEST
CLEANSERS
SCRAPINGS
MODERNEST
BREECHING
WASHINESS
UPRAISERS
CANTICOYS
PRELATESS
KETAMINES
SCOOPINGS
STABLINGS
SMOOTHEST
SMOOTHENS
REMAILERS
SHEATHERS
ASPIRATED

real    0m0.655s
user    0m0.616s
sys     0m0.032s

Oh, and it takes six tenths of a second to check this for 297,496 words. Computers are fast.