Genetic Word Finder


there might be minimal changes in the required program that will be added. the bid will be updated with the changes as soon as they are deiced upon.


A Java program that uses a *genetic algorithm* approach to identifying words in a list given below. The program will begin with a population of 1000, four letter nonsense words and grow through survival of the fittest to a point where the population contains several of our target words.


*genetic algorithm* requires that you have a *population*, with a *size* and an *initial state*. Individual members of the population are called *alleles*. We will use a population with a size of 1000. Each *allele* will have an initial state of a four letter, uppercase word composed of random characters. You will find it beneficial to let each element of the population also include a variable in which you can store its current *value*. For the purpose of generating the initial population (and several other purposes) you will need a random number generator.

A *genetic algorithm*also requires an *objective function*. This function calculates the 'fitness' of each allele. Based on this fitness value, individual alleles are given greater expectation of surviving and propagating. Your objective function should credit a member of the population with 25 points for each letter in its current state that matches a letter in the same position in one of the target words.

For example,

population word target words




## Deliverables

The word MXRA scores 25 points when compared to the target word MANY. Only the initial M matches. It scores 0 points when compared to RANK. And it scores 50 points when compared to the target word MORE. The allele should be assigned the fitness value 50, the maximum from all of the target word comparisons.

To fabricate an objective function, we need an objective. In this case the objective is to match as many of the words in the following list as possible. All of the target words, and all of the word states in the population are constrained to be uppercase alphabetic characters. The following 20 four letter, upper case words will be coded into your program for use in the objective function.






Use a hash table to keep these target word values. The words have been carefully chosen so that a hashtable will be very efficient.


*genetic algorithm* also requires a *generation phase*, in which the 'most fit' members of the population are used to create new (hopefully superior) members of the population. This phase is sometimes referred to as the *crossover phase* because of the ways in which is often accomplished. The code will allow the top scoring 45% (450) members of the population to survive to the next generation. We will allow this 45% to mix, in pairs to generate a new 45% (450) members of the population. The remaining 10% (100) of the population will be regenerated randomly. (You can play with these percentages to see what effect it has on your results, but these numbers are a good starting point for you.) The top scoring allele and the next to highest will trade some of their characters to make two slightly new alleles. Then the next two top scoring alleles will do the same. The information exchange (crossover) will be accomplished by selecting a random character from one parent and a random character from the other parent and swapping them. Just for the sake of science, we will provide a 3\% chance that one of these crossover characters mutates into a new character during the exchange. In genetic algorithm terms this is called *random mutation*.

Notice that the notion of 'most fit' or 'highest scoring' in the previous paragraph strongly suggests that prior to the generation phase it will be necessary to sort the population by fitness (value). You may use any type of sort that suits you (except an external or system sort).

1) complete source code of all work done.

2) in ready-to-run condition on the platform specified in this bid request.

3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).

4) code should be authentic and made exclusively only for me.

5) use only JAVA.

## Platform

The program must, in general, do the following things:

build a hash table for the target words

initialize the population

for N generations

evaluate the population

sort the population by fitness

generate a modified population

Where *N* will be 30

From time-to-time the program will produce a member of the population that matches a target word. When this happens, you are to report the match and the generation in which it occured with some appropriate output (e.g. `found: MANY`) to *stdout* and remove that allele from the population. Leaving it in the population would allow it to propagate and result in a, perhaps, excessive number of duplicate matches. This is an arbitrary decision, made in an attempt to get the algorithm to match as many different words a possible. There will be redundant matches, nonetheless, so mark a target word when it is matched and do not report it a second time.

Skills: Engineering, Java, MySQL, PHP, Software Architecture, Software Testing

See more: work finder, word match algorithm, word find science, what is an algorithm, starting objective c, sort algorithm, science match, science algorithm, random no generation in c, purpose of use case, program algorithm example, population of java, play n trade, notice letter, most efficient sort algorithm, most efficient algorithm, matches java example, match 3 algorithm, letter of notice, java population

About the Employer:
( 6 reviews ) United States

Project ID: #3004355

Awarded to:


See private message.

$17 USD in 7 days
(104 Reviews)

7 freelancers are bidding on average $67 for this job


See private message.

$84.15 USD in 7 days
(160 Reviews)

See private message.

$195.5 USD in 7 days
(15 Reviews)

See private message.

$59.5 USD in 7 days
(17 Reviews)

See private message.

$18.53 USD in 7 days
(4 Reviews)

See private message.

$10.2 USD in 7 days
(1 Review)

See private message.

$85 USD in 7 days
(1 Review)