Image

A walk-through of a CUDA implementation of the classic Conway's Game of Life

Softwar Travel

Conway's game of life is a way of visualizing cellular automation. It is interesting because it is a game that consists of zero players. This means that the evolution is based on the initial state and does not require any input.

There are only 4 rules:
Any live cell with fewer than two live neighbors dies, as if by underpopulation.
Any live cell with two or three live neighbors lives on to the next generation.
Any live cell with more than three live neighbors dies, as if by overpopulation.
Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.

We applied these rules and programmed it in C. The way our implementation stands out from the rest is due to the fact that we programmed it for use with a CUDA GPU allowing for parallel processing.

Conway's game of life is perfect for multi-threading as it is based upon a large array that can be split into multiple smaller arrays individually sent to threads that are updated after every step or 'day'.

Our end result was a significant decrease in processing time that correlates with our initial thoughts.

Categories: Software Tags: #CUDA, #shedthethread