65a35e71dc
Cleaned up comments.
2020-11-27 20:03:43 -05:00
cbd0265cd8
Fixed adapt inequality
2020-11-27 19:23:54 -05:00
1197447d7e
Added ga.adapt()
2020-11-27 19:12:40 -05:00
1ba86c0661
Cleaned up spacing
2020-11-26 21:30:49 -05:00
a84b79d391
Removed get/set
2020-11-22 15:48:06 -05:00
73461f7915
Comments updated
2020-11-20 19:06:55 -05:00
68b10c3fde
Minor changes
2020-11-20 09:20:02 -05:00
454edb13d1
Avoid overwriting initial population
2020-11-19 16:48:02 -05:00
0ee545429c
Added iterable features
2020-11-19 11:46:47 -05:00
1d97a92fb7
Changed population print
2020-11-17 08:40:51 -05:00
c5d323cb20
Fixed termination conditions
2020-11-17 08:27:11 -05:00
260d17bf91
Cleaned up the while loop
2020-11-17 01:22:05 -05:00
8e90bd558b
Config now adding to database.
2020-11-16 02:50:37 -05:00
9c455957f2
Edge case for converting fitness to minimization
...
Avoid catastrophic cancellations
2020-11-09 16:02:01 -05:00
874f4362fa
Minor touches
2020-11-07 18:35:57 -05:00
96767ad03c
Added save_population
...
for easier front-end usage.
2020-11-07 18:21:43 -05:00
e1f794d7b7
Database files renamed
2020-11-07 17:17:18 -05:00
c959f44fd5
GA gives graph the database
2020-11-07 13:32:34 -05:00
f1f9d70c26
Fixed graph features
...
- Common graph code made into a method.
- No longer needs the user to pass in the ga for graphing.
- Changed graph attribute from class to object.
- Added ga to the graph object as an attribute on initialization to avoid needing to pass it in every time you graph.
- Capitalized database/graph classes.
2020-11-07 12:43:47 -05:00
05b8fd06fa
Moved all graphing to its own class
2020-11-06 22:56:16 -05:00
5c5b645c30
Added graphing capablities. It only graphs total fitness of generation.
2020-11-06 02:11:06 -05:00
7b2053d626
Added basic database functionallity
2020-11-05 15:38:54 -05:00
72a8975d03
Fixed default arguments
...
Reverted usage format:
GA(
chromosome_length = 20,
population_size = 25
)
2020-11-03 14:30:43 -05:00
172918cad7
Added small database functionality but its commented out of running.
2020-11-03 13:43:21 -05:00
621fdef86d
Fixed attributes to allow setting attributes on initialization
...
e.g.
GA({
'chromosome_length' : 10,
'population_size' : 50
})
2020-11-03 13:19:09 -05:00
5b6dc8348a
Reverted back to old style of attributes.
2020-11-03 11:47:56 -05:00
cae4314581
Added more comments.
2020-11-03 02:34:16 -05:00
ba2f076a2b
Added doc strings to EasyGA ga class and attributes class.
2020-11-03 02:32:20 -05:00
c9d30be1af
Initialization for GA with arguments
2020-10-30 11:52:11 -04:00
0b5f42966c
Update population before mutation
2020-10-27 16:23:48 -04:00
d01096c1ea
Fixed print tabbing
2020-10-22 19:07:43 -04:00
c84758f8c5
Neatified ga.print stuff and altered run_testing
2020-10-22 19:05:43 -04:00
6c6c64e342
Updated fitness based termination and fixed some EasyGA stuff
2020-10-22 00:05:42 -04:00
8e2698fc0d
Implemented basic functionality for using different target fitness types
2020-10-21 14:11:43 -04:00
d8e5296ef5
Fixed spacing mistakes and added comments
2020-10-15 12:56:59 -04:00
ce62bc50e5
Added atrributes class
2020-10-15 12:47:12 -04:00
ec1b67fc00
Added Default for gene impl and setter example in Easy GA
2020-10-15 01:46:13 -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
645f704b19
Fixed broken defaults and changed fitness function to is_it_5
2020-10-13 00:10:06 -04:00
b42034c402
Added structure directory and improved sort by fitness
2020-10-12 23:43:28 -04:00
72ae3ec1e7
Even better sort by fitness
2020-10-12 22:51:13 -04:00
86fbd1a9c0
Improved the sort by fitness function
2020-10-12 22:43:41 -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
3424fd4da7
Added blank lines and fixed run_testing
2020-10-12 19:57:57 -04:00
e52b32f23c
Fixed some errors with the new updates
2020-10-12 17:14:24 -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
c3d9ef8bd1
Updated sort_by_best_fitness
2020-10-08 23:16:29 -04:00
dcc3684202
Updated tournament selection
...
On small populations, there is now a lower bound on the tournament size.
2020-10-08 22:48:45 -04:00