Difference between revisions of "Weasel Program"
(17 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | < | + | <center>H. Kemal Ilter<br>Jun 26, 2015</center> |
− | + | ||
− | + | ||
− | + | ''[[wikipedia:Weasel program|Weasel program]]'' is a good point to start thinking about behavioural evolution of manufacturing companies. Let say -hypothetically- we have a company which is producing some products with a set of tools (i.e. best practices). This toolset includes limited number of tools (say genomes) and called ''genetic combination''. Accordingly, this company is being exist in a limited business environment. The business environment has a limited set of environmental factors (e.g. common industrial best practices' requirements), called ''environmental set''. In each step, the company evolves and try to adapt to the environment. As a beginning, we can imagine that the environment can be in one of two different state in the proposed model of simulation; '''(1)''' Environmental set is not changing, it is in a steady state; '''(2)''' Environmental set is changing randomly in each step, it is in a transient period. I am going to call these two situations as scenarios. | |
− | + | ||
− | + | === Scenarios === | |
− | + | ||
− | + | # Environmental set is fixed. | |
− | + | <!-- # Environment is changing up to the point which represents the genetic combination is equal to the environment set. --> | |
− | + | # Environmental set is changing over time regardless of the change of the genetic combination. (not shown here) | |
− | + | ||
− | + | === Algorithm === | |
− | + | ||
− | + | A "Weasel" style algorithm could run as follows. | |
− | </ | + | |
+ | # Start with a random string of ''4'' characters. Each character is a member of ''{A, B, ..., C}''. | ||
+ | # Make ''2'' copies of the string (reproduce). | ||
+ | # For each character in each of the ''2'' copies, with a probability of ''5%'', replace (mutate) the character with a new random character. | ||
+ | # Compare each new string with the target string of the ''Environmental Set'', and give each a score (the number of letters in the string that are correct and in the correct position). | ||
+ | # If any of the new strings has a perfect score (''4''), halt. Otherwise, take the highest scoring string, and go to step '''2'''. | ||
+ | |||
+ | <small> | ||
+ | {| class="" width="100%" style="text-align: center" | ||
+ | |+ Scenario 1 | ||
+ | |- | ||
+ | ! colspan="7" | GC¹ | ||
+ | ! E² | ||
+ | |- | ||
+ | ! width="10%" | Step | ||
+ | ! width="12%" | 1. Child | ||
+ | ! width="12%" | 1. Mutant³ | ||
+ | ! width="12%" | 1. Score | ||
+ | ! width="12%" | 2. Child | ||
+ | ! width="12%" | 2. Mutant | ||
+ | ! width="12%" | 2. Score | ||
+ | ! width="16%" | Reference set | ||
+ | |- | ||
+ | | 0 | ||
+ | | ABCD | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | ZZZZ | ||
+ | |- | ||
+ | | 1 | ||
+ | | ABCD | ||
+ | | CZTU | ||
+ | | 1 | ||
+ | | ABCD | ||
+ | | KLOP | ||
+ | | 0 | ||
+ | | ZZZZ | ||
+ | |- | ||
+ | | 2 | ||
+ | | CZTU | ||
+ | | LZFG | ||
+ | | 1 | ||
+ | | CZTU | ||
+ | | AWZZ | ||
+ | | 2 | ||
+ | | ZZZZ | ||
+ | |- | ||
+ | | . | ||
+ | | . | ||
+ | | . | ||
+ | | . | ||
+ | | . | ||
+ | | . | ||
+ | | . | ||
+ | | . | ||
+ | |- | ||
+ | | . | ||
+ | | . | ||
+ | | . | ||
+ | | . | ||
+ | | . | ||
+ | | . | ||
+ | | . | ||
+ | | . | ||
+ | |- | ||
+ | | 119 | ||
+ | | PKTL | ||
+ | | ZZZZ | ||
+ | | 4 | ||
+ | | PKTL | ||
+ | | ZZJZ | ||
+ | | 3 | ||
+ | | ZZZZ | ||
+ | |- | ||
+ | | 120 | ||
+ | | ZZZZ | ||
+ | | | ||
+ | | 4 | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | ZZZZ | ||
+ | |} | ||
+ | </small> | ||
+ | ¹ <small>Genetic combination of the company.</small> ² <small>Environmental set.</small> ³ <small>Mutant: Mutated child.</small> | ||
+ | |||
+ | === Further Readings === | ||
+ | |||
+ | * Variation (Genetic diversity) = Mutation + Sex and Recombination + Gene flow | ||
+ | * Mechanisms = Natural selection + Biased mutation + Genetic drift + Genetic hitchhiking + Gene flow | ||
+ | * Outcomes = Adaptation + Coevolution + Cooperation + Speciation + Extinction | ||
+ | |||
+ | === Python Code === | ||
+ | |||
+ | <gisthub gist="541ffc77c8205d4f59f2"/> | ||
+ | |||
+ | [[Category:Blog]] | ||
+ | [[Category:Research]] |
Weasel program is a good point to start thinking about behavioural evolution of manufacturing companies. Let say -hypothetically- we have a company which is producing some products with a set of tools (i.e. best practices). This toolset includes limited number of tools (say genomes) and called genetic combination. Accordingly, this company is being exist in a limited business environment. The business environment has a limited set of environmental factors (e.g. common industrial best practices' requirements), called environmental set. In each step, the company evolves and try to adapt to the environment. As a beginning, we can imagine that the environment can be in one of two different state in the proposed model of simulation; (1) Environmental set is not changing, it is in a steady state; (2) Environmental set is changing randomly in each step, it is in a transient period. I am going to call these two situations as scenarios.
A "Weasel" style algorithm could run as follows.
GC¹ | E² | ||||||
---|---|---|---|---|---|---|---|
Step | 1. Child | 1. Mutant³ | 1. Score | 2. Child | 2. Mutant | 2. Score | Reference set |
0 | ABCD | ZZZZ | |||||
1 | ABCD | CZTU | 1 | ABCD | KLOP | 0 | ZZZZ |
2 | CZTU | LZFG | 1 | CZTU | AWZZ | 2 | ZZZZ |
. | . | . | . | . | . | . | . |
. | . | . | . | . | . | . | . |
119 | PKTL | ZZZZ | 4 | PKTL | ZZJZ | 3 | ZZZZ |
120 | ZZZZ | 4 | ZZZZ |
¹ Genetic combination of the company. ² Environmental set. ³ Mutant: Mutated child.
hkilter.com by H. K. Ilter is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
© 2020 H. K. Ilter