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
3
votes
2 answers

simplest way to produce a video of a sequence of plots with python?

I would like to start with a sequence of arrays of 1s and 0s (each array representing a 2 dimensional pattern of on off pixels) and create a simple black and white video of this sequence. controling pixel size and image size and length of time per…
3
votes
1 answer

Cellular Automata in Java 3D

I have created a Cellular Automata implementation in Java 3D. Everything is working correctly but I would need some starting patterns to start off with. As of now I have 2 cell states: Visible and Invisible. Now my question is: how would I define a…
paul_dg
  • 511
  • 5
  • 16
3
votes
3 answers

What algorithm can I implement to speed up some Cellular Automata simulations?

I am writing a ncurses based C.A. simulator for (nearly) any kind of C.A. which uses the Moore or Neumann neighborhoods. With the current (hardcoded and most obvious [running state funcs]) the simulation runs pretty well; until the screen is…
zaphnat
  • 277
  • 1
  • 2
  • 7
3
votes
2 answers

Stephen Wolfram's Rule 30 pattern clarification

The problem I was going through the methods by which Wolfram's Mathematica generates random numbers and found that it uses the Cellular Automata Rule 30. The underlying explanation of it goes as follows: The evolution of an elementary cellular…
jmishra
  • 2,086
  • 2
  • 24
  • 38
3
votes
1 answer

CA Random 3 colors

Does exist a Cellular Automata Rule that is RANDOM (like the rule 30) and has 3 colors?
2
votes
1 answer

Cellular automata implemented in JavaScript and HTML5 Canvas

I implemented a Conway's Game of Life in JavaScript but I'm not seeing the same patterns such as Gosper's Glider Gun. I seed the grid the ways it's depicted in the Wikipedia article but, the gun never happens. Will someone look at my code and see…
DiegoSalazar
  • 13,361
  • 2
  • 38
  • 55
2
votes
3 answers

Why are console graphics so slow in C?

I am trying to make s imple game using only console graphics but for some reason even when I use putc() instead of printf() it is stille extremely slow averaging 14 FPS even though all I am doing is displayinga bunch of @ sighns. code: #include…
Saw
  • 115
  • 1
  • 16
2
votes
1 answer

Why are my matrix values disappearing in C?

I am attempting to make a simple 2D sand simulation using basic cellular automata concepts (for more information watch: https://www.youtube.com/watch?v=VLZjd_Y1gJ8) and display it in the console but for some reason random particles appear near the…
Saw
  • 115
  • 1
  • 16
2
votes
1 answer

Why do my gliders never delete and instead remain in the bottom of my screen in my Game of Life sim?

I am attempting to code a console based Conway's game of life simulator but for some reason when my gliders reach the bottom of the screen they turn into a stationary 2*2 square that never dissapears, I have no idea why they are there or what is…
2
votes
1 answer

Cellular automata works in Python, not Javascript

Edit: I put a JavaScript snippet at the bottom. I've made two versions of the same celluar automata in JavaScript and Python. The Python version works perfectly as expected, whereas the JavaScript doesn't... The problem is the third generation. How…
Sasquatch
  • 65
  • 5
2
votes
1 answer

Incomplete Sierpinski's Triangle Displaying

I am following the textbook The Nature of code's Example 7.1. (The original code is written in Java, but since the processing library is functionally identical to p5.js, I have rewritten it JavaScript out of convenience) I believe that I have copied…
timi95
  • 368
  • 6
  • 23
2
votes
1 answer

How to cluster cells in a Cellular Automata?

I'm trying to code a Cellular Automata similar to Conway's Game of Life, but with altered rules which should result in clustered cells. My only rule is: If the cell has less than N neighbours, it moves to a random empty neighbouring field. If it has…
2
votes
2 answers

Pyglet- Moving many shapes at once

I am making a langton's ant cellular automata program, and I want the user to be able to pan and zoom. Right now, I have all my rectangles (grid squares) stored as a dictionary, and to move/zoom, I iterate through all of them and apply the…
Lone Survivr
  • 372
  • 1
  • 9
2
votes
2 answers

Is there a known algorithm to detect pixels required to assure the continuity of a shape?

I am trying to create a program in Javascript to make a small shape evolve randomly in a binary 2D space. The first rule is that the number of pixels the shape uses remains constant. It's a very small number (currently 9). The second rule is that…
nesdnuma
  • 33
  • 4
2
votes
2 answers

Cellular Automata using python class

I have made a class which initiates and updates the CA data, and I have made a function 'Simulate' which updates the cells based on the rule that fire spreads across trees, and leaves empty spaces. Empty spaces are replaced with trees based on a…
ushham
  • 185
  • 1
  • 7
1 2
3
14 15