Skip to content
Free delivery, every order. Want a bulk deal or can't find what you need? Email support@pmdway.com now!
Free delivery, every order. Want a bulk deal or can't find what you need? Email support@pmdway.com now!
This Raspberry Pi-Powered Device Ensures That You Always Win at Scrabble

This Raspberry Pi-Powered Device Ensures That You Always Win at Scrabble

from hackster.io

Some games are very easy for computers to play. For example, it is pretty trivial to program a computer to play tic-tac-toe as well as a human can — though every game will end in a draw.

But other games are significantly harder for computers to play. There is a reason that it was a big deal when IBM’s Deep Blue computer defeated chess world champion Garry Kasparov in 1997, which Kasparov claimed was the result of cheating by IBM. Scrabble is another game that can be hard for a computer to play, which is what makes this Raspberry Pi-based, Scrabble-playing device so impressive.

Scrabble is a tricky game to play because there are so many possible combinations of tiles that can be played. The very first word is quite easy: just find the highest-scoring word you can play with your starting letters.

But it quickly becomes exponentially more complex as more words are played. You end up with a great deal of locations where you could play a word, and you have to determine if you can use any of your letters to play words there and which of those words has the highest value.

From a programming perspective, that means the computer essentially needs to check its entire dictionary against every possible location on the board every time it takes a turn.

Home computers have been capable of pulling that off since the ‘80s, though the computer’s turn could take a minute or two and it didn’t take into account “defensive” moves like blocking key tiles. This device works faster thanks to the use of modern hardware, but it’s the computer vision capability that makes it especially interesting.

The system is built with a Raspberry Pi 4 (the 4GB version) and the new Raspberry Pi High Quality Camera Module. The camera is pointed at one set of tiles, and a Python script scans the image to determine which tiles are available. It can then check those against a dictionary and tell you what words you could potentially play.

It doesn’t look at the board itself, so you have to figure out which of those words are actually playable, but that’s still pretty useful if you’re having a hard time thinking of words.

Finally - to keep up to date with interesting news, offers and new products - interact with us on facebook, instagram, and twitter.

Previous article TV for Cats with Raspberry Pi

Leave a comment

Comments must be approved before appearing

* Required fields