Update Adding_Selection_Method.html

This commit is contained in:
Ashley Bao 2023-01-18 17:17:05 -05:00
parent e1379eb6e3
commit 62f64dee66

View File

@ -4,19 +4,17 @@
<ol> <ol>
<li>Define a selection method function in <code>propeller.selection</code> that selects an individual from the population</li> <li>Define a selection method function in <code>propeller.selection</code> that selects an individual from the population</li>
<li>Add the selection method in <code>propeller.selection/select-parent</code> under the <code>case</code> call:</li> <li>Add the selection method in <code>propeller.selection/select-parent</code> under the <code>case</code> call:</li>
</ol>
<pre><code class="language-clojure"> (defn select-parent <pre><code class="language-clojure"> (defn select-parent
"Selects a parent from the population using the specified method." "Selects a parent from the population using the specified method."
[pop argmap] [pop argmap]
(case (:parent-selection argmap) (case (:parent-selection argmap)
:new-selection-method (new-selection-method ))) :new-selection-method (new-selection-method )))
```
3. When runnning a problem, specify the selection method in `:parent-selection`.
For example:
```
lein run -m propeller.problems.simple-regression :parent-selection :new-selection-method"
```
</code></pre> </code></pre>
<li>When runnning a problem, specify the selection method in <code>:parent-selection</code>. For example:
<pre><code>lein run -m propeller.problems.simple-regression :parent-selection :new-selection-method"
</code></pre>
</li>
</ol>
</div></div></div></body></html> </div></div></div></body></html>