Commit Graph

15 Commits

Author SHA1 Message Date
7e0134e785 Fixed bug
Potentially 0 mutations occur
2020-11-12 18:46:09 -05:00
ef5f87cbc6 Fixed bug 2020-11-12 17:59:55 -05:00
0c9c545125 Cleaned up code 2020-11-12 17:50:07 -05:00
45316286c0 Added Permutation class 2020-11-12 17:38:10 -05:00
3e9c2fc784 Multiple updates
- Removed obsolete whole_chromosome method.
- Renamed single_gene to individual_genes.
- Rewrote single_genes to use copied data instead of modifying original data.
- Added random_selection_then_cross.
2020-11-12 17:13:23 -05:00
00af4dbbe7 Added gene mutation rate 2020-10-27 17:32:40 -04:00
543b295e52 Updated gene impl 2020-10-14 23:09:55 -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
f277bc1684 Changed a few comments 2020-10-12 22:05:26 -04:00
0b53f2cd81 Added comments 2020-10-12 21:43:23 -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
8137bb64d9 Some cleaning up
Added Population.size() and cleaned up the survivor selection.
2020-10-12 16:53:06 -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
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
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