update meta data
This commit is contained in:
parent
f3a896c724
commit
90e15ed6ce
3307 changed files with 1674 additions and 7 deletions
13
Task/Evolutionary-algorithm/00DESCRIPTION
Normal file
13
Task/Evolutionary-algorithm/00DESCRIPTION
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Starting with:
|
||||
* The <code>target</code> string: <code>"METHINKS IT IS LIKE A WEASEL"</code>.
|
||||
* An array of random characters chosen from the set of upper-case letters together with the space, and of the same length as the target string. (Call it the <code>parent</code>).
|
||||
* A <code>fitness</code> function that computes the ‘closeness’ of its argument to the target string.
|
||||
* A <code>mutate</code> function that given a string and a mutation rate returns a copy of the string, with some characters probably mutated.
|
||||
* While the <code>parent</code> is not yet the <code>target</code>:
|
||||
:* copy the <code>parent</code> C times, each time allowing some random probability that another character might be substituted using <code>mutate</code>.
|
||||
:* Assess the <code>fitness</code> of the parent and all the copies to the <code>target</code> and make the most fit string the new <code>parent</code>, discarding the others.
|
||||
:* repeat until the parent converges, (hopefully), to the target.
|
||||
|
||||
Cf: [[wp:Weasel_program#Weasel_algorithm|Weasel algorithm]] and [[wp:Evolutionary algorithm|Evolutionary algorithm]]
|
||||
|
||||
<small>Note: to aid comparison, try and ensure the variables and functions mentioned in the task description appear in solutions</small>
|
||||
Loading…
Add table
Add a link
Reference in a new issue