Git Product home page Git Product logo

evolve's People

Contributors

davidventura avatar infoburp avatar tux3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evolve's Issues

Polygon count stays at 5

Just updated from git. Was a new method implemented? Either the polygon count is bugged and says 5 all the time or maybe it's just using only 5 polygons? When I started the render it jumped up to around 30 but then leveled out to 5.

nicer focus selection method

It would be nice to be able to drag out a bounding box on either the original or best image and have this set as the focus area.

Strange export streaks issue.

When you're evolving it in the program, it looks fine:
screenshot 2696

However, using save image or save as svg results in some weird streaks in the output.
huh

alternative evolution method

start with a random grid of joined polygons with random colours

move intersection vertices until image matches

creates image with no gaps between polygons and no polygon overlaps

polygon bounding

add check to make sure polygons have no vertices outside bounding box (same size as original image)

intelligent image split

split image into a quadtree of regions with similar detail level

for each region, launch a thread and evolve a solution (give more processor time to more detailed regions)

larger + more advanced genepool

evolve lots of dna in parallel.

create a generation set with lots of dna strands

mate the most fit dna strands together

mutate the most popular dna strands

Doesn't build with clang

I understand this project is probably abandoned but here's a patch if you want to build it in Clang on OS X

Pretty fun

screen shot 2015-03-18 at 3 47 05 pm

diff --git a/Evolve.pro b/Evolve.pro
index 9ed32f1..b81b409 100644
--- a/Evolve.pro
+++ b/Evolve.pro
@@ -37,5 +37,5 @@ FORMS    += widget.ui \
 CONFIG += c++11

 QMAKE_CXXFLAGS_RELEASE += -O3 -flto -march=native -mmmx # Crashes on some computers
-QMAKE_CXXFLAGS_DEBUG += -Og -g -march=native -mmmx # Crashes on some computers
+QMAKE_CXXFLAGS_DEBUG += -march=native -mmmx # Crashes on some computers
 #QMAKE_CXXFLAGS_DEBUG += -Og
diff --git a/settings.cpp b/settings.cpp
index 6eb53ea..20e2bce 100644
--- a/settings.cpp
+++ b/settings.cpp
@@ -1,7 +1,7 @@
 #include "settings.h"

 bool AUTOFOCUS_ENABLED = false;
-int AUTOFOCUS_SUBDIVS = 4, AUTOFOCUS_DELAY=1000;
+int AUTOFOCUS_DELAY=1000;

 int N_POLY_POINTS = 6;
 int N_COLOR_VAR = 5;
@@ -9,7 +9,6 @@ int N_POS_VAR = 15;
 int SHAPE_OPT_FREQ = 0;
 int GUI_REFRESH_RATE = 4;
 int AUTOFOCUS_RES = 2;
-int N_CORES = 4;

 int FOCUS_LEFT=0, FOCUS_RIGHT=100, FOCUS_TOP=0, FOCUS_BOTTOM=100;

diff --git a/settings.h b/settings.h
index 1f48a06..0c40518 100644
--- a/settings.h
+++ b/settings.h
@@ -2,7 +2,8 @@
 #define SETTINGS_H

 extern bool AUTOFOCUS_ENABLED;
-extern int AUTOFOCUS_SUBDIVS, AUTOFOCUS_DELAY;
+const int AUTOFOCUS_SUBDIVS = 4;
+extern int AUTOFOCUS_DELAY;

 extern int N_POLY_POINTS;
 extern int N_COLOR_VAR;
@@ -14,7 +15,7 @@ extern int GUI_REFRESH_RATE;
 extern int AUTOFOCUS_RES;
 extern int FOCUS_LEFT, FOCUS_RIGHT, FOCUS_TOP, FOCUS_BOTTOM;

-extern int N_CORES;
+const int N_CORES = 4;

 extern int POLYS_MIN, POLYS_MAX;

diff --git a/settingswidget.cpp b/settingswidget.cpp
index 83fdafd..aa9d437 100644
--- a/settingswidget.cpp
+++ b/settingswidget.cpp
@@ -64,11 +64,11 @@ void SettingsWidget::okClicked()
     FOCUS_BOTTOM = ui->focusBottom->value();
     SHAPE_OPT_FREQ = ui->shapeOptFreqSpin->value();
     GUI_REFRESH_RATE = ui->guiRefreshSpin->value();
-    N_CORES = ui->coreSpin->value();
+    /*N_CORES = ui->coreSpin->value();*/
     POLYS_MIN = ui->minPolySpin->value();
     POLYS_MAX = ui->maxPolySpin->value();
     AUTOFOCUS_ENABLED = ui->autofocusEnable->isChecked();
-    AUTOFOCUS_SUBDIVS = ui->autofocusSubdivs->value();
+    /*AUTOFOCUS_SUBDIVS = ui->autofocusSubdivs->value();*/
     AUTOFOCUS_DELAY = ui->autofocusDelay->value();
     Widget::setAutofocus(AUTOFOCUS_ENABLED);
     close();
diff --git a/widget.cpp b/widget.cpp
index 1106e4c..c1c6ab3 100644
--- a/widget.cpp
+++ b/widget.cpp
@@ -3,6 +3,7 @@
 #include "settings.h"
 #include "settingswidget.h"
 #include "analysis.h"
+#include <xmmintrin.h>
 #include <QDataStream>
 #include <QString>
 #include <QPixmap>
@@ -164,8 +165,8 @@ quint64 Widget::computeFitness(const QImage& target)
             // Sum of the differences of each pixel's color
             for (unsigned j=0; j+8<BPL; j+=8)
             {
-                __m64 mmOrig = _m_from_int64(*(quint64*)(origData+curLine+j));
-                __m64 mmTarget = _m_from_int64(*(quint64*)(targetData+curLine+j));
+                __m64 mmOrig = _m_from_int(*(quint64*)(origData+curLine+j));
+                __m64 mmTarget = _m_from_int(*(quint64*)(targetData+curLine+j));
                 tmp = _m_psadbw(mmOrig, mmTarget);
                 mmFitness = _mm_add_si64(mmFitness, tmp);
             }

Bottom half of image ignored bug

The upper half of the generated image appears to get much more detailed than the bottom half even when not using focus at all. Focusing exclusively on the bottom half stops the fitness from increasing altogether.
bug
bug2

add video conversion script

ffmpeg -i input.mp4 frame%04d.png

for f in *.png; do
./Evolve "$f"
done

ffmpeg -i %05d.render.png output.mp4

audio handling

I've been thinking about audio a bit.

Instead of polygons, we could have sounds, each sound would have a waveform (sine, saw, square wave), length, pitch and startpoint.

Then these could evolve similar to the image version, with the resulting sound checked against the original.

better mutations

add mutation types:

completely random mutation (fresh dna)
move a vertex
change a polygon colour
delete a polygon
add a polygon
move polygon up stack
move polygon down stack

max polygons

add setting for maximum number of polygons in rendered image

After enabling autofocus application crashes a few seconds later

[parker@x3720 Evolve]$ QT_STYLE_OVERRIDE=gtk ./Evolve
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setPen: Painter not active
QPainter::drawRects: Painter not active
QPainter::end: Painter not active, aborted
Floating point exception (core dumped)

Latest git
Arch x86_64
qt 5.4.1-2

Some images crash the programm

Don't know what is so special about certain images, but with some the programm crashes
Win7 x64, also im not the only one who has this issue

SVG and DNA export darken image!

If you export the DNA and then reimport it, the image is darker than before, as if some polygons had different brightness or alpha, the fitness value is also lower than before. If you then start the process, many areas of the image will be reconstructed respectively.

Another example to show this:
If you export a PNG and an SVG, then export and reimport the DNA, and then export a second png and a second SVG, you will notice that the two PNGs look different. The second one is darker, as mentioned before. The SVGs, however, looks exactly the same and both show the darker version that the second PNG shows.

This is really a pity because the program is generelly really nice, but its most interesting features, the SVG and DNA export both seem to have this bug.

focus bug

setting focus box dimensions to 0 or negative crashes application

problem image

this image randomly stops on the dev branch and freezes on focus in master

Process image as grid instead of all at once

The all at once method is intensive while focusing on square tends to provide a quicker result. Maybe have a way to split the image into a grid and process one cell at a time.

Mutation count

There should be a count of how many times it has found a more beneficial mutation, similar to the web evolver's mutation count. It would be nice when the polygon count has hit its limit and you don't really know if it's still working or has malfunctioned but still increases the generation.

favour low polygon solutions

add a function to the fitness calculation so that images with the same fitness but less polygons have higher overall fitness

botnet

some kind of decentralised computing thing for sharing render compute time

autosave feature

Evolve it's crashing too much.
An option to autosave the .dna file every n seconds would be good.

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.