Directories | Web | Images | Groups | News | Shopping | Local

Enter your search keyword(s):

 



(formerly Encyclopedic directory)
Algorithms
Home / Top / Computers / Artificial Intelligence / Genetic Programming / Algorithms

(formerly Encyclopedic directory)

See also:
Related articles

Edit | Discuss Article

Algorithm

 

An algorithm, broadly defined, is an understandable and finite set of instructions for accomplishing some task which, given a defined set of inputs, will result in some recognisable end-state (contrast with heuristic). Algorithms often have steps that repeat (iterate) or require decisions (such as logic or comparison) until the task is completed.

Different algorithms may complete the same task with a different set of instructions in more or less time, space, or effort than others. A cooking recipe is an example of an algorithm. Given two different recipes for making potato salad, one may have peel the potato before boil the potato while the other presents the steps in the reverse order, yet they both call for these steps to be repeated for all potatoes and end when the potato salad is ready to be eaten.

Correctly performing an algorithm will not solve a problem if the algorithm is flawed or not appropriate to the problem. For example, performing the potato salad algorithm will fail if there are no potatoes present, even if all the motions of preparing the salad are performed as if the potatoes were there.

Table of contents
1 Formalized algorithms
2 Implementing algorithms
3 Example
4 History
5 Classes of algorithms
6 See also
7 References

Formalized algorithms

Algorithms are essential to the way computers process information, because a computer program is essentially an algorithm that tells the computer what specific steps to perform (in what specific order) in order to carry out a specified task, such as calculating employees’ paychecks or printing students’ report cards. Thus, an algorithm can be considered to be any sequence of operations which can be performed by a Turing-complete system.

Typically, when an algorithm is associated with processing information, data is read from an input source or device, written to an output sink or device, and/or stored for further use. Stored data is regarded as part of the internal state of the entity performing the algorithm.

For any such computational process, the algorithm must be rigorously defined: specified in the way it applies in all possible circumstances that could arise. That is, any conditional steps must be systematically dealt with, case-by-case; the criteria for each case must be clear (and computable).

Because an algorithm is a precise list of precise steps, the order of computation will almost always be critical to the functioning of the algorithm. Instructions are usually assumed to be listed explicitly, and are described as starting 'from the top' and going 'down to the bottom', an idea that is described more formally by flow of control.

So far, this discussion of the formalization of an algorithm has assumed the premises of imperative programming. This is the most common conception, and it attempts to describe a task in discrete, 'mechanical' means. Unique to this conception of formalized algorithms is the assignment operation, setting the value of a variable. It derives from the intuition of 'memor' as a scratchpad. There is an example below of such an assignment.

See functional programming and logic programming for alternate conceptions of what constitutes an algorithm.

Implementing algorithms

An algorithm is a method or procedure for carrying out a task (such as solving a problem in mathematics, finding the freshest produce in a supermarket, or manipulating information in general).

Algorithms are sometimes implemented as computer programs but are more often implemented by other means, such as in a biological neural network (for example, the human brain implementing arithmetic or an insect relocating food), or in electric circuits or in a mechanical device.

The analysis and study of algorithms is one discipline of computer science, and is often practiced abstractly (without the use of a specific programming language or other implementation). In this sense, it resembles other mathematical disciplines in that the analysis focuses on the underlying principles of the algorithm, and not on any particular implementation. One way to embody (or sometimes codify) an algorithm is the writing of pseudocode.

Some writers restrict the definition of algorithm to procedures that eventually finish. Others include procedures that could run forever without stopping, arguing that some entity may be required to carry out such permanent tasks. In the latter case, it can be difficult to determine whether a given algorithm successfully completes its tasks.

Example

Here is a simple example of an algorithm.

Imagine you have an unsorted list of random numbers. Our goal is to find the highest number in this list. Upon first thinking about the solution, you will realize that you must look at every number in the list. Upon further thinking, you will realize that you need to look at each number only once. Taking this into account, here is a simple algorithm to accomplish this:

  1. Pretend the first number in the list is the largest number.
  2. Look at the next number, and compare it with this largest number.
  3. Only if this next number is larger, then keep that as the new largest number.
  4. Repeat steps 2 and 3 until you have gone through the whole list.

And here is a more formal coding of the algorithm in a pseudocode that is similar to most programming languages:
Given: a list "List" 

counter = 1
largest = List[counter]
while counter <= length(List):
    if List[counter] > largest:
        largest = List[counter]
    counter = counter + 1
print largest

Notes on notation:
  • = as used here indicates assignment. That is, the value on the right-hand side of the expression is assigned to the container (or variable) on the left-hand side of the expression.
  • List[counter] as used here indicates the counterth element of the list. For example: if the value of counter is 5, then List[counter] refers to the 5th element of the list.
  • <= as used here indicates 'less than or equal to'

As it happens, most people who implement algorithms want to know how much of a particular resource (such as time or storage) a given algorithm requires. Methods have been developed for the analysis of algorithms to obtain such quantitative answers; for example, the algorithm above has a time requirement of O(n), using the big O notation with n representing for the length of the list.

History

The word algorithm is a corruption of early English algorisme, which came from Latin algorismus, which came from the name of the Persian mathematician Abu Ja'far Mohammed ibn Musa al-Khwarizmi (ca. 780 - ca. 845). He was the author of the book Kitab al-jabr w'al-muqabala (Rules of Restoration and Reduction) which introduced algebra to people in the West. The word algebra itself originates from al-Jabr in the title of the book. The word algorism originally referred only to the rules of performing arithmetic using Arabic numerals but evolved into algorithm by the 18th century. The word has now evolved to include all definite procedures for solving problems or performing tasks.

The first case of an algorithm written for a computer was Ada Byron's notes on the analytical engine written in 1842, for which she is considered by many to be the world's first programmer. However, since Charles Babbage never completed his analytical engine the algorithm was never implemented on it.

The lack of mathematical rigor in the "well-defined procedure" definition of algorithms posed some difficulties for mathematicians and logicians of the 19th and early 20th centuries. This problem was largely solved with the description of the Turing machine, an abstract model of a computer formulated by Alan Turing, and the demonstration that every method yet found for describing "well-defined procedures" advanced by other mathematicians could be emulated on a Turing machine (a statement known as the Church-Turing thesis).

Nowadays, a formal criterion for an algorithm is that it is a procedure implementable on a completely-specified Turing machine or one of the equivalent formalisms. Turing's initial interest was in the halting problem: deciding when an algorithm describes a terminating procedure. In practical terms computational complexity theory matters more: it includes the puzzling problem of the algorithms called NP-complete, which are generally presumed to take more than polynomial time.

Classes of algorithms

There are many ways to classify algorithms, and the merits of each classification have been the subject of ongoing debate.

One way of classifying algorithms is by their design methodology or paradigm. There is a certain number of paradigms, each different from the other. Furthermore, each of these categories will include many different types of algorithm. Some commonly found paradigms include:

  • The greedy method. A greedy algorithm works by making a series of simple decisions that are never reconsidered.
  • Divide and conquer. A divide-and-conquer algorithm reduces an instance of a problem to one or more smaller instances of the same problem (usually recursively), until the instances are small enough to be directly expressible in the programming language employed (what is 'direct' is often discretionary).
  • Dynamic programming. A dynamic programming algorithm works bottom-up by building progressively larger solutions to subproblems arising from the original problem, and then uses those solutions to obtain the final result.
  • Search and enumeration. Many problems (such as playing chess) can be modeled as problems on graphs. A graph exploration algorithm specifies rules for moving around a graph and is useful for such problems. This category also includes the search algorithms and backtracking.
  • The probabilistic and heuristic paradigm. Algorithms belonging to this class fit the definition of an algorithm more loosely. Probabilistic algorithms are those that make some choices randomly (or pseudo-randomly). Genetic algorithms attempt to find solutions to problems by mimicking biological evolutionary processes, with a cycle of random mutations yielding successive generations of 'solutions'. Thus, they emulate reproduction and "survival of the fittest". In genetic programming, this approach is extended to algorithms, by regarding the algorithm itself as a 'solution' to a problem. Also there are heuristic algorithms, whose general purpose is not to find a final solution, but an approximate solution where the time or resources to find a perfect solution are not practical. An example of this would be simulated annealing algorithms, a class of heuristic probabilistic algorithms that vary the solution of a problem a by random amount. The name 'simulated annealing' alludes to the metallurgic term meaning the heating and cooling of metal to achieve freedom from defects. The purpose of the random variance is to find close to globally optimal solutions rather than simply locally optimal ones, the idea being that the random element will be decreased as the algorithm settles down to a solution.

Another way to classify algorithms is by implementation. A recursive algorithm is one that invokes (makes reference to) itself repeatedly until a certain condition matches, which is a method common to functional programming. Algorithms are usually discussed with the assumption that computers execute each instruction of an algorithm at a time. Those computers are sometimes called serial computers. An algorithm designed for such an environment is called a serial algorithm, as opposed to parallel algorithms, which take advantage of computer architectures where several processors can work on a problem at the same time. The various heuristic algorithm would probably also fall into this category, as their name (eg. a genetic algorithm) describes its implementation.

A list of algorithms discussed in Wikipedia is available.

See also

References


Source | Copyright


Webmasters: Add your website here:

Readers: Edit | Discuss Listings

Hitch-Hiker's Guide to Evolutionary Computation
Comprehensive FAQ for comp.ai.genetic. An unconventional and often witty introductory compendium. ASCII text only.
http://www.cs.cmu.edu/Groups/AI/html/faqs/ai/genetic/top.html

Genetic Algorithms Archive
Archives of GA-List, the genetic algorithms mailing list. Hosted at the Navy Center for Applied Research in Artificial Intelligence.
http://www.aic.nrl.navy.mil/galist/

Genetic Algorithm Experiment
This Java applet demonstrates a continuous value genetic algorithm on a variety of problem spaces with a variety of reproduction methods.
http://www.oursland.net/projects/PopulationExperiment/

PPSN VI
Sixth International Conference on Parallel Problem Solving from Nature (2000), September 16-20: Paris, France.
http://www-rocq.inria.fr/fractales/PPSN2000/index.html

PC AI Genetic Algorithms
Contains links to genetic algorithms information on the Internet along with vendors and references. Published by PC AI magazine.
http://www.pcai.com/web/ai_info/genetic_algorithms.html

Open BEAGLE
Open BEAGLE is an Evolutionary Computation (EC) framework entirely coded in C++. It provides a software environment to do any kind of EC.
http://www.gel.ulaval.ca/~beagle/

GA-Walk!
A Java software system for evolving walking techniques in artificial skeletons using genetic algorithms.
http://www.gawalk.com/

Genewood
Information on genetic algorithms, fuzzy logic, and artificial intelligence featuring downloadable applications, source code, and links.
http://www.genewood.host.sk/

The Biological Concept of Neoteny in Evolutionary Colour Segmentation
Genetic Algorithm to simulate neoteny, the retention by an organism of juvenile or even larval traits into later life.
http://alfa.ist.utl.pt/~cvrm/staff/vramos/ref_35.html

Genetic Daemon
An open source genetic engine server, capable to run any kind of genetic algorithm. It has TCP architetcure, working with software clients and human interaction.
http://sourceforge.net/projects/geneticd/

International Society for Adaptive Behavior
ISAB is an international scientific society devoted to education and furthering research on adaptive behavior in animals, animats, software agents, and robots.
http://www.isab.org/

Project Jeep
Jeep is a modular, abstract and distributed evolutionary programming core written in Java (open source), allowing to grow autonomous agents as well a gene pool (as in genetic algorithms).
http://sourceforge.net/projects/jeepproject/

Musical Composition with Genetic Algorithms
Graduate research project of Joy Schoenberger at the College of William and Mary. It attempts to use genetic algorithms for musical composition, with coherency through genotype.
http://www.davidschoenberger.net/joy/research.html

Genetic Java
A simple genetic algorithms applet with instructions and some sample problems.
http://www4.ncsu.edu/eos/users/d/dhloughl/public/stable.htm

Introduction to Genetic Algorithms with Java
Introductory pages with interactive Java applets, useful tips for your own genetic algorithm
http://cs.felk.cvut.cz/~xobitko/ga/

GA Playground
A general GA toolkit implemented in Java, for experimenting with genetic algorithms and handling optimization problems. Source code is available.
http://www.aridolan.com/ga/gaa/gaa.html

IlliGAL
Illinois Genetic Algorithms Laboratory at the University of Illinois at Urbana-Champaign. Contains a large collection of technical reports and software.
http://www-illigal.ge.uiuc.edu/

Bibliography on Genetic Algrorithms
Genetic algorithm citations starting with ICGA and FOGA. Part of the Computer Science Bibliography Collection at the Universitat Karlsruhe in Germany.
http://liinwww.ira.uka.de/bibliography/Ai/genetic.algorithms.html

GAlib
A C++ library of genetic algorithm components. The library includes tools for using genetic algorithms to do optimization in any C++ program using any representation and genetic operators.
http://lancet.mit.edu/ga/

Genetic Pattern Finder
Uses genetic algorithms to detect the best trading patterns and will adapt to any financial data. The trading signales generated are statistically validated and can be easily exported.
http://www.foretrade.com/gpf.htm

NeuroDimension Inc: Genetic Algorithm Software
Use NeuroDimension's Genetic Server or Genetic Library products to embed genetic algorithms into your own VB/C++ application.
http://www.nd.com

Genetic and Evolutionary Algorithm Toolbox
GEATbx is a comprehensive implementation of evolutionary algorithms in Matlab. A broad range of operators is fully integrated into one environment.
http://www.geatbx.com/

Crystal Ball Pro
A global optimization and risk analysis software tool. Uses a unique combination of genetic algorithms and neural networks.
http://www.cbpro.com

Genetics-Based Machine Learning
Generalization, scheduling and performance evaluation from the Teacher Research Group.
http://manip.crhc.uiuc.edu/research.html

SPHINcsX
"Zeroth-Order Shape Optimization Utilizing a Learning Classifier System" Web-based textbook.
http://www.stanford.edu/~buc/SPHINcsX/book.html

Genetic Algorithms for Squeak
This GA framework in Squeak implements the operation of selection, mutation and crossing-over with visualization features.
http://www.consultar.com/Squeak/GA/

Evolutionary Design of Neural Architectures
Information, bibliography and resources on evolutionary synthesis of neuromorphic systems. Maintained by the Artificial Intelligence Research Group at Iowa State University.
http://www.cs.iastate.edu/~gannadm/

Hellenic Complex Systems Laboratory
An independent, nonprofit research laboratory involved in the transdisciplinary study of complex systems. Invented the GA-based design of statistical quality control.
http://www.hcsl.com

Netadelica Genetic Algorithms
A brief experiment in coding a simple genetic algorithm 'bit counter' that compares different evolution parameters.
http://www.netadelica.com/ga/

Cell Matrix Corporation
Publications describe an application of their computer architecture to genetic algorithms. Software includes an online circut simulator.
http://www.cellmatrix.com/entryway/entryway/core.html

Lithos Evolutionary Computation
An evolutionary computation system using a stack-based virtual machine. Source code available.
http://www.esatclear.ie/~rwallace/lithos.html

Introduction to Genetic Algorithms
An introductory explanation of genetic algorithms available in HTML and PDF formats. The Genetic Algorithm Viewer Java applet shows the functioning of a genetic algorithm.
http://www.rennard.org/alife/english/gavintrgb.html

rEvolutionaryEngineering
Researches and develops applications using evolutionary algorithms and genetic algorithms for finance and engineering.
http://www.revolutionaryengineering.com/

GA-search
An advanced dedicated genetic algorithms search engine. The "Spider" indexes only GA related sites.
http://www.optiwater.com/GAsearch/

optiGA
An ActiveX control for Genetic Algorithms written in Visual Basic. Provides a generic control that will perform the genetic run for any optimization problem.
http://www.optiwater.com/optiga.html

Papers by Lee Altenberg On-Line
Research publications in mathematical population genetics, evolutionary computation, and genetic algorithms.
http://dynamics.org/~altenber/PAPERS/

GECCO 2001
Genetic and Evolutionary Computation Conference 2001, July 7-11: Holiday Inn in San Francisco, California.
http://www.isgec.org/GECCO-2001



Help build the largest human-edited directory on the web.
 Submit a Site - Open Directory Project (modified) - Become an Editor

Modified contents copyright 2008. All rights reserved.