Posts RSS Comments RSS 77 Posts and 861 Comments till now

Words With Friends AI

I ran across a game called “Words With Friends” these days on the IPhone.  It is very fun to play.  After playing several games, being a computer scientist, I automatically think about developing and artificial intelligence program for the game.   It is pretty challenging as there are a lot of words, and so many possible combinations to check, and for different directions.  I first implemented an exhaustive search, testing every word in the dictionary for every cell.   The result was miserable, one hour goes by and the computer only tested 20% of the words.

Admitted I was stomped.  There has to be a better way.  I have to add heuristics to the search algorithm.  So I mapped out an efficient and clear thought process, and implemented it again.  This time the results are better, took 10 minutes to go through all the words.  Of course, in computer science there are ways to cut processing time with increase in the use of memory.  So after a couple hacks, it can run on reasonable times.

Testing the AI against some opponents, I  kept on improving it with some simple strategies such as sacrificing points to reduce exposure to Double or Triple risks.  I think the AI is pretty good now.  I must say it was a fun project.

Click Here to use my Words With Friends Cheat

26 Responses to “Words With Friends AI”

  1. on 18 May 2011 at 11:23 pmBubu Candelario

    This works great, the words are superb. Thanks

  2. on 05 Jun 2011 at 3:45 pmcARRIEPENNOCK

    CAN I ONLY USE THIS FOR ONE GAME AT A TIME? i AM CURRENTLY PLAYING 3 PEOPLE AND WOULD LIKE TO USE IT FOR ALL!

  3. on 07 Jun 2011 at 3:07 pmadmin

    Yes you can, just put three different game id’s.

  4. on 08 Jun 2011 at 6:43 pmMe

    Is there a way to enter in the blank tile that can be used for any letter?

  5. on 08 Jun 2011 at 8:52 pmcarrie

    what do you put in the letter catagory if you have a blank tile?

  6. on 09 Jun 2011 at 4:40 amadmin

    blank tiles carry no points, so you can put common letters in place of the blank tile to increase the number of possible words.

    My favorite is just putting any of the vowels. a, e, i, o, or u.

  7. on 12 Jun 2011 at 11:20 amQ-jmpr

    That’s a cool hack, but I thought that’s what Words With Friends used for “random opponent” when it first came on-line/ couldn’t FIND random opponent? Right?

  8. on 10 Jul 2011 at 10:47 pmChef J

    This is awesome. It is really helping me to learn new words, and help with my dislexia! Thank you!

  9. on 08 Aug 2011 at 1:47 amLisa

    great website. the one thing i would suggest is to add the points total.

  10. on 21 Aug 2011 at 2:21 amLaura

    Thank you! really thank you you have done humanity or in this case MY EGO heheh a great good, since my native language is Spanish, my english words maybe limited and my friends were just beating me in this game thanks to you … well… I can “pretend” I am good with. It works really great!

  11. on 24 Aug 2011 at 3:36 pmJames Madison

    It seems to have a major bug. I told it I have the letters “fzriuee” and it told me to spell “freeze” entirely out of my letters where one of the “e”s extended a word already on the board. The problem is I don’t have enough “e”s to spell that word.

  12. on 28 Aug 2011 at 6:26 pmWinner

    Cheaters never prosper.

  13. on 18 Sep 2011 at 6:47 pmTara colgan

    Want to play, please no cheaters.. frndslover

  14. on 15 Jan 2012 at 5:40 pmladuke

    How do you determine what words to use at the different skill levels? Do you have separate word lists? Or do you use an algorithm to determine that?

  15. on 21 Jan 2012 at 2:40 amXaiier

    This is so cool!

    I was wondering, would you be willing to share some of the tricks you used to make this work? I’m also a bit of a programmer and I also thought of doing something like this but I’m a little lost on something this complex. Trying to replicate the processes of the human mind are quite difficult. :S

  16. on 26 Jan 2012 at 4:40 amphil

    The comments on your Words with friends” site should be titled “rawest, most disgusting, gay porn blog” I have ever seen. There should be some way to report or “mute” this garbage!

  17. on 05 Feb 2012 at 3:41 pmAlx

    Hi, I am a CS major as well. I would love to see your algorithm, do you have plans to share the source code?

    thanks

  18. on 12 Feb 2012 at 12:05 amMichael

    Since you can’t comment directly on it, I thought I’d mention here that the “Words With Friend Dictionary” that you have a link to here is nothing of the sort.

    First of all, it has numerous words that exceed 15 letters in length, and there’s absolutely no reason the production Words With Friends word list would contain them.

    While I agree it’s a nice list, it is not “the word list used by the actual game” as you state.

  19. on 14 Feb 2012 at 4:34 amdaBoss

    Nice work. It would be funny if the saved game’s could detect the another game with the exact same letters. If your opponent was also using this tool, it could tell you. I like to ‘play’ the game, but this dude at work is just kicking my butt. I wonder if he is using this?

  20. on 22 Feb 2012 at 4:59 pmShane

    Looks like you got hacked, dude. You might want to tighten up things around here.

    document.forms[0].assets.value = ‘cheaters never prosper’;
    document.forms[0].assets.setAttribute(“readOnly”,”readOnly”);
    document.getElementById(“username”).disabled = true;

  21. on 22 Feb 2012 at 6:10 pmKathie

    This was totally amazing, and I have had a LOT of fun pretending to be a genius. However, today it no longer works. My games will not load, there are the words “cheaters never win” in the space where you are supposed to put your tiles, I cannot post a comment, etc. I really hope we don’t lose this wonderful site and that this can be fixed. You are awesome and a genius for real in any case!

  22. on 26 Feb 2012 at 3:43 pmJAMES TAYLOR

    NEED SOME HELP FROM THE “ADMIN”……PLEASE LET ME (AND OTHERS) KNOW HOW TO DELELE GAME ID’s THAT ARE NOT USED. LIST IS GETTING REALLY LONG.

    THANKS FOR A GREAT PROGRAM.

  23. on 07 Mar 2012 at 11:50 pmJAMES TAYLOR

    Still need some help from the administer. Game list is getting really long and it is getting harder to find the game that I need. I have changed my method of naming games to a different format:
    Month Day Hour:Minute Opponent Name (All CAPS). We just need a way of deleting expired games to clean up the list. If anyone else agreesm please let the administrater know.

    Thanks,
    James Taylor
    BLUOVAL1988@ATT.NET

  24. on 15 Jan 2013 at 6:44 pmS

    While this works with “Word Feud”, it doesn’t take into account the bonus tile arrangements. Have you considered trying to write a version to include board bonus tile selections? Sounds a bit more complicated! :)

  25. on 23 Feb 2013 at 2:51 pmMichael

    This site works great. Have been getting stomped by a cheater forever. Stumbled on this and your site has been staying a solid 100 points ahead of them. I’m sure random letters affect the results some, but nice work none the less! Easy to use, quick response time and nice simple functionality. Thanks for tinkering!

  26. on 08 Mar 2013 at 12:00 amnina

    You may want to fix the save game option. I can put in any name and mess with their board. Booyah

Trackback this post | Feed on Comments to this post

Leave a Reply