Skip to content

Commit

Permalink
Support of NSGA-II
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedfgad committed Sep 6, 2023
1 parent a3dc00b commit cabfa6d
Show file tree
Hide file tree
Showing 8 changed files with 290 additions and 270 deletions.
4 changes: 2 additions & 2 deletions pygad/helper/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from pygad.helper import unique, nsga2
from pygad.helper import unique

__version__ = "1.2.0"
__version__ = "1.1.0"
252 changes: 0 additions & 252 deletions pygad/helper/nsga2.py

This file was deleted.

2 changes: 2 additions & 0 deletions pygad/pygad.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
from pygad import visualize
import sys

# Extend all the classes so that they can be referenced by just the `self` object of the `pygad.GA` class.
class GA(utils.parent_selection.ParentSelection,
utils.crossover.Crossover,
utils.mutation.Mutation,
utils.nsga2.NSGA2,
helper.unique.Unique,
visualize.plot.Plot):

Expand Down
3 changes: 2 additions & 1 deletion pygad/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from pygad.utils import parent_selection
from pygad.utils import crossover
from pygad.utils import mutation
from pygad.utils import nsga2

__version__ = "1.0.1"
__version__ = "1.1.0"
4 changes: 4 additions & 0 deletions pygad/utils/crossover.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
import random

class Crossover:

def __init__():
pass

def single_point_crossover(self, parents, offspring_size):

"""
Expand Down
3 changes: 3 additions & 0 deletions pygad/utils/mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

class Mutation:

def __init__():
pass

def random_mutation(self, offspring):

"""
Expand Down
Loading

0 comments on commit cabfa6d

Please sign in to comment.