10000 Update README.md · rashed-03/GeneticAlgorithmPython@5197baa · GitHub
[go: up one dir, main page]

Skip to content

Commit 5197baa

Browse files
authored
Update README.md
1 parent 749d75b commit 5197baa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# GeneticAlgorithmPython
2+
23
This project implements the genetic algorithm (GA) in Python mainly using NumPy.
34

45
The project has 2 main files which are:
@@ -56,8 +57,8 @@ On **`15 April 2020`**, a new argument named `fitness_func` is added that allows
5657
Let's discuss an example:
5758

5859
> Given the following function:
59-
> y = f(w1:w6) = w1x1 + w2x2 + w3x3 + w4x4 + w5x5 + 6wx6
60-
> where (x1,x2,x3,x4,x5,x6)=(4,-2,3.5,5,-11,-4.7) and y=44
60+
> y = f(w1:w6) = w1x1 + w2x2 + w3x3 + w4x4 + w5x5 + 6wx6
61+
> where (x1,x2,x3,x4,x5,x6)=(4,-2,3.5,5,-11,-4.7) and y=44
6162
> What are the best values for the 6 weights (w1 to w6)? We are going to use the genetic algorithm to optimize this function.
6263
6364
So, the task is about using the genetic algorithm to find the best values for the 6 weight `W1` to `W6`. Thinking of the problem, it is clear that the best solution is that returning an output that is close to the desired output `y=44`. So, the fitness function should return a value that gets higher when the solution's output is closer to `y=44`. Here is a function that does that. The function must accept a single parameter which is a 1D vector representing a single solution.
@@ -226,6 +227,7 @@ You can also check my book cited as [**Ahmed Fawzy Gad 'Practical Computer Visio
226227
It is important to note that this project does not implement everything in GA and there are a wide number of variations to be applied. For example, this project just uses decimal representation for the chromosome and the binary representations might be preferred for other problems.
227228

228229
## Get in Touch
230+
229231
* E-mail: ahmed.f.gad@gmail.com
230232
* [LinkedIn](https://www.linkedin.com/in/ahmedfgad)
231233
* [Amazon Author Page](https://amazon.com/author/ahmedgad)

0 commit comments

Comments
 (0)
0