Commit Graph

69 Commits

Author SHA1 Message Date
34eb286710 Added underscores to decorators for consistency 2020-12-07 21:08:23 -05:00
a746133b87 Fixed typo 2020-11-27 16:04:06 -05:00
1ba86c0661 Cleaned up spacing 2020-11-26 21:30:49 -05:00
c8985f9872 Opted for single _ instead of double _ 2020-11-22 17:55:58 -05:00
7bb208b915 Making use of casting to list 2020-11-22 15:49:57 -05:00
f00785dad1 Fixed chromosome length instead of population size 2020-11-21 16:12:37 -05:00
73461f7915 Comments updated 2020-11-20 19:06:55 -05:00
abcb19f8b0 Split the process into function decorators 2020-11-20 09:16:30 -05:00
ae5fed1d71 Fixed potential bug 2020-11-12 17:49:33 -05:00
543b295e52 Updated gene impl 2020-10-14 23:09:55 -04:00
9c6d5777b7 Removed old structure files and added empty test file 2020-10-12 23:48:26 -04:00
b42034c402 Added structure directory and improved sort by fitness 2020-10-12 23:43:28 -04:00
8056bbde1c Added test_EasyGA.py 2020-10-12 23:27:46 -04:00
1f3e01de0a File name problems 2020-10-12 22:46:54 -04:00
f277bc1684 Changed a few comments 2020-10-12 22:05:26 -04:00
db93235642 Cleaned it a bit more to match mutation methods 2020-10-12 22:02:18 -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
3424fd4da7 Added blank lines and fixed run_testing 2020-10-12 19:57:57 -04:00
42c0fdbc10 updated all code to use .size() methods 2020-10-12 17:05:57 -04:00
8137bb64d9 Some cleaning up
Added Population.size() and cleaned up the survivor selection.
2020-10-12 16:53:06 -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
7e8c81c03d Fixed __init__ and chromosome errors
Fixed __init__ and chromosome errors
2020-10-06 21:20:14 -04:00
59f0d03f72 Merge branch 'master' into ryley_beta 2020-10-06 21:11:22 -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
68db360b94 Alot of name changes and file name changes 2020-10-04 23:56:51 -04:00
e05aa7f62b Changed implementation framework
Instead of a nested approach, selection/crossover/mutation are all called separately and directly by the GA. selection_impl was also separated into parent_selection_impl and survivor_selection_impl, as both are needed separately.
2020-10-04 17:59:59 -04:00
89df506469 Fixed more github upstream stuff
why v2
2020-10-04 14:38:41 -04:00
7e587d48d0 Test Implementation for selection/crossover/mutation
The current test implementation includes random mutation, single point crossover, and tournament selection. The implementation, in short, is a nested approach. The selection method is the only thing actually called by the GA. Both crossover and mutation occur within the selection method. As long as these three systems all follow a standard input/output system, any implementation we build, as well as any user implementations, will work perfectly. The selection function must take GA as a parameter and output a new population. Crossover takes in GA and outputs a population. Mutation takes a chromosome set and outputs a new chromosome set.

Many of the changes in this commit are regarding this test implementation. I have also changed many of the file names from "x_examples" to "x_types" and updated the class names to follow capitalziation standards. I did this because I feel personally like the built-in mutation, crossover, and selection implementations are less "examples" and more just already built implementations to make the code required from the user smaller.
2020-10-04 08:00:33 -04:00
aa0c5320c8 Requested file name changes 2020-09-30 23:25:44 -04:00
8377650c58 Changes from meeting 2020-09-30 19:33:23 -04:00
625143da7d Added the termination features 2020-09-30 00:05:39 -04:00
d531888d78 Fixed import problems 2020-09-29 21:23:18 -04:00
bd76e967ff Added fitness function and changed evolve function 2020-09-29 20:52:06 -04:00
fbbe017c9b Blank init files 2020-09-28 14:08:49 -04:00
e01ee53b87 Added __init__.py's 2020-09-28 13:42:54 -04:00
9c9e87141c Add files via upload 2020-09-28 11:58:18 -04:00
cc6018f2e1 Delete focused_initialization.py 2020-09-28 11:58:00 -04:00
1797d88c0b Updated gene creation
The gene creation process can now accept an arbitrary number of parameters.
2020-09-27 21:52:40 -04:00
78bf499192 Merge branch 'master' of https://github.com/danielwilczak101/EasyGA 2020-09-27 17:47:55 -04:00
31f5f25c36 Comment updates 2020-09-27 17:46:17 -04:00
760ec15264 Added comments 2020-09-27 17:36:59 -04:00
df32eb47a3 Added comments to the initilization function 2020-09-27 17:19:13 -04:00
a302169415 Changed names of impl 2020-09-27 16:40:44 -04:00
6aec9770b6 Further optimizations, error-checking, user-input conversions
1) The initialization now accepts "general" inputs that should apply to each gene. For example, rather than a gene input of [1,100] being interpreted to mean gene 1 hsould be 1 and gene 2 should be 100, it will apply a range of [1,100] to each gene.
2) The initialization now accepts "general" gene_input_types. For example, if the user had a set of index-dependent number values, they could just say ga.gene_input_type = "domain" and the package will propagate that across all genes in the chromosome. The user still has the option of defining the entire array or just defining a specific element if they so choose. For later commits, the general gene_input_type will have to be checked for validity; for example, a string can never be a range.
3) Fixed an issue in the ordering of the initialization function call.
4) Added comments surrounding the signfiicant changes to the initialization.
5) Added example tests to the testing file.
2020-09-25 18:02:45 -04:00
348de769c4 Merge branch 'Dans_devel' into Jack_domain 2020-09-25 16:56:59 -04:00
922d046b72 Code optimizations, float-range implementation
Random gene initialization now supports float ranges (assumed by default if gene input includes float). Backend was also optimized and cleaned up greatly.
2020-09-25 16:10:28 -04:00
044cc9d1f6 Removed function that is not required 2020-09-25 15:12:47 -04:00