RSS

Behind-The-Scenes of a Board Games Website

We’re journaling the development of FastMovingGames, our new online service for board gamers - read on for previews, tech insights, and news of the launch!

Ever Played the Board Game Carcuson?

Carcassonne Board GameHow do you spell Carcassonne again? Is it one s and two n’s or two s’s and one n? Actually it’s two s’s and two n’s according to the Geek.

“So what?” I hear you ask - well, part of the final site builds on the current board games list to allow you to find a game. But what if you’re looking for Yinsh or Zooloretto - you don’t want to scroll through 4000+ board games before you get to the game you want to look at, so how about doing a search?

Problems with Searching

Searching through a list of games can be a little trickier when you’re looking for odd-named board games or game names in languages you’re not used to spelling. In a normal web search if you don’t type in the search text exactly as it appears in the database, then the web site’s not going to find the game - you’ll be left with a blank “No search results found” message and probably frustrated.

Web usability dictates we should help you find what you want as effectively as possible. Luckily, the underlying database and programming language I’m using to build FastMovingGames supports a little-used, but magnificent function called SOUNDEX…

A Census-tive Topic?

Digging around, it looks like SOUNDEX is an encoding system originally used to find immigrants’ names in census data when the researcher didn’t know how to spell the name (but could make an educated guess).

Mis-spelled names… getting warmer…

The SOUNDEX encoding system reduces each name to an alpha-numeric code which is one letter and three numbers. Repeat for the name you’re trying to match and you can then compare.

The system is based on how consonants are pronounced, with similar consonants grouped and encoded together. Vowels and common vowel-replacements (Y, W, and H) are disregarded from the encoding along with a few other tweaks described on the genealogy site.

The SOUNDEX code numbers (i.e. similar sounding):

  1. = b, f, p, v
  2. = c, g, j, k, q, s, x, z
  3. = d, t
  4. = l
  5. = m, n
  6. = r

And here’s an example:

Take the name “Carcassonne” and encode it:

  1. Write the name “Carcassonne” on a scrap of paper.
  2. Put a circle around the “C” because you always keep the first letter.
  3. Cross out the vowels - “a”, “o” and “e”.
  4. You’re left with Crcssnn.
  5. Insert Soundex code numbers for these letters you arrive at: C-62255
  6. We only count one of any two contiguous letters that are encoded the same so we end up with C-625.

Sounds Like Magic!

So we have encoded “Carcassonne” into C-625. Great! But wait, here’s the magic:

  1. SOUNDEX(’carcussone’) = C-625
  2. SOUNDEX(’carcuson’) = C-625
  3. SOUNDEX(’carcsonn’) = C-625
  4. SOUNDEX(’crason’) = C-625
  5. SOUNDEX(’karkasone’) = K-625

Common mis-spellings 1-4 are also encoded the same! This means that we now have a mechanism to match up game names in our games list that sound the same, but could actually be spelled quite differently (e.g. number 4 above) thus making a great ’sounds like’ search facility.

Okay, so there’s limitations such as in the last example - although the words sound the same, because we keep the initial consonant, we don’t end up matching the two words, but it’s almost there!

Either way, its still better than returning a useless “no results found” message when searching for games so I’ll be incorporating this search trick into the games search module which I’m developing next.

Isn’t it amazing what some people dream up!

-Dan

Comments (6)

  1. Brother Flomsk

    I am flabbergasted - that’s amazing!!!

  2. Barry Nadler

    Hey Dan,
    I am a new games site myself. My goal is to be a store that offers similar games to what you are dealing with. I am not sure what your development plans are, but I am starting to work the social marketing for my site http://www.bestdanggames.com.

    If there is a joint venture or way that we can assist each other, please contact me with any ideas you may have. Since I don’t know what you are planning, I can not offer real ideas to you.

    Thanks and hope to speak with you soon.
    Barry Nadler
    http://www.bestdanggames.com

  3. Tao

    Sweet! That is a great idea and something I’ll have to bookmark and discuss with my developer.

    We’re working around that in a slightly different way in using a ‘filter’ system for people. So instead of searching for a name, you’d search for e.g. ‘development’ and ‘$20-50′ and ‘1990′ (all listed in drop-down menus). Then it’d just pop the data up.

    It doesn’t do names obviously, but this way you can narrow your search down pretty fast if you know the kind of games you like. Then again, our usability idea is for a store but the above sounds real good too.

  4. Dan

    Hi Tao,

    Yeh, its pretty neat - I’ll combine this will a full-text search (often called a natural language search) so that if you’re searching for Carcassonne (spelled correctly this time!) then it will also find Carcassonne: the castle, Carcassonne: the city, Carcassonne: inns and cathedrals etc.

    I’ve almost developed the games search module already so will post more when it’s complete - drop me an email if you want any help or suggestions on how you might use it for Starlit Citadel.

    Great site by the way, hope its getting lots of business.

    Cheers,
    -Dan

  5. AJ

    Hehe, I’ve been keeping SOUNDEX in the back of my mind to use for a couple of decades now, glad to see someone else has heard of it too! Of course it would be you. Good work.

  6. Dan

    Yeh me too, been waiting for a good excuse to use it, good to finally get stuck into.
    -Dan

Add Your Comment