Wirewold cellular automata simulator, running entirely on GPU.

Wireworld-gpu

Wireworld implements the data and rules for the Wireworld cellular automata.

This particular version is an experiment whereby the simulation is run entirely on the GPU using multiple render passes whereby a fragment shader alternates between two framebuffers for input and output. Meaning the output from one render pass becomes the input for the next. The framebuffers contain the simulation state. The fragment shader reads from the input buffer, applies the Wireworld rules and then writes the new state to the output buffer.

Program state can be retrieved as an image and saved to disk.

Programs to be run can be provided by passing the path to an image file as a command line parameter.

The program uses OpenGL v4.2-core with and GLFW 3.3. It has been tested on a GeForce GTX 750 Ti with driver version NVIDIA 436.02. On this system, the simulation runs at a speed of up to ~100KHz.

Usage

$ wireworld-gpu mysim.png

Use the -help flag for an overview of supported options.

The input image is meant to be drawn using a recognized color palette. The fragment shader uses this palette to determine what kind of cell a specific fragment represents.

The default palette is as follows:

Cell State RGB Color
Empty #000000
Wire #015B96
Electron head #ffffff
Electron tail #99ff00

The testdata/palette.gpl file contains a GIMP Palette with the default colors recognized by this program, along with two extra colors you can use to draw annotations.

The color palette can be changed by providing custom RGB values through the respective -pal-??? flags in the command line. These should match the colors used in the input image.

Pixels with unrecognized colors in the input image are ignored and treated as an Empty cell. This allows you to add drawings or text annotations to the image, without it affecting the simulation.

Refer to the testdata directory for examples of images with Wireworld simulations.

Keyboard shortcuts

Key Description
Escape Close the program.
Q Start/Stop the simulation.
E Perform a single simulation step.
W Increase the simulation speed by 10x.
S Decrease the simulation speed by 10x.
F1 Saves the current simulation state in <timestamp>.<inputfile>.png
F2 Loads latest simulation state from <timestamp>.<inputfile>.png where it picks the highest timestamp if more than one such file exists. If no such file is available, this does the same as F5.
F5 Reset the simulation (reloads the original input image).
Space + Mousemove Pan the camera left/right/up/down.
Mouse Scroll Zoom in/out.
C Center the simulation in the window.

License

Unless otherwise stated, this project and its contents are provided under a 3-Clause BSD license. Refer to the LICENSE file for its contents.

Similar Resources

A cloud-native application simulator for golang

Build and upload Docker images Build docker images for main application and work

Aug 10, 2022

Zeonica is a simulator for CGRA and Wafer-Scale Accelerators.

Zeonica Zeonica is a simulator for CGRA and wafer-scale accelerators. ISA Definition Register Space Special registers include: PC: Program Counter. TI

Oct 12, 2022

KEDA is a Kubernetes-based Event Driven Autoscaling component. It provides event driven scale for any container running in Kubernetes

 KEDA is a Kubernetes-based Event Driven Autoscaling component. It provides event driven scale for any container running in Kubernetes

Kubernetes-based Event Driven Autoscaling KEDA allows for fine-grained autoscaling (including to/from zero) for event driven Kubernetes workloads. KED

Jan 7, 2023

Orchestra is a library to manage long running go processes.

Orchestra Orchestra is a library to manage long running go processes. At the heart of the library is an interface called Player // Player is a long ru

Oct 21, 2022

Kubedock is a minimal implementation of the docker api that will orchestrate containers on a Kubernetes cluster, rather than running containers locally.

Kubedock Kubedock is an minimal implementation of the docker api that will orchestrate containers on a kubernetes cluster, rather than running contain

Nov 11, 2022

Carrier is a Kubernetes controller for running and scaling game servers on Kubernetes.

Carrier is a Kubernetes controller for running and scaling game servers on Kubernetes.

Carrier is a Kubernetes controller for running and scaling game servers on Kubernetes. This project is inspired by agones. Introduction Genera

Nov 25, 2022

Running OpenFaas Pro on Linode K8s (feat. Aiven and Pulumi)

Running OpenFaas Pro on Linode K8s (feat. Aiven and Pulumi) Alex Ellis did a great job, when he wrote a tutorial about Event-driven OpenFaaS with Mana

Apr 26, 2022

The OCI Service Operator for Kubernetes (OSOK) makes it easy to connect and manage OCI services from a cloud native application running in a Kubernetes environment.

OCI Service Operator for Kubernetes Introduction The OCI Service Operator for Kubernetes (OSOK) makes it easy to create, manage, and connect to Oracle

Sep 27, 2022

quick debug program running in the k8s pod

quick debug program running in the k8s pod

quick-debug English | 中文 What Problem To Solve As the k8s becomes more and more popular, most projects are deployed in k8s, and so is the development

Apr 1, 2022
gpu-memory-monitor is a metrics server for collecting GPU memory usage of kubernetes pods.

gpu-memory-monitor is a metrics server for collecting GPU memory usage of kubernetes pods. If you have a GPU machine, and some pods are using the GPU device, you can run the container by docker or kubernetes when your GPU device belongs to nvidia. The gpu-memory-monitor will collect the GPU memory usage of pods, you can get those metrics by API of gpu-memory-monitor

Jul 27, 2022
A kubernetes plugin which enables dynamically add or remove GPU resources for a running Pod
A kubernetes plugin which enables dynamically add or remove GPU resources for a running Pod

GPU Mounter GPU Mounter is a kubernetes plugin which enables add or remove GPU resources for running Pods. This Introduction(In Chinese) is recommende

Jan 5, 2023
Nvidia GPU exporter for prometheus using nvidia-smi binary
Nvidia GPU exporter for prometheus using nvidia-smi binary

nvidia_gpu_exporter Nvidia GPU exporter for prometheus, using nvidia-smi binary to gather metrics. Introduction There are many Nvidia GPU exporters ou

Jan 5, 2023
NVIDIA GPU metrics exporter for Prometheus leveraging DCGM

DCGM-Exporter This repository contains the DCGM-Exporter project. It exposes GPU metrics exporter for Prometheus leveraging NVIDIA DCGM. Documentation

Dec 27, 2022
OpenAIOS vGPU scheduler for Kubernetes is originated from the OpenAIOS project to virtualize GPU device memory.
OpenAIOS vGPU scheduler for Kubernetes is originated from the OpenAIOS project to virtualize GPU device memory.

OpenAIOS vGPU scheduler for Kubernetes English version|中文版 Introduction 4paradigm k8s vGPU scheduler is an "all in one" chart to manage your GPU in k8

Jan 3, 2023
gpupod is a tool to list and watch GPU pod in the kubernetes cluster.

gpupod gpupod is simple tool to list and watch GPU pod in kubernetes cluster. usage Usage: gpupod [flags] Flags: -t, --createdTime with pod c

Dec 8, 2021
Planet Scale Robotics - Offload computation-heavy robotic operations to GPU powered world's first cloud-native robotics platform.

robolaunch ?? Planet Scale Robotics - Offload computation-heavy robotic operations to GPU powered world's first cloud-native robotics platform. robola

Jan 1, 2023
AutoGpuAffinity - Auto Gpu Affinity with golang
AutoGpuAffinity - Auto Gpu Affinity with golang

AutoGpuAffinity The idea and concept is from AMIT (repository) Formulas for calc

Dec 15, 2022
kubernetes Display Resource (CPU/Memory/Gpu/PodCount) Usage and Request and Limit.
kubernetes Display Resource (CPU/Memory/Gpu/PodCount) Usage and Request and Limit.

kubectl resource-view A plugin to access Kubernetes resource requests, limits, and usage. Display Resource (CPU/Memory/Gpu/PodCount) Usage and Request

Apr 22, 2022
A web-based simulator for the Kubernetes scheduler
A web-based simulator for the Kubernetes scheduler

Web-based Kubernetes scheduler simulator Hello world. Here is web-based Kubernetes scheduler simulator. On the simulator, you can create/edit/delete t

Dec 22, 2022