Commit Graph

39 Commits

Author SHA1 Message Date
3adef48b54 Added randround 2020-12-11 14:04:59 -05:00
c19ef0d1be Fixed bugs involving None types 2020-12-07 21:07:04 -05:00
60c0fe3930 Added permutation crossover methods 2020-12-06 11:17:35 -05:00
6d0ec0c30e Fixed bug/typo 2020-12-03 17:00:32 -05:00
5fb26545d4 pushed fix 2020-12-03 02:16:10 -05:00
85855c2746 Renamed decorators for consistency 2020-12-03 00:21:52 -05:00
3271d7d271 Update crossover_methods.py
- Added check_weight decorator.
- Implemented better random floats with weights that allow weighting all the way to either side.
2020-12-02 23:13:35 -05:00
2941be665c Avoid one-sided edge cases
- Single-point crossover allows either parent to have their genes come first now.
- Rounding to integers is doing with an additional +/- 0.5 random value so that integer genes do not get stuck at one value when rounding at the midpoint of two integers e.g. 0.5 now randomly rounds to 0 or 1 instead of always 0.
2020-12-02 20:39:51 -05:00
62ecfc38fa Update crossover_methods.py 2020-12-01 10:38:12 -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
5407e2ea63 Added extrapolation method 2020-11-27 22:10:30 -05:00
ac84e57b9b Minor bugs 2020-11-27 16:49:56 -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
4d04b7daab Small rename fix 2020-11-22 22:23:31 -05:00
c8985f9872 Opted for single _ instead of double _ 2020-11-22 17:55:58 -05:00
953d34f74b Making use of casting to list 2020-11-22 15:44:29 -05:00
bc7d041f00 Fixed lambda return bug 2020-11-21 15:47:55 -05:00
470b33aa31 Cleaner random functions used. 2020-11-20 19:58:25 -05:00
73461f7915 Comments updated 2020-11-20 19:06:55 -05:00
c212da2426 Further split values to chromosomes decorator 2020-11-20 09:15:31 -05:00
965ad352a6 Added copies for external access of function decorators 2020-11-19 23:25:33 -05:00
3d10adb2d9 Fixed scope of function decorators 2020-11-19 22:28:04 -05:00
46b4dc749d Added function decorator 2020-11-19 21:55:12 -05:00
a8b38dc800 Added function decorator 2020-11-19 21:47:45 -05:00
0ee545429c Added iterable features 2020-11-19 11:46:47 -05:00
6e95ff5d9d Rewrote data_list to __iter__ 2020-11-19 10:17:22 -05:00
857e248034 Simplified a lot of code by zipping data lists 2020-11-19 09:54:17 -05:00
ae74ce1766 Minor edits 2020-10-25 22:36:54 -04:00
5df19df643 Population.next_population and better comments 2020-10-15 00:22:58 -04:00
0090db9dce Fixed method names and added some crossover methods and tests for floats 2020-10-13 21:07:05 -04:00
fb213f04dd Added more structure methods and some quality of life changes
Overall cleaned up a lot of comments.

EasyGA:
- Code cleanup.

Population:
- Added sort_by_best_fitness
- Added parent/mating pool methods.
- Renamed some methods for consistency.

Chromosome:
- Added get_gene(index).

Parent Selection:
- Improved selection methods to use the ga.selection_probability so that the roulette selection actually works well.
- Added stochastic selection.

Survivor Selection:
- Added fill_in_random and fill_in_parents_then_random.

Crossover/Mutation:
- Cleaned up code.
2020-10-13 12:48:20 -04:00
b8f1de9b52 Fixed crossover methods 2020-10-12 22:58:26 -04:00
b6ae77c7ea Several Changes
Crossover/Mutation:
- Split into individual and population subclasses.
- Added sequential population crossover selection.
- Renamed and reimplemented mutation methods.

EasyGA:
- Improved make_obj methods for the chromosomes and populations to take arguments.

Initialization:
- Improved to shorter code.
- Fixed repeated error messages

Chromosome:
- Changed get/set_genes to get/set_gene_list.
2020-10-12 21:39:17 -04:00
94d7c52666 Added comments & fixed small bug
Mostly added comments, but also fixed a small bug in parent selection where the tournament size would be much smaller than it should be.
2020-10-12 09:23:41 -04:00
88927f7415 File name changes to match the rest of framework. generation goal was setup twice in EasyGA. 2020-10-08 15:53:35 -04:00
3649293133 Updated GA attribute structure, separated selection file structure
Updated GA attribute structure, separated selection file structure
2020-10-06 22:11:40 -04:00
e7ac0e23f4 Optimizations/updates
1. Deleted duplicate functions in EasyGA
2. Added new index-dependent fitness example
3. GA now auto-sorts by best fitness immediately after the fitness is calculated across the board
4. Removed 'selected' status flag from the Chromosome flag
5. Added mating_pool attribute to the population
6. Changed other code to be in line with 4 and 5
7. Optimized tournament selection method
2020-10-06 17:55:17 -04:00
665062fdf1 Updated Implementation Framework
Updated to cover changes made by Dan to Master regarding general design changes

Also added remove_two_worst survivor selection method
2020-10-05 20:46:25 -04:00