Questions tagged [game-of-life]

A cellular automaton simulation following rules devised by mathematician John Conway.

Filter by
Sorted by
Tagged with
20
votes
6answers
11k views

Optimize Conway's Game of Life

I have coded up an implementation of Conway's Game of Life and I have a performance bottleneck in it which I wish to be optimized. The main logic is in the Universe ...
4
votes
2answers
3k views

Python - Game Of Life

Here is my implementation of John Conway's Game of Life in Python: ...
30
votes
1answer
4k views

Full-color clone of Conway's Game of Life, with a decent GUI

I wrote this to learn JavaFX, and as an excuse to re-make the Game of Life. This is the most complex GUI I've ever written, so I'd like feedback mainly on it, but I'll welcome any criticism! My ...
10
votes
1answer
2k views

Game of Life with NumPy

I started this exercise with NumPy with a goal to find neighbors and return the new matrix. I want to get your feedback. Here's an example from this website. It looks like it's \$O(N^2)\$, and I'm ...
14
votes
2answers
32k views

Conway's Game of Life in Python

Here's my Python implementation of Conway's Game of Life: ...
8
votes
1answer
325 views

Grid displayer: Game of Life and Langton's Ant

Re-use Given that both the Langton's Ant and the Game of Life use a grid, I decided to code a generic grid_diplayer code and use it both for GoL (Game of Life) and ...
7
votes
5answers
448 views

Conway's Game of Life and Other Lifelike Cellular Automata Rules

This simulator visualizes Conway's Game of Life and other lifelike cellular automata rule-sets. Features: You can choose from any of the preselected birth/survival thresholds or specify custom ...
14
votes
3answers
580 views

Suggestions needed after modification of Simulation of an Ocean

After suggestions given in this question, modifications to the code has been done. Only thing I could not do is to decide, where to place the starveTime property (...
5
votes
2answers
868 views

Simple implementation of Conway's game of life with SFML

This is a very simple version of Conway's game of life. It treats the edge of the grid as dead cells and uses a very basic algorithm. Despite this it works fine. As people might not have the SFML ...
3
votes
1answer
2k views

Game Of Life rewritten into two classes, PetriDish and Cell

Follow-up to: Game Of Life implemented with for-loops and a boolean-array As proposed by palacsint I went on and rewrote my implementation of the Game Of Life and extracted everything into two ...
3
votes
1answer
366 views

Game of Life improvement

I have finished my code for Conway's Game of Life. I am looking for any advice on how to improve it. I am a C++ beginner, so I used only basic libraries. I am accepting all suggestions. ...
2
votes
1answer
3k views

Game Of Life implemented with for-loops and a boolean-array

There's a Follow-up: Game Of Life rewritten into two classes, PetriDish and Cell I wrote an implementation of the Game Of Life using the easiest approach, a bunch of loops and a boolean array. Yet I ...
8
votes
4answers
728 views

Another Conway's Game of Life Simulation (With colored populations!)

This is my near-final version of Conway's Game of Life, with inherited colors using PDCurses. Any new spawned cells take on the most frequent color surrounding it when it spawns. This leads to single-...
6
votes
2answers
1k views

Conway's Game Of Life in Python 3 using tkinter

I have used tkinter in Python 3 to create my own version of Conway's Game of Life. What could I do better in terms of optimisation of speed and memory and PEP8 and cleaning up my code? Also, what ...
5
votes
1answer
186 views

Game of Life in Ruby

I think Ruby is kinda interesting, so did this Game of life implement in Ruby. I am wonder is there is some magic in Ruby can let my code more elegant. I am a python coder and I think my Ruby kinda ...
5
votes
3answers
329 views

Conway's Game of Life (follow-up)

I asked for a review of my code, and after making the suggested changes I feel that now the OOP version is clearer in its meaning and overall the code looks cleaner. ...
5
votes
3answers
632 views

Critique my Clojure “Game of Life” code

I'm a Clojure n00b (but am experienced with other languages) and am learning the language as I find time - enjoying it so far, though the strange dreams and accidental use of parenthesis elsewhere (e....
4
votes
1answer
1k views

Conway's Game of Life in F#

Since I'm learning F# along with functional programming, I managed to implement the rules for Conway's Game of Life. I'm not sure if I can improve some of its parts, though. For example, the ...
3
votes
2answers
186 views

Compact game of life implementation

I am learning F# and implemented Conway's Game of Life as an exercise (There are also other implementations on CodeReview). I have tried to forget all my object-oriented background and practice "...