Commit Graph

54 Commits

Author SHA1 Message Date
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
918c4f4d5e Updated database ad graph functions. 2020-11-07 01:54:37 -05:00
05b8fd06fa Moved all graphing to its own class 2020-11-06 22:56:16 -05:00
cb3d91d894 Changed run testing and removed database.db file 2020-11-06 02:16:04 -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
5b6dc8348a Reverted back to old style of attributes. 2020-11-03 11:47:56 -05:00
d4177b08a5 Fixed comments 2020-10-30 11:56:05 -04:00
c9d30be1af Initialization for GA with arguments 2020-10-30 11:52:11 -04:00
00af4dbbe7 Added gene mutation rate 2020-10-27 17:32:40 -04:00
c84758f8c5 Neatified ga.print stuff and altered run_testing 2020-10-22 19:05:43 -04:00
9baf3c7dc5 Fixed termination related stuff 2020-10-22 18:23:27 -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
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
543b295e52 Updated gene impl 2020-10-14 23:09:55 -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
3424fd4da7 Added blank lines and fixed run_testing 2020-10-12 19:57:57 -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
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
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
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
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
c18a531034 Updated selection implementation, added with/without replacement variation 2020-10-04 15:54:38 -04:00
4b375659bb Removed weird github thing with old implementation
Why
2020-10-04 14:35:19 -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
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
472c9c2379 Changed example 2020-09-27 23:25:16 -04:00
e66b4d7fd0 Commented EasyGA.py 2020-09-27 17:26:56 -04:00
a302169415 Changed names of impl 2020-09-27 16:40:44 -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
9d9d0b750c Change domain feature 2020-09-25 15:12:02 -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
4daec6574d Removed globals and fixed a few small print issues 2020-09-24 22:47:12 -04:00
c4ead43d6d Updated genes,chromosme,population prints 2020-09-24 15:02:58 -04:00
994bdb164c Fixed all jacks code 2020-09-23 21:58:48 -04:00
eaa90ecd2a Fixed to explain 2020-09-23 20:29:50 -04:00
70bb03bc96 blaww 2020-09-23 18:23:29 -04:00
b0b502c697 Did stuff 2020-09-23 18:09:29 -04:00