📄 translate.htm
字号:
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.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">How to Translate a Problem to Computer Code</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">
<h4 class="dtH4"><font face="Arial"><span style="font-weight: 400">Before
solving a problem with the Genetic Programming Engine, it is necessary to
convert the problem into a language understood by the computer. The
first step requires analyzing the problem and specifying what the solution
must do. In the Artificial Ant example, the solution must find the
path that minimizes distance traveled while maximizing the amount of food
collected. In problem analysis, program inputs, outputs, and processes
are identified. In the case of the Artificial Ant, the environment
(grid containing food) and the individual Ant are inputs. The
processes are what the program does to find a solution to a problem.
Which, in this case, would be moving the Ant around its environment,
collecting food, and determining the optimal path. The output would be
the path that the Ant took. The specifications should be written out
in short, concise statements to ensure that the problem is fully understood.</span></font></h4>
<p class="dtH4"><font face="Arial">The next step is to design the solution
algorithm, or a sequence of steps that solves the problem. In the
Artificial Ant example, this entails five basic procedures: move forward,
turn left, turn right, increment the number of steps taken, and determine if
food is in front of the Ant. (see also <u>how fitness is
maximized by the GPE</u> & <u>how the GPE knows when to stop</u>) With
these five procedures, it is possible for an Ant to traverse a grid and
collect food. The algorithm specifies things like control processes
(loops, decisions, etc), data structures and variables, and mathematical and
logical computations (such as addition, Boolean conditions, and equality).
</font></p>
<p class="dtH4"><font face="Arial">Once the algorithm is devised, the next
step is to test it. Testing the algorithm can be accomplished by
tracing through the statements to ensure the desired output is produced.
Once the algorithm is verified, it can be written (coded) in a
computer language (such as C#). Syntax is language specific, but if
the algorithm is correct, it is only a matter of "translating" languages.
Once the problem is coded into a computer language, it needs to be tested
again to ensure the desired results are obtained.</font></p>
<h4 class="dtH4"><font face="Arial">See Also</font></h4>
<p>
<font face="Arial">IIndividual Interface |
GeneticProgrammingEngine.ProblemSpace Namespace |
IBaseClassVerifier Interface |
IndividualInfo Class</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 + -