📄 gettingstarted.htm
字号:
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Genetic Programming FAQ</title>
</head>
<body>
<div id="nsbanner">
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td>
<div id="bannerrow1">
<table class="bannerparthead" cellSpacing="0">
<tr id="hdr">
<td class="runninghead" style="font-size: 70%">
<font face="Arial"><a class="show" id="design_toggle" title="Show or hide design notes" href="index.html"><img src="Images/Icons/G.png" width="14" height="14" border="0" align="middle"/></a> Genetic Programming Engine FAQ</font></td>
</tr>
</table>
</div>
<div id="TitleRow">
<h1 class="dtH1" style="font-size: 85%; left: 5px; position: relative">
<font face="Arial">Getting Started with Genetic Programming (GP)</font></h1>
</div>
</td>
<td vAlign="top" align="right">
<font face="Arial">
<img src="Images/Icons/GP_blue.png" width="191" height="39"></font></td>
</tr>
</table>
</div>
<div id="nstext">
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Arial">
<a href="Glossary.GeneticProgramming.html">Genetic
Programming</a> (GP) is a subset of
<a href="Glossary.EvolutionaryAlgorithms.html">evolutionary programming</a>. GP mimics
strategies based on evolution - namely natural
<a href="Glossary.GeneticOperations.selection.html">selection</a> and
<a href="Glossary.GeneticOperations.mutation.html">mutation</a>. GP can
be used to find solutions to a wide range of problems from the Travelling
Salesman Problem to the Artificial Ant Problem. The central method for
problem solving with GP remains basically the same for different types of
problems. </span></p>
<p class="MsoNormal"><span style="font-family: Arial" lang="en-gb">A Genetic
Programming Engine (<b>GPE</b></span><b><span style="font-family: Arial">ngine</span></b><span style="font-family: Arial" lang="en-gb">) uses an evolutionary algorithm to optimize a
</span><span style="font-family: Arial; font-weight:700">
<a href="Glossary.Objects.Population.html">Population</a></span><span style="font-family: Arial" lang="en-gb"> of </span>
<span style="font-family: Arial"><a href="Glossary.Objects.Individual.html">
individual</a> </span><span style="font-family: Arial" lang="en-gb">computer programs (</span><span style="font-family: Arial; font-weight:700">IIndividuals</span><span style="font-family: Arial" lang="en-gb">) according to
<a href="Glossary.Properties.fitness.html">fitness</a>
specifications determined by a program's ability to perform a given task.
</span><span lang="EN-GB" style="font-family:Arial">First, a
</span><span style="font-family:Arial">random Population</span><span lang="EN-GB" style="font-family:Arial"> of </span>
<span style="font-family:Arial">II</span><span lang="EN-GB" style="font-family:Arial">individuals
is created from the </span><span style="font-family:Arial">II</span><span lang="EN-GB" style="font-family:Arial">individual</span><span style="font-family:Arial">
<i>Base</i></span><i><span lang="EN-GB" style="font-family:Arial"> </span>
<span style="font-family:Arial">C</span><span lang="EN-GB" style="font-family:Arial">lass</span></i><span lang="EN-GB" style="font-family:Arial">,
a possible solution to the problem. Next, the </span>
<span style="font-family:Arial">engine is <a href="Glossary.Actions.run.html">
ran</a> and II</span><span lang="EN-GB" style="font-family:Arial">individuals
are </span><span style="font-family:Arial">
<a href="Glossary.Actions.test.html">tested</a></span><span lang="EN-GB" style="font-family:Arial"> in an </span>
<span style="font-family:Arial"><a href="Glossary.Objects.Environment.html">
environment</a> (see also </span><span style="font-family:Arial; font-weight:700">
IEnvironment</span><span style="font-family:Arial">)</span><span lang="EN-GB" style="font-family:Arial"> and the
fitness of each individual is measured. </span>
<span style="font-family:Arial">The <a href="Glossary.Objects.History.html">
history</a> of each individual is stored in the <b>IGraphicHistory</b> which
allows the individual's actions within a population to be replayed. </span>
<span lang="EN-GB" style="font-family:Arial">The fittest solutions, as
defined in the problem, are selected and then
<a href="Glossary.GeneticOperations.recombination.html">recombined</a> with each other
and/or <a href="Glossary.GeneticOperations.mutation.html">mutated</a> to form the next
<a href="Glossary.Objects.Generation.html">generation</a> of </span>
<span style="font-family:Arial">IIndividuals</span><span lang="EN-GB" style="font-family:Arial">.
The process is then repeated until the user-defined number of iterations is
reached or a solution is found.</span></p>
<h4 class="dtH4" style="margin-top: 0; margin-bottom: 0"><font face="Arial"><span style="font-weight: 400">This FAQ
uses the Artificial Ant as an example of problem solving with GP. This
problem deals with finding the shortest path an Ant can travel to get the
maximum amount of food - that is maximizing fitness. The food particles are placed on an NxN grid
and the Ant is made to start from a particular corner gathering as much food
as possible and traveling the least distance possible. The ants
performing this task have only a limited number of actions available to them.
They can turn left or right, move forward, and check for food in the square
they are facing. The basic ants cannot see the gaps. The first
generation of ants is created randomly and usually exhibits poor performance.
Each succeeding generation is built from the best ants found in the previous
generation and, as new combinations of actions are found, the overall fitness
of the population tends to improve. However, <em>Genetic Programming</em> is
based in randomness and probability, so there are no guarantees that a
solution will be found in any given run. With each successive run, though, the
probability of success increases. Microsoft Visual C#
.NET is the language used for development of the GPEngine and examples.</span></font></h4>
<h4 class="dtH4"><font face="Arial">See Also</font></h4>
<p align="left">
<font face="Arial"><a href="EngineGUI.htm">Getting Started with the Engine GUI</a> | <a href="GeneticProgrammingEngine/GPE.htm">GPEngine</a> | <a href="GeneticProgrammingEngine/ProblemSpace/Environment.htm">IEnvironment</a>
| <a href="GeneticProgrammingEngine/ProblemSpace/History.htm">IGraphicHistory</a>
| <a href="GeneticProgrammingEngine/ProblemSpace/Individual.htm">IIndividual</a> |
<a href="GeneticProgrammingEngine/Internal/Population.htm">Population</a></font></p>
<hr>
<div id="footer">
<font face="Arial">
<a href="http://www.opensource.org/" target="_top">
<img style="padding-bottom: 5px" src="http://opensource.org/trademarks/open_source_button.png" align="left" border="0"></a>
This software licensed under the
<a href="http://opensource.org/licenses/afl-2.1.php" target="_top">Academic
Free License version 2.1</a>. (<a href="afl-2.1.txt">Plain
text</a>)</font></div>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -