23efae27dc
Added selection_probability to stochastic selection.
2020-12-02 18:50:59 -05:00
df05cf1f5c
Looser rate bounds inside adapt
2020-12-02 18:43:44 -05:00
88624345d0
Using standard multiline code formatting
2020-12-02 18:06:31 -05:00
bfe4699513
Added cleaner comments to explain.
2020-12-02 18:00:23 -05:00
1761092abb
Update stochastic methods
...
- Added a stochastic rank selection and edited cleaner stochastic fitness selection using random.choices.
- Edited stochastic fitness selection to allow negative converted fitness values.
- Edited exception message for check_positive_fitness.
2020-12-02 17:55:57 -05:00
fb84ac40d4
Update EasyGA.py
...
Probably better to let fitness-based selection to work as expected than to break due to unexpected negatives.
2020-12-02 17:06:15 -05:00
6f2392234d
Added past runs and tabulate
2020-12-02 12:50:49 -05:00
1aa314a805
Cleaner gene reflection method.
2020-12-01 19:01:07 -05:00
700ca556f1
Update mutation_methods.py
2020-12-01 18:46:22 -05:00
4a1b87a3b7
Cleaned up and distanced further for more genetic variety
2020-12-01 18:20:46 -05:00
8579565bb6
Caught bug if population is None
2020-12-01 18:17:33 -05:00
62ecfc38fa
Update crossover_methods.py
2020-12-01 10:38:12 -05:00
ea9beb8d8a
Reset the fitness when mutating
2020-12-01 10:36:56 -05:00
5b6d925088
Update ga.adapt()
...
Faster convergence by allowing more genetic variety using negative weights to push chromosomes too similar away from the best chromosome.
2020-12-01 10:36:17 -05:00
4d273df5ae
Adapting faster seems beneficial
2020-12-01 10:33:52 -05:00
501223e272
Added a delete database function
2020-12-01 00:13:45 -06:00
63c4304f48
Cleaned up and improved ga.adapt()
...
- Cleaned up some stuff (variables).
- Added adapt by heavy crossover.
2020-11-30 14:21:52 -05:00
cd19725a5a
Added weighted crossover and then some
...
- Added weighted methods. (default setting does not change).
- Removed unnecessary exception catching. Letting exceptions flow through instead, and let the user decide how to handle them.
- Removed list conversion.
- Removed parent sorting for extrapolate.
- Simplified variable names.
2020-11-30 14:19:14 -05:00
8e0437bf4e
Cleaned up to allow any iterable input
2020-11-30 14:12:36 -05:00
27ca73711e
Improved adapt
2020-11-27 22:18:29 -05:00
d25ea314ac
Using random.sample for efficiency
2020-11-27 22:17:13 -05:00
5407e2ea63
Added extrapolation method
2020-11-27 22:10:30 -05:00
d845e7fc1b
Fixed percent of population unmutated
2020-11-27 20:19:23 -05:00
65a35e71dc
Cleaned up comments.
2020-11-27 20:03:43 -05:00
cbd0265cd8
Fixed adapt inequality
2020-11-27 19:23:54 -05:00
5b5ed70d73
Fixed bug
2020-11-27 19:16:08 -05:00
e54824238b
Ensure sorted not needed.
...
The problem was not appending old chromosomes to the front of the next population during survivor selection.
2020-11-27 19:13:37 -05:00
1197447d7e
Added ga.adapt()
2020-11-27 19:12:40 -05:00
a87103b80c
Added ensure_sorted decorator.
...
Ensures elitism occurs.
2020-11-27 19:08:05 -05:00
f21512f178
Fixed random_avoid_best
2020-11-27 18:40:58 -05:00
ac84e57b9b
Minor bugs
2020-11-27 16:49:56 -05:00
a9fe22ecf1
Fixed minor bug
2020-11-27 16:24:20 -05:00
312d0adcc9
Make sure at least 2 parents are selected
2020-11-27 16:06:57 -05:00
a746133b87
Fixed typo
2020-11-27 16:04:06 -05:00
bf148222eb
Update crossover_methods.py
...
- Avoid bugging if the mating pool only has one parent.
- Shortened decorator name.
2020-11-27 16:03:34 -05:00
fa832c1059
Cleaned up spacing and added exception checking
2020-11-26 21:32:13 -05:00
32dc66f857
Cleaned up spacing and added gene_value_iter
2020-11-26 21:31:26 -05:00
1ba86c0661
Cleaned up spacing
2020-11-26 21:30:49 -05:00
33f74c4019
Set default mutation to use elitism
2020-11-23 11:54:54 -05:00
1b35a13900
Minor logical bug
2020-11-23 11:54:18 -05:00
243d0dd1a0
Error checking and avoid creating new chromosome for mutation
2020-11-23 11:53:46 -05:00
03debc145c
Added type checking if the query is not a list or nested list
2020-11-22 22:32:25 -05:00
4d04b7daab
Small rename fix
2020-11-22 22:23:31 -05:00
b793c1d844
Query output is automatically formatted
2020-11-22 22:20:24 -05:00
c8985f9872
Opted for single _ instead of double _
2020-11-22 17:55:58 -05:00
7c29f04807
Removed get/set
2020-11-22 15:58:55 -05:00
119abea4eb
Using random.sample to avoid dupes
2020-11-22 15:58:36 -05:00
cdc2b6bdfb
Removed get/set
2020-11-22 15:58:11 -05:00
8ed3cbe0ee
Removed get/set
2020-11-22 15:57:36 -05:00
261870d702
Update mutation_methods.py
...
- Using deepcopy to avoid chromosomes sharing genes.
- Improved readibility.
2020-11-22 15:57:00 -05:00