Giter Site home page Giter Site logo

online-interactive-evolution's Introduction

Online Interactive Evolutionary Gallery

Project by Jackson Dean for UVM CS 205
Available online at: interactive.evolutionary.gallery

Instructions to run locally

With Docker

docker-compose up in the project directory
Navigate to localhost:3000

Without Docker

Run the frontend from the "frontend" directory with
npm i
npm run start-local
and the backend from the "backend" directory with
python -m pip install -r requirements.txt
python local_server.py
Once the backend and frontend are running, navigate to localhost:3000

Instructions

Interactive Evolutionary Gallery is a visual art project inspired by Evolutionary Algorithms and Picbreeder.

The images represent an individual in a population of genomes. The population evolves over generations as some individuals survive to reproduce and others do not.

Genomes are Compositional Pattern Producing Networks (CPPNs). A CPPN contains nodes and connections and is evaluated similar to an artificial neural network to produce an image called the phenotype. Nodes contain activation functions, which determine how that node adds to the phenotype. Connections connect nodes and have weights, which determine how much the node at the beginning of the connection contributes to the image.

Your job is to decide which individuals survive to reproduce. Click to select your favorite images in the population and then click Next generation to see the results. The individuals that you selected will survive unchanged in the next generation. The rest of the population is replaced with the offspring of the survivors.

Some offspring are produced via asexual reproduction. The remainder are produced via crossover. Asexual reproduction produces offspring through mutation of an individual's genome. Crossover combines the genomes of two parents to create a new genome. Choose the ratio of offspring created by crossover vs. asexual reproduction in the settings.

Mutations are small changes to a genome during reproduction. In the case of a CPPN, we can add connections or nodes to the network or remove them from the network. Adding nodes/connections increases the complexity of the phenotype image, while removing them reduces complexity. Mutations can also change a node's activation function or the weight of a connection. You can change the rate of the various mutations in the settings.

If you advance a generation and decide you'd rather go back to try again, press the Previous generation button. Images can be saved to your computer at a higher resolution by selecting the individuals and pressing Save images. Press Reset to start over with a new random population.

CI/CD Pipeline

  • Two branches: main and development
  • Githooks prevent broken code from being pushed to main
    • Both warnings and errors cause hooks to fail on main branch
    • Only errors cause hooks to fail on development branch
    • Commits on development branch trigger tests
    • Commits on main branch trigger both build and tests
  • Main branch is periodically rebased with development branch
  • Mirroring repository from GitHub to GitLab
  • GitLab runs CI/CD pipeline with build and tests, emails on failure

Front-end

  • Pre-commit hook checks for code complexity using xenon (built on radon) and fails if complexity rating is worse than B (absolute) A (modules) or A (average)
  • Pre-commit hook checks for code quality using pylint and fails if complexity rating is worse 8.0
  • Amazon Web Services (AWS) Amplify pulls from GitHub repo
  • AWS builds and deploys repo (main branch)
  • Pull requests on main trigger a preview build on AWS

Back-end

  • GitHub Action pushes changes to the python server code to AWS

online-interactive-evolution's People

Contributors

jackson-uvm avatar jacksonsdean avatar

Stargazers

 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.