ordering in html

This commit is contained in:
Ashley Bao 2023-01-20 15:01:15 -05:00
parent af0e04a639
commit 82a2eec301
4 changed files with 8 additions and 14 deletions

View File

@ -7,7 +7,7 @@
<li>Go to <code>propeller.variation.cljc</code></li>
<li>Define a genetic operator function</li>
<li>In <code>propeller.variation/new-individual</code>, add the new genetic operator in the <code>new-individual</code> function under the <code>case</code> call</li>
</ol>
<pre><code class="language-clojure">(defn new-individual
"Returns a new individual produced by selection and variation of
individuals in the population."
@ -25,7 +25,7 @@
:cljs (js/Error
(str "No match in new-individual for " op))))))})
</code></pre>
<ol>
<li>When running a problem, specify the genetic operator in <code>:variation</code>. For example:</li>
</ol>
<pre><code>lein run -m propeller.problems.simple-regression :variation "{:new-genetic-operator 1.0}"
@ -36,7 +36,7 @@
<li>Go to <code>propeller.selection.cljc</code></li>
<li>Define a genetic operator function</li>
<li>In <code>propeller.selection.cljc</code>, add the new genetic operator in the <code>select-parent</code> function under the <code>case</code> call.</li>
</ol>
<pre><code class="language-clojure">(defn select-parent
"Selects a parent from the population using the specified method."
[pop argmap]
@ -46,7 +46,7 @@
...
))
</code></pre>
<ol>
<li>When running a problem, specify the selection method in <code>:parent-selection</code></li>
</ol>
<p>For example:</p>

View File

@ -4,7 +4,7 @@
<p>In general, a problem file has 3 components: <code>train-and-test-data</code>, <code>instructions</code>, <code>error-function</code>, and <code>-main</code>.</p>
<ol>
<li>To add a new problem, you need training and test data. For Problem Synthesis Benchmark Problems (PSB2), you can fetch datasets using <code>psb2.core/fetch-examples</code>.</li>
</ol>
<pre><code class="language-clojure">(defn fetch-examples
"Fetches and returns training and test data from a PSB2 problem.
Returns a map of the form {:train training-examples :test testing-examples}
@ -23,7 +23,7 @@
[datasets-directory problem-name n-train n-test]
</code></pre>
<ol>
<li>Define the possible Push instructions to be used to create plushys. It should be a non-lazy list of instructions from <code>push/instructions</code></li>
<li>Define an error function that will evaluate plushys and add <code>:behaviors parsed-outputs</code>, <code>:errors</code>, and <code>:total-error</code> to the individual</li>
<li>Define the function <code>-main</code> with a map of default arguments.</li>

View File

@ -4,14 +4,14 @@
<ol>
<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>
</ol>
<pre><code class="language-clojure"> (defn select-parent
"Selects a parent from the population using the specified method."
[pop argmap]
(case (:parent-selection argmap)
:new-selection-method (new-selection-method )))
</code></pre>
<ol>
<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>

File diff suppressed because one or more lines are too long