Git Product home page Git Product logo

evodoodle's Introduction

Evodoodle

Draw your own custom landscapes and watch as your species evolves across them! Evodoodle is a drawing game for learning how evolution plays out across landscapes. Evodoodle allows you to control population density, connectivity, and selection across space and then simulates evolution using Geonomics, a powerful landscape genomic simulation package.

Setup

First, clone or download this repository. Once inside the evodoodle directory, you can then use the evodoodle.yml file to set-up a conda environment and install the required packages

conda env create -f evodoodle.yml
conda activate evodoodle

You can also manually install the required packages:

pip install numpy
pip install matplotlib
pip install seaborn
pip install geonomics
pip install pygame

Or use the Docker image:

 docker pull ghcr.io/anushapb/evodoodle:latest

If you are using Visual Studio Code and have Docker installed on your computer, this repository is set-up so that you can open it within a container with everything ready-to-go. First, clone or download this repository. Then, in VS Code:

  1. Install the Dev Containers extension
  2. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
  3. Type "Remote-Containers: Open Folder in Container..." and select it
  4. Navigate to and select the evodoodle folder

For more detail instructions see here.

Quick start

To start evodoodle, simply run the following code. Whenever draw_landscape() is run a pop-up will appear that allows you to draw on a landscape. Once you have drawn your landscape, click SAVE and the code will continue:

import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns 
import geonomics as gnx
from evodoodle import init_mod, draw_landscape, edit_landscape, plot_popgen, plot_landscapes
from gnx_params import params
import geonomics as gnx

# Draw landscapes
population_size = draw_landscape(d = 10)
connectivity = draw_landscape(d = 10)
environment = draw_landscape(d = 10)

# Plot the landscapes
plot_landscapes(population_size, connectivity, environment)

# Start the model
mod = init_mod(params, population_size, connectivity, environment)

# Run the model for 200 steps
mod.walk(200)

# Plot the results
plot_popgen(mod)

# From here you can continue to run the model for more steps and plot the results

For a more in-depth walkthrough and some fun challenges, check out the evodoodle_notebook.ipynb jupyter notebook

evodoodle's People

Contributors

anushapb avatar

Stargazers

 avatar Drew Terasaki Hart avatar

Watchers

Drew Terasaki Hart avatar  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.