Quantcast
Channel: Active questions tagged conways-game-of-life - Stack Overflow
Browsing latest articles
Browse All 55 View Live
↧

What traversal is more probable to keep tree balanced

I am trying to simulate Conway's game of life. I am representing the 'Live cells' as a coordinate vector (x, y). The initial live cells are inserted into a kd tree (k=2) such that it is perfectly...

View Article


An array of classes where you pass the neighbors (Conways GoL)

i tried to create the 'Conweys game of life'. So at first i create a empty (null) arrays of tile's. Then i set a list for each neightbour tile to commit it on the creating tile on this place of the...

View Article


How to implement Conway’s Game of Life using a quadtree in Java?

I am trying to implement Conway’s Game of Life using a quadtree data structure in Java. I have a QuadTree class that stores points in a two-dimensional space, and each point has a Cell object as its...

View Article

My canvas won't refresh corectly in a loop with a delay

so I'm programming Conway's game of life with JavaFX, and I have a problem.The grid is represented with a Canvas. I made a method that update the canvas after a value changed in the grid, and a method...

View Article

Issues with matplotlib Func.Animation

I'm trying to do some animation with matplotlib (Conway's game of life, to be specific) and have some problems with the .FuncAnimationI figured out different cases which partly worked (but not the way...

View Article


My code run very very slow. How can I make my python code that runs faster?...

please help me.I wrote a program to run "Game of Life" with PyQt6 but, it runs very very slow. How can I make it faster?What about using multiple cores of the CPU? How can a Python program run on...

View Article

A function for counting neighbors in a multidimensional array for the Game of...

i writing Game of Life using c++ and multidimensional array for this.its code:#include <iostream>#include <windows.h>#include <cstdlib>using namespace std;const int mapSize = 10;int...

View Article

setBackground method doesn't seem to be working

So I'm trying to build conways game of life and everything works except when I update the background color on the label when it needs to be changed to black or white. When I click on the labels they...

View Article


Why the expected output starts with 0 and not 1 on this code challenge?

Game of Life StringsThe universe of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, each ofwhich is in one of two possible states, alive or dead. Every cellinteracts...

View Article


1D Game of Life - What should my range be?

We've been tasked with writing a program which simulates a 1-dimensional Game of Life. We are supposed to create a spider pattern. I've gotten this to work, however there needs to be an obscene amount...

View Article

Need help converting grid to string

I want to converting a list to string for an assignment. I can convert 1 row, however my teacher wants us to convert 3 separate rows to make a grid for the game of life. I've tried a bunch of different...

View Article

Optimizing Conway's 'Game of Life'

To experiment, I've (long ago) implemented Conway's Game of Life (and I'm aware of this related question!).My implementation worked by keeping 2 arrays of booleans, representing the 'last state', and...

View Article

Vertical lines when exporting jpeg file in libjpeg c++

I don't understand why when i export to jpeg i get vertical lines every 1080 pixels. what am i doing wrong?full repo -> https://github.com/ElPettego/swg_bgvertical lines example ->...

View Article


Implementing scrolling on an infinite grid for Conways game of life using...

I've set up an 'infinite' grid for Conway's Game of Life using a Set object to store only the coordinates of active cells. I've implemented scrolling by applying a fixed offset to the X and Y...

View Article

Image may be NSFW.
Clik here to view.

How to dynamically scale predefined patterns in Conway's Game of Life to fit...

I'm working on a script for Conway's Game of Life that initializes the grid with predefined patterns. These patterns are read from a JSON file which includes data specifying the pattern layout and the...

View Article


How to escape stable pattern in conway's game of life?

I built conway's game of life and its working fine but my game after many generations is either ending with no lives or reaching a stable pattern which it can't escape.For example I have followed these...

View Article

Conway's Game of life assymetric array issue

Recently I have been making Conway's Game of Life in c++. When I was finishing GUI of the game in Qt, I realised that I'm not able to make assymetric array (I mean number of rows != number of cols)....

View Article


Is there a way to prevent a program from checking values that are outside of...

So I'm working on an implementation of Conway's Game of Life in Python and I have most of my code written. For the most part it works; when I run it, the board appears and the cells are randomized, but...

View Article

trying to change color of square in grid on html canvas but not working and...

game of life project in react, trying to change cell color onClick but it just won't work; I literally have no clue why not. stack overflow seems to want me to be more specific but I literally have no...

View Article

Semaphore issue in C++ multithreaded program

I'm working on a C++ program that simulates Conway's Game of Life using multithreading and semaphores for synchronization. However, I'm encountering issues with the semaphores not working properly.I...

View Article

Panning using mouse in MouseAdapter and Java swing libraries

I'm trying to implement zooming and panning feature in my implementation of Convay's game of life in java. The problem it the following:Each time when we try to pan by draging our mouse, our eye sight...

View Article


HackerRank Conway's Game of Life Algorithms

I have recently finished solving the interesting HackerRank problem titled "Conway's Game Of Life." The problem statement is as follows:Game of Life is a cellular automaton game devised by the British...

View Article


Conway's GOL rules not implemented correctly [closed]

I am using OpenCV and a kernel to count neighbors of each pixel, the pixel's value then becomes the number of neighbors that it has, and then I apply Conway's rules, but the output is not as expected,...

View Article

Golly game of life in a gif

I have a talk in a few days. I have to make a reference to the cellular atomata. I would like to show a little gif in the slideshow where the evolution of cellular automata is shown, so my question...

View Article

Conway's Game of Life Verilog

I'm learning Verilog alone, one of the tools I'm using is the the site 'HDLBITS' which has a lot of exercises. I'm trying to write a script for Conway's Game of Life but the output is not as I...

View Article


Conway's Game of Life Rules Java

I am making the Conway's Game of Life like almost every other beginner. The main problem I have is I have no clue how to implement the rules for the game, which are :a dead cell with exactly three live...

View Article

Global matrix doesn't return the right value when read

I'm trying to make a game of life in java using a matrix of booleans, but when i try to read all the neighboors of one one point the return of the position nearby is always false for some reason... Any...

View Article

conways game of life from automate boring stuff book

i need to create a python conways game of life. i have this code given below from book "how to automate boring stuff with python" i had run this code but the output doesn't seem that the code is...

View Article

Java Game of Life using Swing

I am trying to make a replica of the Game of Life using swing, I admit i have used code from some 1 else as i am trying to get my head around it and then proceed with my own implementation. I have some...

View Article



Image may be NSFW.
Clik here to view.

How to debug OpenMP scalabilty

I'm trying to implement Conway's Game of Life in C, showing that it can scale with OpenMP. The results in the following picture are from running it on a socket of a machine with 64 cores equally...

View Article
Browsing latest articles
Browse All 55 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>