Meet Lexiplo: a JavaScript word game against Lexibot
Play my Scrabble-style browser game against Lexibot, and take a look at the JavaScript rules and Web Worker behind your opponent.
Sometimes it’s nice to build something whose main purpose is to be fun. My latest project is Lexiplo, a Scrabble-style word game you can play in your browser against a computer opponent called Lexibot.
There are no accounts to create and no opponent to arrange a time with. Pick a difficulty, draw your tiles and see what you can make of them.
Seven tiles and a familiar problem
If you’ve played Scrabble, you’ll recognise the idea: build connected words on a 15 × 15 board, make the most of the letter and word premiums, and try to avoid leaving your opponent something too tempting. Blank tiles can stand in for a letter, and using all seven tiles earns a 50-point bonus.
You can drag tiles onto the board, or tap a rack tile and then a square. Before committing a move, you can check its score, recall your tiles and try another arrangement. There are also controls to shuffle your rack, exchange tiles or pass when inspiration refuses to arrive.
Lexibot has four difficulty settings, from beginner to hard. Start gently, or see how well your vocabulary stands up to an opponent that has a dictionary close at hand.
A small game, running in your browser
Lexiplo grew out of an older word-game project of mine called Scrobble. This version brings it into a browser-only application built with vanilla JavaScript and Vite. The board, rules, scoring and computer opponent all run locally; a game doesn’t need an application server or a paid AI service.
That last point is quite fun in its own right. Lexibot is a word-searching bot: it works through possible tile placements against a local dictionary, rather than asking a language model what to play.
The rules live in a module separate from the interface. Your moves and Lexibot’s candidates go through the same validation and scoring, including the cross words a placement creates. It keeps the two players playing by the same rules and makes the game logic easier to check independently.
Giving Lexibot somewhere to think
Searching a board for possible words is more work than drawing it. Lexibot runs in a Web Worker, so that search happens away from the main thread that handles the interface.
The dictionary includes a prefix tree, or trie, which lets the search abandon a branch as soon as its letters cannot lead to a word. Lexibot searches around anchor squares where new tiles can connect to the board, then ranks the valid moves using the shared scorer.
Difficulty changes both the search budget and the choice of move. Hard mode takes the highest-scoring candidate it finds within its time limit; easier settings introduce more variety by choosing from lower-ranked candidates. Hard mode isn’t an exhaustive search or a promise of perfect strategy, but it gives you something to compete with.
Come back for another turn
Committed turns are saved automatically in this browser. When you return, choose Resume saved game to carry on. Saves stay on that browser and device, so they won’t follow you to your phone or survive clearing browser storage.
There are light and dark themes, optional sounds and a move history with word-definition lookups. Word validity comes from the game’s own word list; the optional online definitions can have different coverage.
For now, it’s one person against Lexibot. Enough for a quick break, a little vocabulary testing and the occasional discovery that your opponent knows a word you were quite sure it had invented.