Thursday, October 27, 2011

Words With Friends Solver

Out of sheer boredom last year I decided to create a program that could figure out the "best" moves given what the board looks like and the letter tiles that a player is holding. The program I released only displayed the top 30 moves in terms of point value, but I did create an AI that would analyze the board position, ability to add suffixes/prefixes, tiles remaining, proximity to bonus tiles, etc to score the moves.

Beginning with a text based user interface that was really boring to look at (it was ugly. trust me), I shifted into a graphical user interface that looks a lot nicer. See :)


If you want to download it, here's the link to the medafire upload:
Just to be clear, it runs on a computer (works for both Mac and PC).
I don't really have the time nor the skills (I don't know Objective C) to code it into an iOS application, but if anybody is willing to, I'd be happy to work with you and supply the source code.
On a side note, I was very surprised to find a simple acronym solver in the app store that was selling for one or two dollars and had sold massive quantities. That kind of program probably took less than 30 minutes to code.

How to use: You can input existing tiles onto the board by just typing them in (using arrows keys to set the direction in which you typed: vertical or horizontal). After typing in your tiles on the bottom (accommodates for a maximum of 2 blank tiles) you can simply hit run and the top 30 results will appear on the right. You have the option to "try" each of the moves showing you where they would appear on the board. You can also save the board somewhere on your hard drive and load it later.

The way it actually works is overly complicated and technical so I won't go into it, but it was quite fun to code and I had a lot of friends help me test it so I could fix all the bugs. My original intention was to make a program that was ridiculously good at the game (it's quite hard to beat), but then I realized that most people just care about winning and instead used the program to cheat. 

**There's no point in making a program nobody is going to use so to cater to that I decided to drop work on the AI portion and just focus on making the overall user interface better. In case you give it a shot, I would appreciate any comments or suggestions on how to improve the program. :D**

The rest of this post is for the most part unrelated: 

No Mercy

My high score was actually achieved without the use of my program against my English teacher, but I'm sure given the same tiles that I had, my program would likely have broken 700.



This was something I did just for fun, based off of the highest scoring scrabble move (also this word).
I know there are higher scores out there but it's just something interesting :)

No comments:

Post a Comment