Commit Graph

653 Commits

Author SHA1 Message Date
5883208c68 fixed 2020-09-29 20:54:18 -04:00
bd76e967ff Added fitness function and changed evolve function 2020-09-29 20:52:06 -04:00
10b6a9b444 Update setup.py 2020-09-28 17:03:00 -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
6e785c2651 Update setup.py 2020-09-28 12:34:36 -04:00
d8f2575a9a Update __init__.py 2020-09-28 11:59:31 -04:00
04867a3cc4 Update __init__.py 2020-09-28 11:58:43 -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
51e3e145da Update EasyGA.py 2020-09-28 11:57:28 -04:00
2388428a9b Add files via upload 2020-09-28 11:57:05 -04:00
8c3c505fef Delete MANIFEST.in 2020-09-28 11:50:16 -04:00
97f5785c0a Create CHANGELOG.rst 2020-09-28 11:50:06 -04:00
b984d85b9a Update setup.py 2020-09-28 11:48:58 -04:00
2caf57c0df Update setup.py 2020-09-28 01:28:51 -04:00
7ba39862dc Update setup.py 2020-09-28 01:12:12 -04:00
2d4be5df54 Update setup.py 2020-09-28 00:51:01 -04:00
672119876b Update setup.py 2020-09-28 00:50:48 -04:00
e9447bf796 Update setup.py 2020-09-28 00:25:15 -04:00
8d7dd27656 Update setup.py 2020-09-28 00:24:26 -04:00
472c9c2379 Changed example 2020-09-27 23:25:16 -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
a42d5970ca Update README.md 2020-09-27 17:46:40 -04:00
31f5f25c36 Comment updates 2020-09-27 17:46:17 -04:00
c7bda35c0d Merge branch 'master' of https://github.com/danielwilczak101/EasyGA 2020-09-27 17:45:02 -04:00
4b21dc45f6 Update EasyGA.py 2020-09-27 17:42:41 -04:00
760ec15264 Added comments 2020-09-27 17:36:59 -04:00
58f7a34cbb Merge branch 'master' of https://github.com/danielwilczak101/EasyGA 2020-09-27 17:29:40 -04:00
e66b4d7fd0 Commented EasyGA.py 2020-09-27 17:26:56 -04:00
df32eb47a3 Added comments to the initilization function 2020-09-27 17:19:13 -04:00
d1334090a8 Update EasyGA.py 2020-09-27 16:58:42 -04:00
11b74c5a45 Merge pull request #8 from danielwilczak101/Dans_devel
Changed names of impl
2020-09-27 16:42:03 -04:00
a302169415 Changed names of impl 2020-09-27 16:40:44 -04:00
c244948e67 Merge branch 'master' of https://github.com/danielwilczak101/EasyGA 2020-09-27 16:30:00 -04:00
55428cc45e Merge pull request #7 from danielwilczak101/Dans_devel
Dans devel
2020-09-27 16:16:10 -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
1703b84ddc Merge pull request #6 from danielwilczak101/Jack_domain
Jack domain
2020-09-25 16:57:22 -04:00
348de769c4 Merge branch 'Dans_devel' into Jack_domain 2020-09-25 16:56:59 -04:00
9b77d3619b Remove random gene function 2020-09-25 16:52:09 -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
9d9d0b750c Change domain feature 2020-09-25 15:12:02 -04:00
ed1b2bbe03 Updated gene input checks
Updated the check of incoming data to ensure validity - if the user enters a single digit, say "5", it will automatically be converted to a list like [5,5]. This already worked before with range, but it now works with domain as well.
2020-09-25 11:24:47 -04:00
129925bbdd Cleaned up backend & user interaction with EasyGA
In the initial commit, string inputs would implicitly be seen as domain, and all integer inputs would be seen as range. If the user wanted to assign any integer inputs as domain, they would have to call the entire gene_input_type, even if only to change a single element to domain. It has now been updated to where the user can specifically call the element they want to update. The testing file new_initialization_method_testing.py reflects this.
2020-09-25 11:14:09 -04:00
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
7409ffb8ba Update gene_random.py
Simplified random gene
2020-09-25 00:27:13 -04:00
78d63aa4aa Testing 2020-09-24 23:51:40 -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