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
0
votes
0 answers

Predicting the nth state of cellular automata

Does anybody know if it is is possible to predict the nth state of cellular automata using a function? I think it might be possible to do on one dimensional automata using differential equations, but I was wondering if there is a formal method out…
Zerge
  • 91
  • 1
  • 4
0
votes
1 answer

How i can draw a cellular automaton

I am doing an cellular automaton exercise in java and I came across a problem. The logical part of the CA is working fine, if I wanted it to be arranged on the console it would be ready, but I want it to be drawn on the panel, when it is 1 drawing a…
Andre Dilay
  • 52
  • 1
  • 9
0
votes
1 answer

Using gpu.js for cellular automata

I'm trying to run 1D cellular automata using gpu.js, but it looks that my code without gpu.js is 20 times faster. I cannot understand where is the issue. The code below runs cellular automata for rule 30 starting from single one ON cell. The…
0
votes
0 answers

Cellular automata - repeated simulation imshow()

I've got the problem with repeating the animation. I want to use matplotlib in order to visualise each simulation on the matrix. Here is the code for simulation: import numpy as np from matplotlib import pyplot as plt s = np.array([[1,1,1],…
fgh
  • 169
  • 1
  • 3
  • 15
0
votes
1 answer

Python counting issue

I've got some nested functions and I'm trying to sum the total number of times that something occurs using: if C[city_cell_x][city_cell_y] == 1: cityCount +=1 but as this is within a function: # Animate fig = plt.figure() plt.axis("on") ims…
Wilf Chun
  • 25
  • 5
0
votes
1 answer

Wolfram Elementary Cellular Automata Using Processing

I'm using a piece of code taken from the website The Nature of Code - https://natureofcode.com/book/chapter-7-cellular-automata/ - the portion I used was from example 7.1. I'm trying to create a one-dimensional cellular automaton using the…
0
votes
0 answers

Update function in Conway's game of life is not working

I am trying to make Conway's Game of Life in JavaScript, but cannot find what is wrong with a specific function after hours of debugging. The program works by making a 2d array based of global "row" and "column" variables, and then pushes "Square"…
0
votes
1 answer

How can I code this Cellular Automata project more efficiently?

I am new to programming and I have an interest in cellular automata, so I decided to try to script one using JavaScript both for coding practice and so that I could make a personalised one. The cellular automata project I created is for a simple…
0
votes
0 answers

Self Initializing Cellular Automata

What is the largest cellular automata one can generate given the conditions: -n x m rectangular grid -Basic Conway Rules -Grid is not continuous (meaning edge behavior is not wrapped) -perfectly/near perfectly reproduces its initialization pattern…
Numoru
  • 3
  • 6
0
votes
1 answer

Python cellular automata to solve a 'spreading' simulation

So, I've got a nested list of 50 rows and columns (and 50 lists in the nested list) .In the nested list there are random '1' , '0' , and ''. I want it such that at the beginning, a random '0' is turned into a '1' and that '1' turns other '0' into…
Ryan Yong
  • 53
  • 5
0
votes
1 answer

My paint method partially works. The draw commands inside my loops don't execute. How could I solve this issue?

import java.awt.Graphics; import java.awt.Graphics2D; import java.util.ArrayList; import java.util.Arrays; import javax.swing.JFrame; import javax.swing.JPanel; public class CA extends JFrame { static int[] cells = new int[60]; static int…
0
votes
1 answer

cellular automata to simulate 2d clouds

I've recently stepped into cellular automata and I've been looking everywhere for an automata that can simulate clouds' behaviour. I don't want it to be perfect, just to be a random and infinite algorithm that looks like clouds (e.g. when they…
Daniel
  • 7,357
  • 7
  • 32
  • 84
0
votes
0 answers

How to define equilbrium between two opposing political parties

I have two parties A=1 and B=0, being used in a model the distribution of votes for each party on a 2d array. In my code Ive set up rules that if the majority of neighbors in an nine cell neighborhood around a central cell ( central cell included)…
bhapi
  • 97
  • 3
0
votes
1 answer

How to build a Triangle-based Grid in Java using Swing?

How to build a Triangle-based Grid in Java using Swing. Context: I've been searching this for quite a while; I've seen many questions throughout my search of the internet. How to Draw Triangles in Java How do I draw a Triangle in Java However, as…
user8006397
0
votes
1 answer

All cells in Conway's game of life are alive

I tried to implement Conway's game of life in Python-3.6 with this code: import numpy as np import time screen = np.zeros((25,25),dtype=np.int) while True: print(screen) command = input('command?') if command[0] == 'x': command…
Kay Jersch
  • 277
  • 3
  • 13