LGP
LGP: A robust Linear Genetic Programming implementation on the JVM using Kotlin. - Published in JOSS (2019)
Science Score: 93.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
○Committers with academic emails
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Repository
A robust Linear Genetic Programming implementation on the JVM using Kotlin.
Basic Info
Statistics
- Stars: 18
- Watchers: 1
- Forks: 4
- Open Issues: 5
- Releases: 14
Topics
Metadata Files
README.md
LGP
A robust LGP implementation on the JVM using Kotlin.
About
An implementation of Linear Genetic Programming that follows that outlined by Linear Genetic Programming (Brameier, M. F. and Banzhaf, W. 2007).
The framework is implemented in Kotlin which allows for easily interoperability with Java (and other JVM languages), while adding the benefit of modern programming language features.
To get started with how to use the framework, see the documentation.
If you find the framework useful or have any queries, please feel free to:
Installation
Note: The LGP framework requires JDK 8 (Java 1.8).
A JAR containing the core API can be downloaded from the releases page. Each version will have its artefact uploaded here.
Alternatively, the package is available on Maven central, so you can reference the package as a dependency using the format appropriate for your package manager (see here for a full list). For example, to add to an existing Gradle build script:
```gradle repositories { mavenCentral() }
dependencies {
// Core abstractions and components of the LGP framework
compile "nz.co.jedsimson.lgp:core:
// Implementations for core LGP framework components
compile "nz.co.jedsimson.lgp:lib:<VERSION>"
// To get the full source, include the sources package
compile "nz.co.jedsimson.lgp:lib:<VERSION>:sources"
} ```
Tests
The test suite for the framework can be run with the following gradle command:
bash
./gradlew test --info --rerun-tasks
Usage
Examples
A set of example usages can be found in the LGP-examples repository. The examples cover a few different problem configurations, including:
- Programs with a single or multiple outputs
- Reading dataset from a file
- Generating a dataset
- Custom fitness functions
- Usage from Java
Getting started
The framework is built using Kotlin and the easiest way to use it is through the Kotlin API. Instructions for installation and usage of the Kotlin compiler, kotlinc, can be found for the Command Line or IntelliJ IDEA.
Here, we'll focus on how to use the framework through Kotlin (particularly from the command line) but documentation is provided for using the API through Java. This guide assumes you want to directly use the JAR file and not through another build system.
Assuming that kotlinc is installed and available at the command line, the first step is to download the core API JAR file as described in the Installation section. You will also want to download the LGP-lib package which provides implementations of core components, particularly BaseProblem which we will use in this example.
Next, create a blank Kotlin file that will contain the problem definition --- typically this would have a filename matching that of the problem:
bash
touch MyProblem.kt
We're not going to fully define the problem as that would be a needlessly extensive exercise, so we'll simply show how to import classes from the API and build against the imported classes.
In MyProblem.kt, enter the following content:
```kotlin import nz.co.jedsimson.lgp.core.environment.config.Configuration import nz.co.jedsimson.lgp.core.evolution.Description import nz.co.jedsimson.lgp.lib.base.BaseProblem import nz.co.jedsimson.lgp.lib.base.BaseProblemParameters
fun main(args: Array
val problem = BaseProblem(parameters)
println(problem.name)
println(problem.description)
} ```
Here, we use the BaseProblem implementation to use a default set of parameters that we can quickly test against using a data set (which is omitted here).
To compile, we use kotlinc:
bash
kotlinc -cp LGP-core.jar:LGP-lib.jar -no-jdk -no-stdlib MyProblem.kt
This will generate a class file in the directory called MyProblemKt.class. To interpret the class file using the Kotlin interpreter is simple:
bash
kotlin -cp LGP-core.jar:LGP-lib.jar:. MyProblemKt
You should see the following output:
text
My Problem
Description(description=A simple example problem definition)
Please refer to the usage guide for instructions on using the API from the context of a Java program.
Owner
- Name: Jed Simson
- Login: JedS6391
- Kind: user
- Location: New Zealand
- Website: https://www.jedsimson.co.nz
- Repositories: 11
- Profile: https://github.com/JedS6391
JOSS Publication
LGP: A robust Linear Genetic Programming implementation on the JVM using Kotlin.
Tags
JVM Linear Genetic Programming Genetic Programming Machine LearningGitHub Events
Total
Last Year
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jed Simson | j****n@g****m | 431 |
| hw168 | h****8@s****z | 1 |
| Ulrik Guenther | h****o@u****s | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 22
- Total pull requests: 50
- Average time to close issues: 7 months
- Average time to close pull requests: about 21 hours
- Total issue authors: 3
- Total pull request authors: 3
- Average comments per issue: 0.68
- Average comments per pull request: 0.48
- Merged pull requests: 49
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- JedS6391 (18)
- homonecloco (3)
- mmayo888 (1)
Pull Request Authors
- JedS6391 (48)
- skalarproduktraum (1)
- HongyuJerryWang (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
- Total downloads: unknown
-
Total dependent packages: 2
(may contain duplicates) -
Total dependent repositories: 3
(may contain duplicates) - Total versions: 9
repo1.maven.org: nz.co.jedsimson.lgp:core
A robust Linear Genetic Programming implementation on the JVM using Kotlin.
- Homepage: https://github.com/JedS6391/LGP
- Documentation: https://appdoc.app/artifact/nz.co.jedsimson.lgp/core/
- License: MIT License
-
Latest release: 5.3
published over 4 years ago
Rankings
repo1.maven.org: nz.co.jedsimson.lgp:LGP
A robust Linear Genetic Programming implementation on the JVM using Kotlin.
- Homepage: https://github.com/JedS6391/LGP
- Documentation: https://appdoc.app/artifact/nz.co.jedsimson.lgp/LGP/
- License: MIT License
-
Latest release: 5.2
published over 4 years ago
Rankings
repo1.maven.org: nz.co.jedsimson.lgp:lib
A library of implementations for core LGP framework components.
- Homepage: https://github.com/JedS6391/LGP
- Documentation: https://appdoc.app/artifact/nz.co.jedsimson.lgp/lib/
- License: MIT License
-
Latest release: 5.3
published over 4 years ago
Rankings
Dependencies
- com.google.code.gson:gson 2.8.8 implementation
- com.opencsv:opencsv 5.5.2 implementation
- io.github.microutils:kotlin-logging-jvm 2.0.10 implementation
- org.jetbrains.kotlin:kotlin-stdlib-jdk8 * implementation
- org.jetbrains.kotlinx:kotlinx-coroutines-core 1.3.1 implementation
- org.junit.jupiter:junit-jupiter-api 5.8.1 testCompileOnly
- org.junit.jupiter:junit-jupiter-params 5.8.1 testCompileOnly
- com.nhaarman.mockitokotlin2:mockito-kotlin 2.2.0 testImplementation
- org.spekframework.spek2:spek-dsl-jvm 2.0.17 testImplementation
- org.junit.jupiter:junit-jupiter-engine 5.8.1 testRuntimeOnly
- org.spekframework.spek2:spek-runner-junit5 2.0.17 testRuntimeOnly
- com.fasterxml.jackson.core:jackson-databind 2.13.0 implementation
- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml 2.13.0 implementation
- com.fasterxml.jackson.module:jackson-module-kotlin 2.13.0 implementation
- org.jetbrains.kotlin:kotlin-stdlib-jdk8 * implementation
