Tutorial Β· 5 steps Β· word ladder kit

Make a daily word puzzle with AI

Did your AI word game let a player type "zqxw" and call it a word? Or hand everyone a different puzzle on the same day? A word game lives on two things: a word list you can trust, and the same puzzle for every player.

The word ladder kit has both. You change one letter at a time to get from the start word to the target, and every step has to be a real word. A new ladder comes from the date each day. The five prompts below give it a bigger word list, a par score, a phone keyboard, a share line and a streak. We call the result Rungs. Name yours what you like.

SHITle and Peele are word ladders on this shelf with a new puzzle every day. Both play by the kit's rules: one letter at a time, with a real word at every step.

Step 1: Grow the word list

Read index.html. It is a daily word ladder: the player changes one letter at a time from a start word to a target word, and every step must be in the word list in the file. Replace the word list with about 1,000 common four-letter English words, lowercase, in one array. Leave out names, abbreviations and rude words. Keep the list inside index.html.
What you see

the same game, and words you'd expect to work now go through.

If it goes wrong

the AI writes 50 words and a comment that says "add more here", or the list has repeats and words nobody uses. Paste this:

Write the full word list out, every word, with no placeholder comments. Remove duplicates and any word you would not find in a standard English dictionary. Then check that today's start and target words are both in the list.

Step 2: Make every puzzle fair

Make each day's puzzle fair. Seed a random generator from today's local date. Pick a start word, run a breadth-first search from it over the word list, and pick a target 4 to 6 steps away. Show "Par" with the length of the shortest path at the top of the board. When the player finishes, show their step count next to par and one shortest path.
What you see

"Par 5" at the top and a ladder that can always be solved. Reload the page and the puzzle stays the same.

If it goes wrong

the page freezes for a few seconds on load. The AI searched every pair of words to find one that fits. Paste this:

The page hangs on load. Run one breadth-first search from the seeded start word only, and take the target from the words it finds 4 to 6 steps away. If none are found, move to the next start word from the same seed.

Step 3: Make it play on a phone

Add an on-screen keyboard under the board with big letter keys, Enter and Delete. A word that is not in the list, or that changes more than one letter, makes the row shake and shows a short message under the board. The whole game must fit a phone screen 360 pixels wide without scrolling.
What you see

a keyboard you can tap with your thumb and a shake when you try a word that doesn't count.

If it goes wrong

on a phone the system keyboard opens on top of yours and covers the board. Paste this:

Both keyboards open on my phone. Stop the text input from taking focus on touch screens, so only the on-screen keyboard shows. Keep typing on a laptop keyboard working.

Step 4: Add a share line

Add a Share button to the finish screen. It shares one line, "Rungs #42: 5 steps, par 4", with the day number counted from the launch date, then one square per step: green when the step brought the word one letter closer to the target, yellow when it didn't. Add the page address on the next line.
What you see

a tap on Share opens your phone's share sheet with the line and the squares ready to send.

If it goes wrong

the button does nothing on a phone, or does nothing on a laptop. Paste this:

The Share button does nothing. Use navigator.share when it exists and fall back to copying the text to the clipboard. Show "Copied" for two seconds when the copy works.

Step 5: Add a streak and a practice mode

Save each day's result in localStorage and show the current streak of days solved on the finish screen. Add a Practice button that starts a fresh random ladder from the same rules. Practice games never touch the streak or the daily result.
What you see

"Streak: 1" after today's ladder and a Practice button for when one puzzle a day isn't enough.

If it goes wrong

players in another time zone get a different puzzle on the same day, or the puzzle changes in the middle of their evening. Paste this:

The daily puzzle changes at the wrong hour. Build the day number from the player's local year, month and day, and count days from the launch date, not from milliseconds since 1970.

Where makers took it

SHITle, four-letter word ladder, rude finish

SHITle

Turn a four-letter word into SHIT one letter at a time, with a real word at every step. Daily ladders and practice, scored against the shortest path.

Peele, daily three-letter word ladder

Peele

A daily three-letter word ladder that always ends at PEE, with practice games too.

@playpeeleSee the game
SevenLetters, solve four daily letter puzzles

SevenLetters

Four daily letter puzzles: find the best play on the board, unscramble a seven-letter word, shrink a word to three letters, or score all you can in 90 seconds.

@sevenlettersdailySee the game

Put it on the shelf

Got a word game people come back to each day? Put it online with the hosting tutorial, then send it in. Listing is free. Your game gets its own page and a place on the puzzle shelf.

Submit your game

FAQ

Where do I get a word list for a word game?

Ask the AI for one, as in step 1, and keep it inside the game file. A list built into the page loads with it and can't go down. Read through the first hundred words yourself, because one bad word in the daily answer is what players remember.

How does everyone get the same daily puzzle?

The game turns today's date into a number and uses it as the seed for its random picks. Every player who opens it on the same local date gets the same start and target. Nothing is stored on a server.

Can the target word be the same every day?

Yes. SHITle always ends at SHIT and Peele always ends at PEE. Ask the AI to fix the target word and pick only the start word from the date, at a distance of 4 to 6 steps.