Created by Yaroslav Oliinyk
-
The purpose of the following program is to create a polinomium which will separate 2 sets of dots(RED dots from BLUE dots)
-
We have such polinomium: y = a + bx + cx2
-
Our genetic algorithm will find the best coefficients: a,b,c
- Download the repository
- Unzip the repository in "Downloads" folder
- You'll have the following package: PointsDivider-master
- Enter this package: "cd ~/Downloads/PointsDivider-master/"
- Run the next command to extract the program: "tar -xJf PointsDivider.tar.xz"
- Use the following command: "cd ~/Downloads/PointsDivider-master/PointsDivider/PointsDivider/src"
- Then this: "javac -cp jcommon-1.0.23.jar:jfreechart-1.0.19.jar: Main.java"
- Then: "java -cp jcommon-1.0.23.jar:jfreechart-1.0.19.jar: Main"
- Well done! The program is running.
- The program will propose you to insert RED and BLUE dots by yourself or generate them.
- In case of choosing insert by yourself you will need to write the coordinates of firstly RED points(which are also called POSITIVE)
- For example you've entered 5 points and you want to stop, then write in the coordinate something that's not a number and you'll be switched to writing coordinates of BLUE points
- After writing coordinates of BLUE(NEGATIVE) points simply as it was with RED points write smth, that's not a number to finish entering points.
- In case you chose to generate points, they will be geneated right away without effort.
- Then after all the points are entered, the algorithm starts to work and eventually you should receive a graph with polinomials, starting from the first generation to the last.
- The last polinomial will be the best divider.
- In Example 1 is a red polinomium
- In Example 2 is a pink polinomium
- Meanwhile in console you can observe the evolution of the population.
All rights are reserved
2019