Word game solver

Cancelado Publicado Dec 20, 2010 Pagado a la entrega
Cancelado Pagado a la entrega

I need a software program to solve word games such a scrabble using the algorithm that I will specify

## Deliverables

Firstly you will need basic familiarity with the rules of scrabble. The program is a console program that takes several parameters from the command line. The first parameter is a text file which contains the board layout. The text file is simply a row of Strings e.g.

BIT

WHO

T

WISH

Represents a simple 4x4 board. The software should deduce the layout of the board from the text file. The second parameter is a text file which contains the layout of the bonus squares. For example

"3W","","","3L"

"","2W","","2L"

"2W","","","2L"

"3W","","","3L"

Could represent the location of triple words, triple letters, double letters, double words etc. Assume that the first two inputs always match in dimension i.e. If the first input is 15x15 then the second input will also be 15x15. There will be a static configuration file called [url removed, login to view] that designates the point score of each letter. For example

A=1

B=4

etc

Scores should be calculated using the standard rules of scrabble for example if a word crosses two double word tiles, the multiplier should be 4 etc.

The third parameter should represent a rack e.g.

AUJE UAU

Would represent an eight letter rack with a blank space interpreted as a blank tile. Another configuration file called [url removed, login to view] will contain the tile distribution

e.g.

A=9

B=3

Would indicate that in total there are 9 letter As, 3 letter Bs etc.

The software has to produce two solutions. The first is a simple highest score. There needs to be a configuration file e.g. [url removed, login to view] to specify the number of solutions. For example if we specified

solutions=5

Then the program should produce the highest five scores. It should save these in a text file [url removed, login to view] and produce an ASCII solution such as the following:

BIT

WHO

T

WISH

It should also produce a second solution representing the "best move". The algorithm for best move is as follows. For any legitimate solution:

1. First obtain our score

2. Secondly randomly draw tiles for the opponent using only remaining tiles i.e. Deduct tiles from the board, and tiles in our hand. Play the highest scoring move

3. Thirdly draw random tiles for ourselves using only remaining tiles i.e. If we have an eight letter rack and played a five letter word initially, then

a) deduct tiles from the board

b) deduct tiles from our hand

c) deduct the tiles drawn in step (2)

d) randomly draw 3 letters

e) play the highest score

The "best move" score is calculated by taking the AVERAGE point score of our two moves and then subtracting the opponent's score. For example suppose we score 20 and 40, the opponent scores 10 then the best move score is (20 + 40) / 2 - 10 = 20

Conceptually what I'm trying to do in these three steps is determine:

1. Best raw score

2. How good a countermove the opponent has

3. How good our remaining rack is

Since any one move is random, the above steps need to be done a number of times. This should be specified in the configuration file e.g.

iterations=1000

The highest average "best move" score is the best solution. Again it should print the best n solutions according to the parameter in the configuration file e.g.

solutions=5

This should be stored in ASCII in [url removed, login to view]

There is a lot of open source already produced in this area

[url removed, login to view]

Happy for any of this to be ported to java. I'm classing this as a small project since a lot of the algorithms have already been written. It is mainly a case of porting the algorithms then writing a small amount of original source code.

There also needs to be some mechanism to load a dictionary file. Preferably via configuration such as

dictionary=[url removed, login to view]

Once the raw data has been read it is perfectly fine to store any necessary data structures on the hard disk. Performance wise I am expecting 10,000 iterations to take less than 3 seconds.

Ingeniería Java Microsoft Gestión de proyectos Arquitectura de software Verificación de software Windows Desktop

Nº del proyecto: #2993435

Sobre el proyecto

1 propuesta Proyecto remoto Activo Jan 5, 2011

1 freelancer está ofertando el promedio de $50 para este trabajo

Purplecoder

See private message.

$50.15 USD en 14 días
(90 comentarios)
5.2