⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 environment.htm

📁 遗传算法GPE_release_v1.0.tar
💻 HTM
📖 第 1 页 / 共 2 页
字号:
			</table>
		</div>
		<p class="MsoNormal" align="left">
		<span style="font-family: Arial; font-weight: normal">The next method 
		returns the IHistory for the last test of the individual in this 
		 
		</span><span style="font-family:Arial">IEnvironment</span><span style="font-family: Arial; font-weight: normal">or <i>null </i>if tests have not yet been run.&nbsp;</span></p>
		<div align="center">
			<table border="0" width="90%" id="table9">
				<tr>
					<td>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<span style="font-size: 10.0pt; font-family: Courier New">
					public</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					IHistory History {</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<font size="2"><span style="font-family: Courier New">&nbsp;&nbsp;&nbsp;
					</span></font>
					<span style="font-size: 10.0pt; font-family: Courier New">
					get</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					{</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<font size="2"><span style="font-family: Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					</span></font>
					<span style="font-size: 10.0pt; font-family: Courier New">
					return</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					m_AntHistory;</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<font size="2"><span style="font-family: Courier New">&nbsp;&nbsp;&nbsp;
					</span></font>
					<span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">
					}</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">
					}</span></p>
					<p class="MsoNormal" style="text-autospace: none" align="left">
					<span style="font-size: 10.0pt; font-family: Courier New">
					private</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					AntHistory m_AntHistory;</span></td>
				</tr>
			</table>
		</div>
		<h4 align="left"><span style="font-family: Arial; font-weight: normal">
		Next, any problem-specific methods are defined.&nbsp; The artificial ant, for 
		example, has a method to limit the number of steps the ant can take.&nbsp; 
		This is one way to determine if the ant is finished being tested.&nbsp;This ensures that the ant does not wind up in an 
		infinite loop.</span></h4>
		<div align="center">
			<table border="0" width="90%" id="table10">
				<tr>
					<td>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<span style="font-size: 10.0pt; font-family: Courier New">
					public</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					int StepLimit {</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<font size="2"><span style="font-family: Courier New">&nbsp;&nbsp;&nbsp;
					</span></font>
					<span style="font-size: 10.0pt; font-family: Courier New">
					get</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					{</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<font size="2"><span style="font-family: Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					</span></font>
					<span style="font-size: 10.0pt; font-family: Courier New">
					return</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					m_StepLimit;</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<font size="2"><span style="font-family: Courier New">&nbsp;&nbsp;&nbsp;
					</span></font>
					<span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">
					}</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">
					}</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">&nbsp;</p>
					<h4 align="left" style="margin-top: 0; margin-bottom: 0">
					<span style="font-size: 10.0pt; font-family: Courier New; font-weight: normal">
					private int m_StepLimit = 500;</span></h4>
					</td>
				</tr>
			</table>
		</div>
		<h4 align="left" style="margin-top: 0; margin-bottom: 0">&nbsp;</h4>
		<h4 align="left" style="margin-top: 0; margin-bottom: 0">
		<span style="font-family: Arial; font-weight: normal">Another possible 
        way for the ant to finish testing is to have collected all of the 
        available in the environment.&nbsp; This is another problem specific 
        method that tells the engine the ant is done being tested.&nbsp; </span></h4>
		<p align="left" style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
		<div align="center">
			<table border="0" width="90%" id="table11">
				<tr>
					<td>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<span style="font-size: 10.0pt; font-family: Courier New">
					public</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					bool AllFoodCollected {</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<font size="2"><span style="font-family: Courier New">&nbsp;&nbsp;&nbsp;
					</span></font>
					<span style="font-size: 10.0pt; font-family: Courier New">
					get</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					{</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<font size="2"><span style="font-family: Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					</span></font>
					<span style="font-size: 10.0pt; font-family: Courier New">
					return</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					m_AntHistory.FoodFound == m_FoodCount;</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<font size="2"><span style="font-family: Courier New">&nbsp;&nbsp;&nbsp;
					</span></font>
					<span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">
					}</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">
					}</span></td>
				</tr>
			</table>
		</div>
		<h4 align="left"><span style="font-family: Arial; font-weight: normal">
		Next, problem specific local variables are defined.&nbsp; For example, 
		m_FoodCount tracks how many pieces of food an ant has collected in an 
		</span><span style="font-family:Arial; font-weight:400">IEnvironment</span><span style="font-family: Arial; font-weight: normal">.&nbsp; m_Grid specifies 
		the XML grid for the individual ant&nbsp; m_HisotryGrid is a clone of 
        the grid which will be shared by the histories of all IIndividuals.</span></h4>
		<div align="center">
			<table border="0" width="90%" id="table12">
				<tr>
					<td>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<span style="font-size: 10.0pt; font-family: Courier New">
					private</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					int m_FoodCount;</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<span style="font-size: 10.0pt; font-family: Courier New">
					private</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					string m_Name;</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<span style="font-size: 10.0pt; font-family: Courier New">
					private</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					Grid m_Grid;</span></p>
					<p class="MsoNormal" style="text-autospace: none; margin-top: 0; margin-bottom: 0" align="left">
					<span style="font-size: 10.0pt; font-family: Courier New">
					private</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> 
					Grid m_HistoryGrid;</span></td>
				</tr>
			</table>
		</div>
		<h4 align="left"><span style="font-family: Arial; font-weight: normal">
		Next, the environment is initialized.&nbsp; The </span>
        <span style="font-family: Arial; font-weight: 400">
		IEnvironment </span><span style="font-family: Arial; font-weight: normal">
		is initialized 
		with the file specified by the InitializationFile parameter.&nbsp; This 
        met</span><span style="font-family: Arial; font-weight: 400">hod verifies the 
		IEnvironment file. Initialize 
		also sets IEnvironment variables to default values.&nbsp; For example, the 
		initialize method sets </span><span style="font-family: Arial; font-weight: normal">m_FoodCount to 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -