Giter VIP home page Giter VIP logo

geneticalgo's Introduction

About

This repository is just an experimentation around genetic algorithms.

Most credits on this code goes to github user Murgio, whose code I refactored and optimized. See his Generic Algorithm Montage repository.

What does it do ?

Package fr.jblezoray.mygeneticalgo contains an implementation of a generic algorithm. Then, there are sample applications of the genetic algorithm in packages fr.jblezoray.mygeneticalgosample.*.

sample #1: Hello world

Generates an "hello world" :

Generation    100 (0,00633)--> Ldkmo!xoqlc ! Lc!Lpqek.Lnrul ept!ugmpkdoeno.gu!gaww sewte fmnimzé!damt la cqlpntisklm.er lc ngua hl pbde fydnr fmoressipn.
Generation    150 (0,01639)--> Hdkmo worlc ! Le!Lpsem!Iorum ett!simpmdment bu!gauy sewte flomnzé!damr la colporision.er lc misf hn pbfe avanr imoressipn.
Generation    200 (0,02778)--> Heklo world ! Le!Losem!Ipsum est silpmement cu eauy tewte emokozé!danr la composition.eu la!misc en pafe avant imoressinn.
Generation    250 (0,12500)--> Hemko world ! Le!Lorem Ipsum est simplement cu eaux texte employé!daos la comppsition et la mise en page avant impression.
Generation    300 (0,25000)--> Helko world ! Le!Lorem Ipsum est simplement cu faux texte employé dans la composition es la mise en page avant impression.
Generation    350 (0,33333)--> Hello world ! Le Lorem Ipsum est simplement cu!faux texte!employé dans la composition et la mise en page avant impression.
Generation    400 (0,25000)--> Iello world ! Le Lorem Ipsum est simplement cu!faux texte employé dant la composition et la mise en page avant impression.
Generation    450 (0,25000)--> Hello world ! Le Lnrem Ipsum est simpldment cu faux texte employé dant la composition et la mise en page avant impression.
Generation    500 (0,20000)--> Hello world ! Le Lorem Ipsum est simpldmeot!cu fbux texte employé dans la composition et la mise en page avant impression.
Generation    550 (0,25000)--> Hello world ! Le Lorem Ipsum est sjmpldment cu fbux texte employé dans la composition et la mise en page avant impression.
Generation    600 (0,25000)--> Hello world ! Le Lorem Ipsum est simplfment cu fbux texte employé dans la composition eu la mise en page avant impression.

sample #2: face mashup

Generates a face by combinating instances of itself.

input:

generation 1, 100, 500, 1000, and 2000:

I've tried to optimize the comparison of the generated image with the original one (the fitness evaluation). Here are a list of the algorithms I tried : samples/eval_fitness.pdf (in french !).

sample #3: Generates an images composed of disks

This sample generates an Generates an approximation of an image by composing arbitrary disks.

input:

output:

generation 200, 1000, 2000, 5000, and 10000:

How to run ?

Install a java jdk >=8 and maven >=3.0.5.

First, compile the project :

$ mvn package

Run sample #1 (helloworld) :

$ java -cp target/myGeneticAlgo-0.0.1-SNAPSHOT.jar fr.jblezoray.mygeneticalgosample.helloworld.Main

Run sample #2 (facemashup) :

$ mkdir statusDir
$ java -cp target/myGeneticAlgo-0.0.1-SNAPSHOT.jar fr.jblezoray.mygeneticalgosample.facemashup.Main samples/facemashup/match.png samples/facemashup/mask.png statusDir

The statusDir contains intermediate results.

Run sample #2 (disksimage) :

$ mkdir statusDir
$ java -cp target/myGeneticAlgo-0.0.1-SNAPSHOT.jar fr.jblezoray.mygeneticalgosample.disksimage.Main samples/disksimage/monalisa_croped.png statusDir

Have fun !

geneticalgo's People

Contributors

jblezoray avatar

Stargazers

Melike Ateş Karayol avatar Siyuan Zhang avatar Muriz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.