What is the difference between "Genetic" Algorithims and regular algorithims?

Started by
2 comments, last by smiley4 21 years, 4 months ago
Are "genetic" algorithims just more complex?
Now I shall systematicly disimboule you with a .... Click here for Project Anime
Advertisement
The term "algorithm" is very general, a genetic algorithm is usually used in artificial intelligence applications. I couldn''t explain everything about genetic alg''s here so why don''t you check out ai-depot.com or any of the other AI web sites, they will have a good explanation of how they are used.
An algorithm is just some way to turn input into output. A genetic algorithm is based on the processes behind evolution, and is generally used when you know what you want it to do, but you don''t know the best way to do it. You take a whole bunch of algorithms (population), test them to see how close they are to the result you wanted (live), keep the ones that came close(survival of the fittest), and replace the rest with random variations and combinations of the remainder (reproduction). You then just keep doing that until you eventually get something that works well (evolution).
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
Take this answer with a grain of salt, since you haven''t really been specific (algorithm is quite broad) and there really isn''t space to try and explain all about it (see previous post for sites to visit).

In very simplistic terms an algorithm is a "method" for solving a problem. Specifically it is a step by step method that is suited to a computers dumber than dirt abilities (must only use math and basic logic, no intuition).

For example an "Algorithm" to open a door might look like this:

1 Turn toward door
2 Walk forward one step
3 Repeat step 2 until distance to door is 1 foot
4 Extend hand and grasp handle
5 Turn handle and push forward

Most algorithms are devised by humans, by analysing the problem, planning solutions and then testing them. A genetic algorithm basically removes the first two steps, instead using a form of brute force to find a working algorithm. In general terms a GA would start with a pool of possible actions. It then mixes them to create several possible solutions, such as:

1 Extend hand and grasp handle
2 Walk backward one step
3 Repeat step 1 until door is open

It then uses a "fitness function" to test the solutions, which assigns a value that can rank them. The worst solutions are discarded, and the best solutions are tweaked through various methods ("mating" the solution, mutating them, etc). The testing process is then repeated with the new solutions until a good enough solution is found.

While this method may seem wasteful (it is unlikely to ever find an optimal solution to a problem [if it exists], only very good ones) it can be useful for solving problems that cannot be effectively analysed by humans (such as problems with a large number of variables, such as maximization/minimization problems). GAs also tend to come up with very interesting and effecient solutions, as they are able to "think outside the box".



This topic is closed to new replies.

Advertisement