cellular-automata

Conway's Game Of Life [closed]

醉酒当歌 提交于 2020-06-08 06:46:49
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I am currently writting a programe about Conway's Game of life and I am really a beginner of python, I don't know how to start at all. Anybody can help me with it? 回答1: You probably don't need to pay to learn

CA Random 3 colors

倾然丶 夕夏残阳落幕 提交于 2019-12-23 22:17:09
问题 Does exist a Cellular Automata Rule that is RANDOM (like the rule 30) and has 3 colors? 回答1: This is rather a research problem - you have to run statistical tests on the Cellular Automata (CA) Rule you find to show that it is random. If you would like to do a research projects like this check out The Wolfram Science Summer School. For now let see what information and tools can get you started. First of all I would read Chapter 6: Starting from Randomness - Section 5: Randomness in Class 3

another Game of Life question (infinite grid)?

倖福魔咒の 提交于 2019-12-20 11:49:23
问题 I have been playing around with Conway's Game of life and recently discovered some amazingly fast implementations such as Hashlife and Golly. (download Golly here - http://golly.sourceforge.net/) One thing that I cant get my head around is how do coders implement the infinite grid? We can't keep an infinite array of anything, if you run golly and get a few gliders to fly off past the edges, wait for a few mins and zoom right out, you will see the gliders still there out in space running away,

Algorithms for Simulating Fluid Flow

二次信任 提交于 2019-12-20 08:49:44
问题 I've got a game idea that requires some semi-realistic simulation of a fluid flowing around various objects. Think of a pool of mercury on an irregular surface that is being tilted in various directions. This is for a game, so 100% physical realism is not necessary. What is most important is that the calculations can be done in real time on a device with the horsepower of an iPhone. I'm thinking that some sort of cellular automaton or particle system is the way to go, but I don't know where

New to C++, “EXC_BAD_ACCESS” error I don't understand

最后都变了- 提交于 2019-12-12 03:27:38
问题 I am attempting to translate a 2 dimensional cellular automata from Processing to openFrameworks (C++). I have written classes for the cells and for the game of life functionality. The application builds successfully but crashes immediately with the following error: Thread 1: Program received signal: "EXC_BAD_ACCESS". Here's my the header of my game of life class #include "Cell.h" class GoL { public: GoL(); void init(); void generate(); void display(); void run(); int w = 20; int cols; int

Matplotlib : Live animation works fine but displays a blank plot when being saved

自作多情 提交于 2019-12-11 14:29:47
问题 I made a little forest fire animation. My code is at the end of the question. Here is some information before I ask my question : No tree : forest[i,j] = 0 A tree : forest[i,j] = 1 A tree on fire : forest[i,j] = 2 Basically what happens is that constructforest creates a 2 dimensional array called forest of size n by m with a probability of tree occupancy called p . After that setonfire sets on fire the forest and while the forest can burn spreadfire spread the fire. When I run forestfire with

Average time per step is constant despite a variable delay

☆樱花仙子☆ 提交于 2019-12-11 10:13:33
问题 I've made a cellular automaton (Langton's ant FYI) on VBA. At each step, there is a Sleep(delay) where delay is a variable. I've also added DoEvents at the end of a display function to ensure that each step is shown on screen. With a Timer I can monitor how long one step require in average. The result is plotted on the graph bellow (Y-axis : Time per step (in ms). X-axis : delay (in ms)) Could you explain to me why it looks like that? Especially why does it remain steady ? Because IMO, I'm

another Game of Life question (infinite grid)?

放肆的年华 提交于 2019-12-03 01:55:50
I have been playing around with Conway's Game of life and recently discovered some amazingly fast implementations such as Hashlife and Golly. (download Golly here - http://golly.sourceforge.net/ ) One thing that I cant get my head around is how do coders implement the infinite grid? We can't keep an infinite array of anything, if you run golly and get a few gliders to fly off past the edges, wait for a few mins and zoom right out, you will see the gliders still there out in space running away, so how in gods name is this concept of infinity dealt with programmatically? Is there a well

Algorithms for Simulating Fluid Flow

夙愿已清 提交于 2019-12-02 17:17:52
I've got a game idea that requires some semi-realistic simulation of a fluid flowing around various objects. Think of a pool of mercury on an irregular surface that is being tilted in various directions. This is for a game, so 100% physical realism is not necessary. What is most important is that the calculations can be done in real time on a device with the horsepower of an iPhone. I'm thinking that some sort of cellular automaton or particle system is the way to go, but I don't know where to start. Any suggestions? This is not my area of research but I believe this is considered the

How to create a nested array of arbitrary depth in java?

怎甘沉沦 提交于 2019-11-30 03:56:46
问题 I am trying to create an array of arrays of arrays etc..., except I don't know how many nested levels deep it needs to be until runtime. Depending on the input, I might need either int[] , int[][] , int[][][][][][] , or anything else. (For context, I am trying to construct an N-dimensional grid for a cellular automaton, where N is passed as a parameter.) I don't have any code for you because I have no idea how to go about this; I suspect is not possible at all using just arrays. Any help, or