Commit Graph

79 Commits

Author SHA1 Message Date
5821e709a3 New Initialization Method
This is a test implementation of a potential new initialization method. A testing file - new_initialization_method_testing.py - is included to allow for quick testing.

In summary here is are the major points:
1) Two new attributes of GA were created - gene_input and gene_input_type. gene_input holds the user's custom range(s)/domain(s) after it gets passed to the initialize() function. gene_input_type holds an array with the same length as the chromosomes that holds the input type of the user's gene_input on a gene-by-gene basis. It does this in the same exact way that index-dependent gene ranges/domains are handled. By making the gene_input_type array the same size as the chromosome, the elements can be paired very easily. The acceptable values for this are either "range" or "domain". With a range, any value between the two can be generated; with domain, only the two elements included can be selected from randomly.
2) As mentioned in change 1, the user now has to pass their range(s)/domain(s) to the initialize() function.
3) The package is capable of implicitly determining if a certain input from the user is a range or domain. Strings can only ever be a domain – if given an element that only includes integers, the program assumes range.
4) If the user wishes to use numbers only as a domain, they can specify this by directly interacting with the ga.gene_input_type (or through a setter function).
5) the initialize() function in the GA object determines the implicit range/domain assignments if the user doesn’t do so themselves.
6) The random_initialization() function is effectively the same, except there is now an if/else to determine if the user is using the built-in gene creation function or not. If they are, then pass the gene_input, gene_input_type, and current gene index as arguments to the gene function. If they are using their own function, random_initialization() functions exactly the same way as it does in the current master branch.
7) Based on all the settings mentioned above, the random_gene() function will create a value before passing it back to random_initialization().
2020-09-25 01:15:53 -04:00
5c5d6920b2 Domain update
Can set the domain to either a range or a list of values.
2020-09-24 23:51:21 -04:00
4daec6574d Removed globals and fixed a few small print issues 2020-09-24 22:47:12 -04:00
9c5092525a Fixed file and everything 2020-09-23 22:12:42 -04:00
994bdb164c Fixed all jacks code 2020-09-23 21:58:48 -04:00
70bb03bc96 blaww 2020-09-23 18:23:29 -04:00
b0b502c697 Did stuff 2020-09-23 18:09:29 -04:00
7359ef1268 file changes 2020-09-23 16:53:43 -04:00
2322a186e3 Major structural changes 2020-09-23 16:46:59 -04:00
cd15a85b71 testing 2020-09-23 13:23:07 -04:00
c2ebec6be2 Testing happened 2020-09-22 20:12:28 -04:00
2c3ef3f589 rewrote test fitness funciton 2020-09-22 18:54:03 -04:00
7aee6b9c8a changed name for readability 2020-09-22 18:34:34 -04:00
6503a320ae file structure changes and testing files added. 2020-09-22 14:37:55 -04:00
73042b8cc4 New change 2020-09-22 00:01:18 -04:00
4c0090a9ed Added files for all the main classes inside of EasyGA 2020-09-21 23:39:15 -04:00
e84483cf8b Major chnages to structure 2020-09-21 20:26:21 -04:00
2c6d906935 Updated structure and fixed bugs. 2020-09-21 15:32:50 -04:00
71e75e8682 update functionality 2020-09-21 15:26:24 -04:00
170e1e36e4 Clearified some code and how to use i. 2020-09-21 14:21:32 -04:00
358d93dfa4 Fixed bugs 2020-09-21 02:20:25 -04:00
85ba32803f Fixed bugs 2020-09-21 02:20:08 -04:00
59b670f44e Testing 2020-09-21 02:05:26 -04:00
0affbf4bf4 Removed comments 2020-09-20 18:47:41 -04:00
893cc2fef3 Removed note necessary comments 2020-09-20 18:47:04 -04:00
97af1af852 Added initilization functionality. Add necessary method to access,genes,chromosomes and the population. 2020-09-20 18:46:02 -04:00
70c9e443a5 Update EasyGA.py 2020-09-20 16:14:59 -04:00
67b41cb3b7 Adding comments 2020-09-20 16:00:12 -04:00
abc882b743 Create EasyGA.py 2020-09-20 02:34:21 -04:00