-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved project to different Repository
- Loading branch information
Showing
218 changed files
with
8,244 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Compiled class file | ||
.idea | ||
*.class | ||
*.iml | ||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
|
||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Genetic Visualizer | ||
The goal of this tool is to create a visualisation of the optimization process of an evolutionary algorithm. | ||
The visualisation should provide some deeper inside in the behaviour of the evolutionary algorithm. Mainly, the consequences of changing certain parameters and operators on the optimization process should be visualized with the help of this tool. | ||
Therefore, this tool can be used as a supporting medium in teaching concepts and behaviour of evolutionary algorithms. | ||
## Requirements | ||
1. It is necessary to have a _JRE_ installed. You need to have the version 11 or higher. It is recommended to use the latest version found here: | ||
> https://www.oracle.com/java/technologies/downloads/ | ||
3. At least 1 GB of available RAM | ||
|
||
## Operating systems | ||
This tool should work on all commonly used operating system. | ||
This includes _Windows 10/11_, _Linux_ and _macOS_. For each | ||
platform there is one executable _JAR_ file found. | ||
### Windows 10/11 | ||
To run the program you simply double-click the executable for the Windows version. | ||
### Linux | ||
If you have a graphical interface installed simply double-clicking the executable should start the tool. | ||
If the tool does not start, check whether you have permission to execute the program. | ||
Simply add the permission to the file, and then it should start: | ||
`chmod +x GeneticVisualizer-Linux.jar` | ||
### macOS | ||
If you are running a macOS system you have to build the project yourself. Check the building part of this readme | ||
for more information. | ||
|
||
### Building the project | ||
1. Download the latest version of Maven for your system at: https://maven.apache.org/download.cgi | ||
2. Download the project and unzip it | ||
3. Start a terminal and navigate to the directory of the project there the pom.xml is located | ||
4. If maven was properly installed you can run `mvn clean install` to build the jar executable | ||
5. The new build jar will be located in the folder `/Jar` with the name: `Thesis-1.0-SNAPSHOT-jar-with-dependencies.jar` | ||
6. Simply double-click the file to run the program | ||
|
||
### DEBUG information | ||
If you have access to a terminal e.g. _Powershell_ navigate to the directory of the executables. | ||
Executing the program via the terminal shows some additional _DEBUG_ information. | ||
Simply use following command to start the program via the terminal: | ||
`java -jar GeneticVisualizer-<Platform>.jar` | ||
|
||
## Implementation details | ||
### Solution space | ||
The solution space is a three-dimensional mathematical function which has to be minimized or maximized. For easier visualization the function is represented as a contour plot. | ||
Warm colors represent a high value and cold colors represent a low value in the solution space. | ||
### Vector | ||
The _vector_ representation consist of two coordinates _x_ and _y_. | ||
### Binary | ||
The _binary_ representation consist of a _64 bit_ binary string. The first _32 bits_ represent the _x_ coordinate and the last _32 bits_ represent the _y_ coordinate. | ||
|
||
## License | ||
GNU GPLv3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.example</groupId> | ||
<artifactId>Thesis</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<name>Thesis</name> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<junit.version>5.7.1</junit.version> | ||
<kotlin.version>1.5.10</kotlin.version> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.openjfx</groupId> | ||
<artifactId>javafx-controls</artifactId> | ||
<version>11.0.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.openjfx</groupId> | ||
<artifactId>javafx-fxml</artifactId> | ||
<version>11.0.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<version>${junit.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<version>${junit.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jetbrains.kotlin</groupId> | ||
<artifactId>kotlin-stdlib-jdk8</artifactId> | ||
<version>${kotlin.version}</version> | ||
</dependency> | ||
|
||
<!-- Logging library --> | ||
<dependency> | ||
<groupId>io.github.microutils</groupId> | ||
<artifactId>kotlin-logging-jvm</artifactId> | ||
<version>2.0.11</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<version>1.2.6</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory> | ||
<testSourceDirectory>${project.basedir}/src/main/test</testSourceDirectory> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.8.1</version> | ||
<configuration> | ||
<source>11</source> | ||
<target>11</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.openjfx</groupId> | ||
<artifactId>javafx-maven-plugin</artifactId> | ||
<version>0.0.7</version> | ||
<executions> | ||
<execution> | ||
<!-- Default configuration for running with: mvn clean javafx:run --> | ||
<id>default-cli</id> | ||
<configuration> | ||
<mainClass>com.example.thesis/com.geneticVisualizer.MainApplication</mainClass> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.jetbrains.kotlin</groupId> | ||
<artifactId>kotlin-maven-plugin</artifactId> | ||
<version>${kotlin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>compile</id> | ||
<phase>process-sources</phase> | ||
<goals> | ||
<goal>compile</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>test-compile</id> | ||
<phase>test-compile</phase> | ||
<goals> | ||
<goal>test-compile</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<jvmTarget>11</jvmTarget> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>2.6</version> | ||
<executions> | ||
<execution> | ||
<id>make-assembly</id> | ||
<phase>package</phase> | ||
<goals> <goal>single</goal> </goals> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<mainClass>com.geneticVisualizer.MainKt</mainClass> | ||
</manifest> | ||
</archive> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
<outputDirectory>${project.basedir}/Jar</outputDirectory> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.geneticVisualizer.enums | ||
|
||
|
||
/** | ||
* This enum holds all available crossover strategies. | ||
* @param guiName is the string which is shown in the gui to the user | ||
* @param minimize defines whether this crossover strategy can be used for minimizing | ||
* @param bitString defines whether this crossover strategy can be used for a bit string representation | ||
* @param vector defines whether this crossover strategy can be used for a vector representation | ||
* @author Andrej Schwanke | ||
*/ | ||
enum class Crossover(var guiName: String, var bitString: Boolean, var vector: Boolean) { | ||
/** | ||
* One point crossover can be used for minimization and in a bit string representation | ||
*/ | ||
OnePointCrossover("1-Point-Crossover", true, true), | ||
/** | ||
* Two point crossover can only be used for bit strings | ||
*/ | ||
TwoPointCrossover("2-Point-Crossover",true, false), | ||
/** | ||
* Three point crossover can only be used for bit strings | ||
*/ | ||
ThreePointCrossover("3-Point-Crossover", true, false), | ||
/** | ||
* Four point crossover can only be used for bit strings | ||
*/ | ||
FourTwoPointCrossover("4-Point-Crossover", true, false), | ||
/** | ||
* Five point crossover can only be used for bit strings | ||
*/ | ||
FiveTwoPointCrossover("5-Point-Crossover", true, false), | ||
/** | ||
* Twenty point crossover can only be used for bit strings | ||
*/ | ||
TwentyPointCrossover("20-Point-Crossover", true, false), | ||
|
||
/** | ||
* Arithmetic crossover can only be used for a vector representation and for minimizing a problem | ||
*/ | ||
Arithmetic("Arithmetic", false, true), | ||
/** | ||
* One Point arithmetic crossover | ||
*/ | ||
OnePointArithmeticCrossover("1-Point-Arithmetic-Crossover", false, true), | ||
/** | ||
* Uniform crossover can only be used for a binary representation (in this case) and for minimizing problems | ||
*/ | ||
UniformCrossover("Uniform", true, false) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.geneticVisualizer.enums | ||
|
||
/** | ||
* Enum to hold all available genome representations | ||
* @param guiName is the string which is shown in the gui to the user | ||
* @author Andrej Schwanke | ||
*/ | ||
enum class Genome(var guiName: String) { | ||
/** | ||
* Vector representation is used for real values. | ||
*/ | ||
Vector("Vector"), | ||
|
||
/** | ||
* Binary is used for a bit string representation | ||
*/ | ||
Binary("Binary") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.geneticVisualizer.enums | ||
|
||
/** | ||
* This enum holds all types of optimization goals | ||
* @author Andrej Schwanke | ||
*/ | ||
enum class Goals(var guiName: String) { | ||
/** | ||
* Searching for the maximum in the solution space | ||
*/ | ||
Maximize("Maximize"), | ||
/** | ||
* Searching for the minimum in the solution space | ||
*/ | ||
Minimize("Minimize") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.geneticVisualizer.enums | ||
|
||
/** | ||
* This enum holds all available initial distribution strategies. | ||
* @param guiName is the string which is shown in the gui to the user | ||
* @author Andrej Schwanke | ||
*/ | ||
enum class Initial(var guiName: String) { | ||
Full("Full"), | ||
TopLeft("Top Left"), | ||
TopRight("Top Right"), | ||
BottomLeft("Bottom Left"), | ||
BottomRight("Bottom Right"), | ||
Middle("Middle"), | ||
Zero("Zero"), | ||
Equidistant("Equidistant") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
package com.geneticVisualizer.enums | ||
|
||
|
||
/** | ||
* This enum holds all available mutation strategies. | ||
* @param guiName is the string which is shown in the gui to the user | ||
* @param bitString defines whether this mutation strategy can be used for a bit string representation | ||
* @param vector defines whether this crossover strategy can be used for a vector representation | ||
* @author Andrej Schwanke | ||
*/ | ||
enum class Mutation(var guiName: String, var bitString: Boolean, var vector: Boolean ) { | ||
/** | ||
* Gauss mutation can not be used for bit string representation with strength factor sigma = 0.5 | ||
*/ | ||
GaussMutationSigma0("Gauss-Mutation (σ = 0.5)", false, true), | ||
/** | ||
* Gauss mutation can not be used for bit string representation with strength factor sigma = 1 | ||
*/ | ||
GaussMutationSigma1("Gauss-Mutation (σ = 1)", false, true), | ||
/** | ||
* Gauss mutation can not be used for bit string representation with strength factor sigma = 2 | ||
*/ | ||
GaussMutationSigma2("Gauss-Mutation (σ = 2)", false, true), | ||
/** | ||
* Gauss mutation can not be used for bit string representation with strength factor sigma = 3 | ||
*/ | ||
GaussMutationSigma3("Gauss-Mutation (σ = 3)", false, true), | ||
/** | ||
* Gauss mutation can not be used for bit string representation with strength factor sigma = 4 | ||
*/ | ||
GaussMutationSigma4("Gauss-Mutation (σ = 4)", false, true), | ||
/** | ||
* Gauss mutation can not be used for bit string representation with strength factor sigma = 4 | ||
*/ | ||
GaussMutationSigma10("Gauss-Mutation (σ = 10)", false, true), | ||
/** | ||
* Self adaptation mutation can only be used for vector representation | ||
*/ | ||
SelfAdaptation("Self adaptation", false, true), | ||
/** | ||
* Multiply by 5 can not be used for bit string representation | ||
*/ | ||
Multiply5("Multiply 5", false, true), | ||
/** | ||
* Multiply by 2 can not be used for bit string representation | ||
*/ | ||
Multiply2("Multiply 2", false, true), | ||
/** | ||
* Bit flit mutation can only be used for bit strings | ||
*/ | ||
BitFlip("BitFlip", true, false), | ||
/** | ||
* Inversion mutation can only be used for bit strings | ||
*/ | ||
Inversion("Inversion", true,false), | ||
/** | ||
* Shuffle mutation can be used for bit string and vector | ||
*/ | ||
Shuffle("Shuffle", true, true), | ||
/** | ||
* Swap mutation can be used for bit string and vector | ||
*/ | ||
Swap("Swap", true, true), | ||
/** | ||
* Insert mutation can only be used for bit string | ||
*/ | ||
Insert("Insert", true, false), | ||
} |
Oops, something went wrong.