To make a word-building game with AI, start with one letter rack and two turns you can work through by hand. Check that each word fits the current length rule, uses letters the player actually has, and appears in your word list. Only then should the game remove tiles or add points.
In the fictional Second Shelf, the first turn uses exactly three letters. The second allows four or five. The refill is fixed so you can see whether a rejected entry leaves the rack alone and whether an accepted word gives the player the right letters for the next turn.

Set the rack, the word list and the turn rules
Start with S T A R E and a score of zero. Give the player two accepted submissions. The first must use exactly three letters. After it scores, fill the rack from a fixed queue, A T E, and show the second rule. The second word must use four or five letters. Count one point per accepted letter. After two words, a score of eight or more wins.
Use this small test list: ART, EAT, RAT, SEAT, STAR, STARE, TART, TEA, TEASE. The list defines what this puzzle accepts. If an entry is absent, say “That entry isn't in this puzzle's word list.” A short list lets you check the rules and feedback before you choose a dictionary for a larger game.
Validate the entry before changing the rack
Trim spaces at the beginning and end. Check that the remaining input uses only the English letters A through Z in either case, then convert it to uppercase. Check length, count the required tiles, and look up the normalized entry in the list. If a check fails, show the first reason and keep the entry available for editing.

| Check | Example | What to show |
|---|---|---|
| Input format | T3A on turn 1 | Use letters only. |
| Length for this turn | ART on turn 2 | Use four or five letters this turn. |
| Number of each letter | TART from S R A T E on turn 2 | That entry needs two Ts. The rack has one. |
| Word list | SRE from the starting rack on turn 1 | That entry isn't in this puzzle's word list. |
TART is on the list and has the right length for turn two. It still needs a second T. Treat each occurrence as a separate tile. For an accepted word, take the leftmost available copy of each letter and keep the other tiles in order.
Trace the refill and the final score
On turn one, enter tea . It becomes TEA and uses T, E and A. The unused S and R keep their order. The refill appends A, T and E, so turn two starts with S R A T E and three points.

| Action | Rack afterward | Score and state |
|---|---|---|
Submit SRE on turn 1 | S T A R E | 0, still on turn 1 |
Submit TEA and refill | S R A T E | 3, now on turn 2 |
Try ART or TART on turn 2 | S R A T E | 3, still on turn 2 |
Submit STARE on turn 2 | Empty | 3 + 5 = 8, win |
Submit STAR instead | E | 3 + 4 = 7, loss |
There is no refill after the last word. To test legitimate repeated letters, restart and use ART first. It leaves S and E, then the refill makes S E A T E. TEASE can now use both Es and score five points.
Give the AI the rules and their order
SEELE supports starting a game project from a written idea. Put the rack, list, validation order and turn rules in the request. Use a simple rack and text input while you check whether each action changes the right state.
Create an original two-turn browser word puzzle called Second Shelf.
Start with rack S T A R E, refill queue A T E, and score 0.
Use only this word list: ART, EAT, RAT, SEAT, STAR, STARE, TART, TEA, TEASE.
Show the rack, proposed entry, current length rule and score.
Turn 1 accepts exactly 3 letters. Turn 2 accepts 4 or 5.
Trim outer whitespace. Reject any input outside ASCII A-Z or a-z.
Uppercase it, then check length, tile multiplicity and list membership.
On rejection, explain the first failed check and preserve the entry,
rack, score, turn and refill cursor.
On acceptance, consume the leftmost available occurrence of each used
letter and preserve the order of the others. Add one point per letter.
After turn 1, append the three queue letters in order and show turn 2.
After turn 2, do not refill. Win at 8 or more points, otherwise lose.
Restart restores the original rack, empty entry, score 0, turn 1,
unused queue and no outcome. Use simple original assets.
Build rejection feedback before adding score and refill. After each rejected entry, compare the entire rack and score with the previous state. When you ask for a fix, include the turn, rack, entry and first failed check. The brief-to-playable testing guide explains how to report that kind of difference.
Try raising the second turn's minimum
Change only the second turn's minimum from four to five letters. Replay TEA, then STAR. The original rules accept STAR and end the game at seven points. Under the new rule, the same entry is rejected for length. The player stays on turn two with three points and can still enter STARE to reach eight.
Check the displayed length rule, the rejection and the unchanged rack. Then restart and confirm that turn one still accepts three letters. This comparison helps separate a stricter entry rule from an accidental change to the rack or scoring.
Frequently asked questions
Why check the rack before the word list?
List membership and available tiles answer different questions. If a word is on the list but requires a second copy of a letter, tell the player what is missing. Checking the rack first lets you give a useful message even when several rules could reject an entry.
How should I handle repeated letters?
Compare counts for each letter in the entry and rack. Each occurrence uses one tile. One E cannot supply two Es, but a rack with two Es can supply both. Test the accepted and rejected cases so a duplicate-letter bug cannot hide behind a successful lookup.
Why use a small word list first?
A short list makes the expected results easy to reproduce. You can intentionally include a word the rack cannot form and leave out an entry that otherwise fits. When you add a broader dictionary, decide which language, inflections and spellings the game should accept.
Should I vary word length and refill at the same time?
Change one first. A longer minimum can reject a word the rack still contains, while a different refill can remove a letter the player needs. If both change, the same rejected entry can have several causes. Keep the first comparison simple enough to diagnose.
Start with two turns you can replay
Choose a starting rack, a small word list and one rule that changes between turns. Bring those details to the SEELE AI Puzzle Game Maker as a starting brief. Run the same accepted and rejected entries after every change before adding new word rules.


