Questions tagged [cellular-automata]

A cellular automaton is a discrete model studied in computability theory.

By wikipedia,

A cellular automaton is a discrete model studied in computability theory, mathematics, physics, complexity science, theoretical biology and microstructure modeling.

A cellular automaton consists of a regular grid of cells, each in one of a finite number of states, such as on and off (in contrast to a coupled map lattice)

225 questions
1
vote
1 answer

subtracting int gives different result than addition

(I don't mean that subtracting gives a different mathematical result than addition-that's obvious) I'm trying to make a particle simulator game, and I ran into a weird phenomenon. (I'm using javascript with javap5.js). In the draw function, I have a…
Anna Wood
  • 13
  • 2
1
vote
1 answer

Error with a cellular-automata simulation in Python

I'm trying to build the famous "Game of Life" of Conway using Python and its library "pygame". This is the Wikipedia page of the simulation: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life Code: https://pastebin.com/kKGvshVK (I post it also at…
TechMatt
  • 93
  • 6
1
vote
0 answers

How can I make my cellular automata quicker

I have a grid of 300x300 cells. I am checking each cell individually which means I am checking 90000 cells atleast every second. Now, I know, one second is pretty fast considering the cpu is going through 300^2 different cells. But this stuff just…
Idiot Boy
  • 51
  • 5
1
vote
1 answer

Fill holes on cave generated by cellular automata

I'm generating caves for a game. The caves are 50x50 matrix builded by cellular automata, where 0(purple) is wall and 1(yellow) is empty space (where the player can move).Here is an example of my output I pointed out my problem with the red circles.…
1
vote
0 answers

Verify power law in cellular automata

nx =10 ny=10 pmt = 7. SKH_ev = np.zeros((nx,ny)) H_ev = np.zeros((nx,ny)) SKH_ev [1:nx-1,1:ny-1] = 8*np.ones((nx-2,ny-2)) H_ev [1:nx-1,1:ny-1] = np.ones((nx-2,ny-2)) iterations= 100 reversal=0 reversalsize=[] def avalanche(SKH_ev,H_ev): global…
Steren
  • 127
  • 2
  • 10
1
vote
1 answer

C# Memory Concerns

I work with cellular automata. My repo for my work is here. The basic structure is 1) A grid of 2) cells, which may have 3) agents. The agents act according to a set of rules, and typically one designates "states" for the agents (agents of different…
1
vote
0 answers

Simple cellular automata in Unity3D

I'm currently trying to implement something like a simple cellular automata in Unity3D. The main idea is a cube, that infinitely clones itself if there are no other obstacles around it. Here is a basic schematics of it: I started with this code:…
1
vote
1 answer

Is it possible to create a slider for Conway's game of life if birth happens only when there are FOUR living neighbours?

I'm just playing around with Conway's game of life and I adjusted the settings so that birth only happens when there are 4 living neighbours. A cell will die when the living neighbours != 2. After a lot of trying I still can't find a slider, is…
Nelis
  • 91
  • 1
  • 11
1
vote
1 answer

Seeking advice on trying to read a moore neighbourhood for a 2D cellular automata in MATLAB for an epidemic simulator

I'm currently working on a code that makes use of a 2D cellular automata as an epidemic simulator in MATLAB. The main basic rule I'm trying to implement is that if any neighbour within a Moore Neighbourhood with a 1-cell radius is infected, the cell…
1
vote
1 answer

Cellular Automaton in R - disappearing states change color in levelplot

Good afternoon everyone! Currently working on a cellular automaton in R (modelling of an epidemic applied to invasive species). Cells can be in 4 different states: 0, 1, 2, 3. So far I've made a plot (using levelplot) of the matrix, and watch it…
M. Riera
  • 101
  • 5
1
vote
1 answer

How can I use Tensorflow to make cellular automata?

Knowing that Tensorflow is good for working with matrices, would I be able to use Tensorflow to create a cellular automata? And would this offer a great deal of speed over just coding it in Python? Are there any tutorials or websites that could…
Jmeeks29ig
  • 219
  • 1
  • 7
1
vote
0 answers

Simulation of avalanches with hexagonal cells

My request is perhaps a bit complicated but I try. I'm writing a program that simulates the behavior of an avalanche through a cellular automaton. It is simulated by a matrix whose cells are hexagonal. the problem I'm trying to solve is the…
Steren
  • 127
  • 2
  • 10
1
vote
1 answer

Average time per step is constant despite a variable delay

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…
Ezor
  • 135
  • 2
  • 18
1
vote
2 answers

Falling Sand simulation

I'm trying to re-create a 'falling sand' simulation, similar to those various web toys that are out there doing the same thing - and I'm failing pretty hard. I'm not really sure where to begin. I'm trying to use cellular automata to model the…
Erik Forbes
  • 35,357
  • 27
  • 98
  • 122
1
vote
3 answers

optimizing a grid-based particle system

I've implemented a game somewhat similar to this one in Java and currently find that I'm hitting a ceiling number of particles of ~80k. My game board is a 2D array of references to 'Particle' objects, each of which must be updated every frame.…