Questions tagged [game-of-life]
A cellular automaton simulation following rules devised by mathematician John Conway.
212
questions
47
votes
4
answers
8k
views
Conway's Game of Life in JavaScript
I made Conway's Game of Life in JavaScript and was hoping someone could give me some pointers regarding my logic of checking adjacent cells. I know there must be a better way, but at the same time, it ...
43
votes
7
answers
45k
views
Conway's Game of Life in C++
This is my attempt at Conway's Game of Life. It works, and it's the most complicated program I've made to date. I'm sure it's pretty poorly done. Any ideas on how I can improve on it?
...
35
votes
1
answer
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 ...
28
votes
2
answers
945
views
Life is a Game - Play it
I haven't made a game in Excel yet, so I decided to Make Conway's Game of Life.
If you wish to play along, I've uploaded the workbook here.
Right now it's very rudimentary (No user interface, no ...
23
votes
6
answers
13k
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 ...
22
votes
9
answers
30k
views
Checking for neighbours more elegantly in Conway's Game of Life
My method for counting neighbors in my soon-to-be Game of Life implementation is very repetitive and I was wondering if this could be done more elegantly:
...
16
votes
2
answers
36k
views
Conway's Game of Life in Python
Here's my Python implementation of Conway's Game of Life:
...
15
votes
3
answers
3k
views
A Haskell implementation of Conway's Game of Life, viewable on the console, no external libs
This is a Haskell implementation of Conway's Game of Life.
It plays on a console. It should be able to play a field of any size, but we only give it a glider on a small field to run at this point.
...
14
votes
4
answers
12k
views
'Game of Life' in C#
Unrelated to code:
I have only been programming for three weeks, and this is my first project.
About the code:
Uses a preset grid.
It was all done on a single page. This, I realise, was a mistake, ...
14
votes
3
answers
624
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 (...
14
votes
2
answers
361
views
Conway's Game of Life in J
I have the following code which produces successive generations of Conway's Game of Life:
...
13
votes
1
answer
390
views
A Pythonic implementation of Conway's Game of Life
I've just finished implementing Conway's Game of Life in python-3.6:
...
12
votes
5
answers
5k
views
Coded the Game of Life
I am a beginner to java and I've coded the Game of Life! For those not familiar, the game entails creating a grid of specified dimensions with each box in the grid being either dead or alive. The grid ...
12
votes
1
answer
25k
views
Game of Life in Java
I wrote John Conway's Game of Life in Java:
...
12
votes
1
answer
297
views
Generalized 2D cellular automata simulator
This is a simple Game of Life implementation, with one neat gimmick: You can specify the rules that the simulator uses to decide whether cells should live or die. Congrats, God!
I'd especially like ...
11
votes
5
answers
17k
views
Minimal Game of Life in C#
I want to learn how to write clean code from the start. This is my first project, a 'Minimum Viable Product' implementation of Conway's Game of Life in C#. Mostly I want to know if my code is ...
11
votes
2
answers
2k
views
Game of Life in Haskell
I wondering what people think of this game of life. I don't think it is working properly, but I am interesting in what people think of the general design.
...
10
votes
1
answer
5k
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 ...
10
votes
1
answer
35k
views
Simple Conway's Game of Life implementation in Java
I wrote a simple implementation of Conway's Game of Life in Java using 2 arrays and for loop and used StdDraw library for plotting generations.
It turned out that ...
10
votes
1
answer
588
views
Conway's Game of Life implemented in Python
I'm a Python novice and decided to give Game of Life a try in Python 3:
...
10
votes
1
answer
4k
views
9
votes
6
answers
4k
views
Conway's Game of Life Object oriented implementation in Java
I have designed Conway's Game of Life in Java, the solution follows Object Oriented design and paradigm, please review and let me know the feedback
Class Cell
Cell ...
9
votes
1
answer
1k
views
Conway's game of life in C++ with SDL
This is my attempt at a basic implementation of GOL. The user can add and remove cells with the mouse and some basic stats are printed to console. Any feedback is welcome, but I have a couple of ...
8
votes
3
answers
227
views
Optimise Game of Life in Rust
I recently picked up Rust and was making a CLI for Conway's Game of Life. I got it working but, looking back at it, there are places it could be improved. The main one is the function that generates ...
8
votes
1
answer
835
views
First Java program critique (Game of Life)
As a school project in my navigator 12 class, I've decided to try and learn Java. I thought that I'd try and make the Game of Life, because it would be a good way to start learning Java (watched a ...
8
votes
1
answer
354
views
Game of Life in Scala with a sparse representation
While reviewing another Scala implementation of the Game of Life, I ended up drastically rewriting it. The board is represented as a Set[(Int, Int)] containing the ...
8
votes
2
answers
150
views
Reverse Game of Life
I have written code to take a cellular automaton configuration and determine a state that could have existed one time-step prior, according to Game of Life rules.
The algorithm goes roughly as follows:...
8
votes
4
answers
1k
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-...
8
votes
1
answer
924
views
SDL2.0 Conway's Game Of Life
Yet another Game Of Life implementation code review question
I am attempting to learn SDL, and have a general (beginner) knowledge of c++. I am not a developer by trade so I expect my ...
8
votes
4
answers
1k
views
Python Implementation - Conway's Game of Life
This is my implementation of Conway's Game of Life in Python. Now since I am a novice coder, naturally I have some key doubts:
The usage of idioms and code redundancies - Are there any small ...
8
votes
2
answers
1k
views
Conways Game of Life in cmd batch file
Just for fun I have written a Conway's Game of Life in cmd batch file.
I like writing in batch - its restrictions and limits are its appeal.
However - it is slow, very slow on a large grid. Any tips ...
8
votes
1
answer
877
views
Game of Life - OOP and Best Practices
I always have a problem figuring out what good JavaScript coding practices and conventions are and if I'm following them, especially concerning OOP. So I implemented The Game of Life and wanted to ask ...
8
votes
1
answer
1k
views
Conway's Game of Life python
It's my implementation. Can I get some opinions on it?
...
8
votes
1
answer
703
views
Game Of Life optimization in Java
I've been working on a version of Conway's Game of Life for about a week now. It has loads of features like drawing onto the screen and saving/loading images. The problem is that ever since I added ...
8
votes
1
answer
619
views
Game of life in kivy python
I coded a simulator of the Game Of Life by Conway. I made using Kivy, so that it has a graphical interface.
Any suggestion on how to improve its pythonism or performance would be highly appreciated.
...
8
votes
1
answer
431
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 ...
8
votes
2
answers
3k
views
Graphics in Conway's Game of Life in Java
I recently coded a program to stimulate Conway's Game of Life. Originally, my program just printed an array of 1's and 0's where the 1's represented the "live" cells, but I tried to teach myself some ...
8
votes
2
answers
308
views
Conway's Game of Life F#
I am a C# developer learning F#. Would appreciate any suggestions on how this code can be improved. Main points I am interested in:
Functional style of the code, absense of imperative style(C#) ...
7
votes
2
answers
697
views
Feedback on my Conway's Game of Life
I've been programming for about 4 months now, just trying to learn by myself. I've tried my way with coding the Game of Life here, would like some general feedback as well as some pointers on how I ...
7
votes
3
answers
1k
views
Optimizing Conway's Game of Life in C++
How could I further optimize my implementation of Conway's Game of Life? And how would you critique my current strategies? I'm taking a C++ optimization class, the deadline has passed and my ...
7
votes
1
answer
2k
views
Optimizing very simple piece of “Game of Life” code by taking advantage of NumPy's functionality
Here is the code as it stands right now:
...
7
votes
2
answers
247
views
Conway's Game of Life - Conventional JavaScript?
I'm using the Game of Life Kata to help me learn JavaScript. I've picked up the syntax through Codecademy tutorials, but my current skill level is Novice.
The example code has working functionality ...
7
votes
2
answers
3k
views
Multi-threaded Conway's Game of Life in C++
Here is my implementation of Conway's Game of Life in C++ which takes advantage of multi-threading. I'm using SFML 2.5.1 for a graphics library and CMake. I also use SFML's ...
7
votes
1
answer
800
views
(Yet Another) Conway's Game of Life in Haskell (Naive)
I code Haskell as a hobbyist. I'm interested in feedback on my naive implementation of Conway's Game of Life. Specifically, as stated in the Quick Tour of the website, I am interested in:
Best ...
7
votes
3
answers
3k
views
Implementing Conway's Game of Life
Here is an implementation of Conway's Game of Life. My code is working fine but I want you to review and give me your suggestions of how to improve it.
These are the steps of my code:
Initialize the ...
7
votes
1
answer
563
views
John Conway's Game of Life in C++
I have created Game of Life in C++ SFML. The code works just fine. However since I am not used to working with C++, I implemented a lot of stuff the way I would in python (for example I have not used ...
7
votes
2
answers
193
views
Game of Life state calculation in javascript
I've created a Game of Life implementation in JavaScript with the goal of having it be as fast as possible, with the rendering I'm satisfied (see picture bellow), however the next state calculation is ...
7
votes
1
answer
172
views
Game of life in Go
I wrote the Game Of Life algorithm with Go. There are a million ways that we can implement the algorithm, but I want to know is it implemented in good-way or not?
I wonder how can I improve the ...
7
votes
5
answers
535
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 ...
7
votes
2
answers
320
views
Simulation to find max population of R-pentominos in Game of Life
I'm brand new to Python and I feel my code is really like what coded in Java.
I try to practice python by small problem and that is to find the maximum population of R-pentomino. Wiki says:
...