Utils
Encoding
Bases: ABC
Source code in metazoo/src/metazoo/bio/utils.py
7 8 9 10 11 12 13 14 | |
Binary
Bases: Encoding
Solves real-valued problems using binary encoding. Each variable is represented by a fixed number of bits, determined by the desired precision and the variable bounds.
Source code in metazoo/src/metazoo/bio/utils.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
decode(individual)
Decodes a binary individual into its real-valued representation.
Source code in metazoo/src/metazoo/bio/utils.py
48 49 50 51 52 53 54 55 56 57 58 59 60 | |
Real
Bases: Encoding
Solves real-valued problems using real encoding. Each variable is represented directly by a real number within the specified bounds.
Source code in metazoo/src/metazoo/bio/utils.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
Permutation
Bases: Encoding
Solves combinatorial problems using permutation encoding. Each individual is represented as a permutation of integers from 0 to n-1, where n is the size of the permutation.
Source code in metazoo/src/metazoo/bio/utils.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
Population
Source code in metazoo/src/metazoo/bio/utils.py
113 114 115 116 117 | |