All Projects → JedS6391 → LGP

JedS6391 / LGP

Licence: MIT license
A robust Linear Genetic Programming implementation on the JVM using Kotlin.

Programming Languages

kotlin
9241 projects
TeX
3793 projects

Projects that are alternatives of or similar to LGP

generator-jvm
Generate JVM (java, kotlin, scala) project with gradle / maven / sbt build systems and docker / docker-compose for rapid development
Stars: ✭ 40 (+185.71%)
Mutual labels:  jvm
darkseer
Experimental JVM profiler for analyzing real-world memory allocations
Stars: ✭ 13 (-7.14%)
Mutual labels:  jvm
SevenFacette
7Facette is an open-source multiplatform test automation library supporting JVM and JS.
Stars: ✭ 28 (+100%)
Mutual labels:  jvm
pikt
🎨 Image-based poetic programming language.
Stars: ✭ 72 (+414.29%)
Mutual labels:  jvm
turtle
Run shell commands from a Kotlin script or application with ease
Stars: ✭ 128 (+814.29%)
Mutual labels:  jvm
kdl4j
KDL Parser for the JVM
Stars: ✭ 16 (+14.29%)
Mutual labels:  jvm
rake
A Java library for Rapid Automatic Keyword Extraction (RAKE) 🍂
Stars: ✭ 23 (+64.29%)
Mutual labels:  jvm
jellyfin-sdk-kotlin
Kotlin SDK for Jellyfin, supporting Android and JVM Targets
Stars: ✭ 43 (+207.14%)
Mutual labels:  jvm
gctoolkit
Tool for parsing GC logs
Stars: ✭ 1,127 (+7950%)
Mutual labels:  jvm
JVMByPython
《自己动手写Java虚拟机》JVM的python实现
Stars: ✭ 110 (+685.71%)
Mutual labels:  jvm
geneal
A genetic algorithm implementation in python
Stars: ✭ 47 (+235.71%)
Mutual labels:  genetic-programming
2p-kt
A Kotlin Multi-Platform ecosystem for symbolic AI
Stars: ✭ 52 (+271.43%)
Mutual labels:  jvm
review-notes
团队分享学习、复盘笔记资料共享。Java、Scala、Flink...
Stars: ✭ 27 (+92.86%)
Mutual labels:  jvm
Latte-lang
100% Java compatibility and Functional Programming.
Stars: ✭ 128 (+814.29%)
Mutual labels:  jvm
linux.gpio.clj
Use the standard Linux GPIO API from Clojure JVM
Stars: ✭ 24 (+71.43%)
Mutual labels:  jvm
library-template-jvm
A Kotlin/JVM library template (with a sample project).
Stars: ✭ 46 (+228.57%)
Mutual labels:  jvm
play-scala-streaming-example
Example Play application showing Comet and Server Sent Events in Scala
Stars: ✭ 42 (+200%)
Mutual labels:  jvm
wasm.cljc
Spec compliant WebAssembly compiler, decompiler, and generator
Stars: ✭ 178 (+1171.43%)
Mutual labels:  jvm
arquillian-graphene
Robust Functional Tests leveraging WebDriver with flavour of neat AJAX-ready API
Stars: ✭ 91 (+550%)
Mutual labels:  jvm
rxjava2-http
Transmit RxJava2 Flowable over http with non-blocking backpressure
Stars: ✭ 19 (+35.71%)
Mutual labels:  jvm

LGP

A robust LGP implementation on the JVM using Kotlin.

license docs build code-coverage maven-core maven-lib DOI

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:

repositories {
    mavenCentral()
}

dependencies {
    // Core abstractions and components of the LGP framework
    compile "nz.co.jedsimson.lgp:core:<VERSION>"
    // To get the full source, include the sources package
    compile "nz.co.jedsimson.lgp:core:<VERSION>:sources"
    
    // 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:

./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:

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:

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<String>) {
    val parameters = BaseProblemParameters(
        name = "My Problem",
        description = Description("A simple example problem definition"),
        config = Configuration()
    )

    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:

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:

kotlin -cp LGP-core.jar:LGP-lib.jar:. MyProblemKt

You should see the following output:

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].