Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.25 KB

README.md

File metadata and controls

35 lines (24 loc) · 1.25 KB

Letter Boxed Solver

This is a simple solver for the New York Times Letter Boxed puzzle. The puzzle consists of a 12-letter box shaped board, split into 3-letter sides.

The goal is to create a complete cover of the given letters in as few words as possible.

You are restricted by the following rules:

  • Consecutive letters must not be on the same side of the box.
  • The first letter of a new word must be the same as the last letter of the previous word.
  • Letters may be used multiple times.

For Example: here is a sample board and a possible solution.

    D   E   G  
  ┌─┬───┬───┬─┐
 R├           ┤L 
  │           │  
 W├           ┤U 
  │           │  
 N├           ┤Y 
  └─┴───┴───┴─┘
    T   F   S  

Possible solution: SENTRY, YES, SELF, FUNDS, SWUNG

Purpose

This project was written as a way to practice my rust skills and solve a puzzle that I really suck at :)

Details

The solver uses the 2of12 wordlist arranged into a trie, and uses an A* search for efficient solutions. It currently assumes a solution can always be found in 5 words or less, which has held true so far.