Skip to content

jacksonsdean/online-interactive-evolution

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published