@@ -45,10 +45,10 @@ Certain `Genes` have additional functionality that allows them to be manipulated
4545
4646 # Create a float gene that can evolve between -1.0 and 1.0 but
4747 # must stay within -10.0 to 10.0 during evolution
48- gene = rd.FloatGene (
48+ gene = rd.gene.float (
4949 allele=0.5, # Current value
50- value_range =(-1.0, 1.0), # Initial range
51- bound_range =(-10.0, 10.0) # Evolution bounds
50+ init_range =(-1.0, 1.0), # Initial range
51+ bounds =(-10.0, 10.0) # Evolution bounds
5252 )
5353 ```
5454
@@ -83,10 +83,10 @@ Certain `Genes` have additional functionality that allows them to be manipulated
8383 import radiate as rd
8484
8585 # Create an integer gene that can evolve between -100 and 100
86- gene = rd.IntGene (
86+ gene = rd.gene.int (
8787 allele=42, # Current value
88- value_range =(-10, 10), # Initial range
89- bound_range =(-100, 100) # Evolution bounds
88+ init_range =(-10, 10), # Initial range
89+ bounds =(-100, 100) # Evolution bounds
9090 )
9191 ```
9292
@@ -119,7 +119,7 @@ Certain `Genes` have additional functionality that allows them to be manipulated
119119
120120 # Create an bit gene with an allele of True - if the allele isn't specified, it will
121121 # be randomly initialized to True or False
122- gene = rd.BitGene (allele=True)
122+ gene = rd.gene.bit (allele=True)
123123 ```
124124
125125 === ":fontawesome-brands-rust: Rust"
@@ -144,10 +144,10 @@ Certain `Genes` have additional functionality that allows them to be manipulated
144144 import radiate as rd
145145
146146 # Create a character gene with an allele of 'A'
147- gene = rd.CharGene (allele='A')
147+ gene = rd.gene.char (allele='A')
148148
149149 # Create a character gene with a randomly generated allele from the set 'abc'
150- gene = rd.CharGene (char_set='abc')
150+ gene = rd.gene.char (char_set='abc')
151151 ```
152152
153153 === ":fontawesome-brands-rust: Rust"
@@ -214,10 +214,10 @@ Because each `Chromosome` has an associated `Gene`, the built int chromosomes ar
214214 import radiate as rd
215215
216216 # Create a float chromosome with 5 genes, each initialized to a random value between -1.0 and 1.0
217- chromosome = rd.Chromosome .float(
217+ chromosome = rd.chromosome .float(
218218 length=5,
219- value_range =(-1.0, 1.0),
220- bound_range =(-10.0, 10.0)
219+ init_range =(-1.0, 1.0),
220+ bounds =(-10.0, 10.0)
221221 )
222222 ```
223223
@@ -242,10 +242,10 @@ Because each `Chromosome` has an associated `Gene`, the built int chromosomes ar
242242 import radiate as rd
243243
244244 # Create an integer chromosome with 5 genes, each initialized to a random value between -10 and 10
245- chromosome = rd.Chromosome .int(
246- length=5,
247- value_range =(-10, 10),
248- bound_range =(-100, 100)
245+ chromosome = rd.chromosome .int(
246+ length=5,
247+ init_range =(-10, 10),
248+ bounds =(-100, 100)
249249 )
250250 ```
251251
@@ -270,7 +270,7 @@ Because each `Chromosome` has an associated `Gene`, the built int chromosomes ar
270270 import radiate as rd
271271
272272 # Create a bit chromosome with 5 genes, each initialized to a random value of True or False
273- chromosome = rd.Chromosome .bit(length=5)
273+ chromosome = rd.chromosome .bit(length=5)
274274 ```
275275
276276 === ":fontawesome-brands-rust: Rust"
@@ -292,9 +292,9 @@ Because each `Chromosome` has an associated `Gene`, the built int chromosomes ar
292292 import radiate as rd
293293
294294 # Create a character chromosome with 5 genes, each initialized to a random character from the ASCII printable characters
295- chromosome = rd.Chromosome .char(length=5)
295+ chromosome = rd.chromosome .char(length=5)
296296
297- chromosome_with_set = rd.Chromosome .char(length=5, char_set='abc')
297+ chromosome_with_set = rd.chromosome .char(length=5, char_set='abc')
298298 ```
299299
300300 === ":fontawesome-brands-rust: Rust"
@@ -345,20 +345,20 @@ Because of the typed nature of the `Genotype`, it can only hold a collection of
345345
346346 # Create a genotype with a single FloatChromosome and a 5 FloatGenes
347347 genotype = rd.Genotype(
348- rd.Chromosome .float(length=5, value_range =(-1.0, 1.0))
348+ rd.chromosome .float(length=5, init_range =(-1.0, 1.0))
349349 )
350350
351351 # Create a genotype with a single FloatChromosome and a single FloatGene with a
352352 # randomly generated allele between -1.0 and 1.0
353353 genotype = rd.Genotype(
354- rd.Chromosome.float(genes= rd.Gene .float(value_range =(-1.0, 1.0)))
354+ rd.Chromosome([ rd.gene .float(init_range =(-1.0, 1.0))] )
355355 )
356356
357357 # Create a genotype with multiple chromosomes of lengths 5, 15, and 3
358358 three_chromosome_genotype = rd.Genotype([
359- rd.Chromosome .float(length=5, value_range =(-1.0, 1.0)),
360- rd.Chromosome .float(length=15, value_range =(-1.0, 1.0)),
361- rd.Chromosome .float(length=3, value_range =(-1.0, 1.0))
359+ rd.chromosome .float(length=5, init_range =(-1.0, 1.0)),
360+ rd.chromosome .float(length=15, init_range =(-1.0, 1.0)),
361+ rd.chromosome .float(length=3, init_range =(-1.0, 1.0))
362362 ])
363363 ```
364364
0 commit comments