The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [game-of-life]

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

Filter by
Sorted by
Tagged with
7
votes
2answers
277 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: ...
7
votes
1answer
582 views

JavaScript implementation of Conway's Game of Life

It took some time to make Conway's Game of Life in HTML, CSS, JavaScript and jQuery. I'd like suggestions, criticisms, and discussions on how it can be done better. JSFiddle link ...
4
votes
1answer
443 views

Conway's Game of Life

Inspired by this post, I decided to try to implement my own Conway's Game of Life. I started with a non-warping board: ...
7
votes
1answer
583 views

Game of Life rules in 14 lines of Python

I've attempted a functional solution to Conway's Game of Life in Python. The example code allows you to see the next generation of the universe by calling the ...
2
votes
0answers
499 views

Node JS Beginner's CLI Game of Life

I have finished writing my first Node.js app: a CLI app that runs Conway's Game of Life. I am looking for feedback on things that might not have been done the "Node.js way" and what I can do to better ...
5
votes
1answer
443 views

Game of Life in Python 2.7.10

Conway's Game of Life is a common problem. I had to write a version of it to get my current C# job, so I thought it would be a nice way to get into Python (especially as the example in the book are a ...
3
votes
1answer
158 views

Another Conway's Game of Life in Haskell

Curious what people think about this implementation of Conway's Game of Life in Haskell. ...
4
votes
1answer
385 views

Simple Game Of Life with infinite size

I decided to try make a version of the Game Of Life that'd be infinitely big. The idea was to store a dictionary of each Y value, which contain a set of X values (for fast lookup), as opposed to ...
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 ...
12
votes
1answer
252 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 ...
6
votes
1answer
770 views

Game of life in F#

First attempt at doing anything F#-y from a very heavy C# background, think I've grasped the fundamentals of FP, but always good to get other eyes on it: ...
5
votes
1answer
1k views

Attempt on Conway's “Game of Life”

This is my attempt on the Conway's "Game of Life" using C++. The code is functional but I am sure most aspects of the code might have been poorly constructed as I am fairly new at this. Please give ...
2
votes
2answers
2k views

Counting Neighbors (Why scipy.signal.convolve2D so fast?)

Here is my Python implementation of counting neighbours of Game of Life with radius as parameter. ...
8
votes
2answers
2k 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
4answers
743 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-...
7
votes
1answer
529 views

Conways game of life in Haskell

I started with Haskell some months ago, but didn't really use it since then. As a simple training I implemented Conways game of life. What/How could it be improved? ...
6
votes
1answer
584 views

Emulating Conway's Game of Life using JavaScript

I am currently reading Eloquent JavaScript and am trying to solve the exercise problems. One of the exercises in Chapter 18 asks to emulate Conway's Game of Life using checkboxes in JavaScript. ...
5
votes
2answers
211 views

Counting Colors in Conway's Game of Life

I have a basic version of CGoL running with pdCurses. My goal was to have each newly spawned cell take on the dominant color of their neighbors (if a spawned cell is mostly surrounded by red, make it ...
1
vote
2answers
97 views

Problems with efficiency with the Game of Life

To help prepare myself for my final exam, I wrote a simple Game of Life. I want to expand it to have each sub-population represented by a character, but before I do that, I want to make it more ...
2
votes
0answers
458 views

Game of life in JavaScript - using Table

I finished coding Conway's Game of Life in JavaScript and HTML table. logic cells in a table will be assigned with unique id's and based on the ...
5
votes
3answers
698 views

Pythonic implementation of Conway's Game of Life

I've just finished with my python implementation of Conway's Game of Life. Can I get some opinions on it? ...
0
votes
1answer
91 views

Game of life C++ implementation memory access bug [closed]

I'm learning C++ so I thought I'd make game of life for practice and explore pointers, 1.5D arrays and stuff like that. I have "finished" my implementation, but I have trouble with memory access. It ...
5
votes
3answers
331 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. ...
7
votes
1answer
7k views

Conway's Game of Life in Python3

I've implemented Game of Life in Python for a programming problem, in two different versions: one is a simple script and the other uses a class with a dictionary to initialize the various parameters. ...
5
votes
1answer
335 views

Conway's Game of Life simulation

I went ahead and quickly typed this up and am unsure on how to improve. How could this be optimized? Note: there are some functions from a custom library here that do exactly what they sound like they ...
5
votes
2answers
1k views

Game of Life class

I'm a beginner in C++, and I'd like you to review the class I wrote for the Game Of Life. GameOfLife.h ...
2
votes
2answers
287 views

Generic and elegant Game of Life engine

This Python module is supposed to be a generic engine for games of life. By generic, I mean that it is supposed to be able to handle different kind of rules (not just Conway's) and graphs (not just ...
6
votes
1answer
1k views

Object-oriented Conway's Game of Life

I have Conway's Game of Life working now and was hoping for direction on: Unclear code - where would comments make it clearer? Poor design choices - I already know of one in the ...
3
votes
2answers
1k views

Game of Life Neighbour count optimization

This is a working Neighbours method. Is there any way to make this simpler and concise? ...
2
votes
1answer
223 views

Game of Life with exceptional Neighbours

As it currently stands the code works fine. Is there a way to optimize the code in the class Neighbours? What I have done was to copy the code for each of the ...
3
votes
1answer
272 views

Conway's Game of Life without objects

I was wondering if anyone could provide some feedback on my solution to Conway's game of life. I tried to solve it without using objects. It returns a dictionary of living points on a grid and points ...
7
votes
1answer
246 views

Functional Game of Life implementation in Ruby

We ran a Code Retreat day at Hacker Paradise this Saturday, and I was pretty happy with my eventual solution. It's written in Ruby, but would work reasonably well in JS/CS and is (hopefully) ...
7
votes
1answer
559 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 ...
6
votes
3answers
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 ...
5
votes
1answer
413 views

A simple version of Conway's Game of Life using ASCII art

I'd like a general review of my version of Conway's Game of Life. Right now, it's very simple, and doesn't lead to anything interesting yet, as the "seed" generation is randomly generated and small; ...
21
votes
9answers
21k 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: ...
3
votes
2answers
2k views

Game of Life generation procession algorithm

I've tried to make Game of Life in console and this is the algorithm I used to generate new generation: ...
8
votes
1answer
802 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 ...
3
votes
2answers
2k views

Optimizing Conway's Game of Life code to run faster

How could I take this code and optimize it so that I could possibly run Conway's Game of Life on a large grid at 15 frames per second? ...
40
votes
7answers
33k 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? ...
7
votes
1answer
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
2answers
658 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
2answers
222 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 ...
14
votes
3answers
582 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 (...
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 ...
15
votes
2answers
33k views

Conway's Game of Life in Python

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

Speedups for Conway's Game of Life

I wrote Conway's Game of Life in Python with Pyglet. It works pretty well but is very slow when the number of cells gets high. Any easier speedups I can attain with this code? ...
11
votes
5answers
16k 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 ...
8
votes
1answer
661 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 ...
7
votes
1answer
3k views

Game of Life implementation in Haskell

I've written a small Game of Life module in Haskell, as well as a small testing application. I'm relatively new to the language, so any kind of comment about the code is welcome. The most important ...