Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cellular-automata]

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

5
votes
2answers
375 views

Java Langton's Ant simulation

I have implemented a simulation which is called "Langton's Ant" with Java. Here is a short summary of basic rules: A ant is placed in a 2D matrix and looks to north, west, east or south. First, all ...
1
vote
3answers
377 views

Simple version of the Game Of Life

This is just a very simple version of the Game of Life made in Java. Please let me know how I could have improved this. I am also hoping for some feedback on how the formatting and conventions are ...
1
vote
1answer
76 views

Langton's Ant cellular automaton in Ruby

I wrote a Langton's Ant cellular automaton simulator in Ruby using object oriented principles. This code works. It requires the drawille library. I would like to ...
0
votes
1answer
216 views

Conway's Game of Life in React

I have built a version of Conway's Game of Life in React. If you don't know what it is, the Game of Life is a simple algorithm that causes patterns and shapes to appear in a 2D array of cells. While ...
2
votes
0answers
137 views

Game of Life in Haskell with Nested Zippers, Comonads, etc

I was trying to implement Game of Life in Haskell. Here is my approach: ...
3
votes
1answer
94 views

One-Dimensional Cellular Automata

First, a teaser with an aweful gif! After watching the first couple minutes of The Coding Train's awesome video on Cellular Automata, I decided to try and write my own. I've written many versions of ...
1
vote
0answers
186 views

Cellular Automata: Counting preimages

One of the Google Foobar challenges requires you to write a program to count the the number of preimages of a position in a 2D cellular automaton, under the following rules: You find that the ...
4
votes
1answer
177 views

(SBCL) ASCII Game of Life

I'm implementing Conway's Game of Life in Lisp to familiarize myself with the language, with the eventual goal of hosting it on a website with a pretty GUI. I'm a hobbyist and inexperienced (this is ...
8
votes
1answer
292 views

Grid displayer: Game of Life and Langton's Ant

Re-use Given that both the Langton's Ant and the Game of Life use a grid, I decided to code a generic grid_diplayer code and use it both for GoL (Game of Life) and ...
3
votes
0answers
166 views

CUDA program that emulates a kind of cellular automata slower on the GPU than on the CPU

I'm a very new to CUDA, so I'm still trying to understand how to make the best use of the GPU. I've ported a C algorithm to it. This algorithm works by loading the memory with an initial input, then ...
-5
votes
2answers
78 views

Rewrite 12 consecutive ints based on bizarre logic

Despite looking terribly ugly, it is pretty interesting due to some specific connections to cellular automata theory. I'm looking for ways of simplifying it further. This program takes 2.7 seconds to ...
5
votes
2answers
114 views

Finding if there exists an input for a given automata for which no matter what the starting state is, final state would be same everytime

I am solving a puzzle (Finding if there exists an input for a given automata for which no matter what the starting state is, final state would be same everytime) and have written following Python code....
0
votes
1answer
84 views

Game of life C++ implementation memory access bug [closed]

I'm learning C++ so I thought I'd make game of life for practice and explore pointers, 1.5D arrays and stuff like that. I have "finished" my implementation, but I have trouble with memory access. It ...
4
votes
0answers
154 views

Cellular automata path and fill algorithm

I have worked for a few days in my cellular automata path algorithm and an easy fill algorithm, but sometimes I get some weird fall in my FPS. If you need a preview ...
3
votes
1answer
70 views

Simulation of animal skins

This is a simulation of animal skins, like a cellular automat. I'd like it improved. ...
4
votes
1answer
3k views

Simple Cellular Automata (think Conway's Game of Life) simulator

Firstly, let me say that this code works, as posted. It fills a 10x10 grid with a random color (black/white) then runs a cellular automata simulation on the grid, starting or pausing when the button ...
2
votes
1answer
596 views

Performance problems with 1D cellular automata experiment in Python with Numpy

I'm an experienced programmer but relatively new to Python (a month or so) so it's quite likely that I've made some gauche errors. I very much appreciate your time spent taking a look at my code. My ...
6
votes
1answer
2k views

Generating a 1D cellular automata in Python

I wrote a program that generates a set of 1D cellular automaton. Basically, it generates this (rule 150): ...and rotates it to form this: I then introduced an element of randomness to it, so it ...