Share your repls and programming experiences

← Back to all posts
Cellular Automata in BASIC (rule 126)
ArnavBansal (17)

It should be trivial modify it to produce any of these:

SixBeeps (3047)

This seems like something that should have been done already, but I believe you're the first. Nicely done :)

ArnavBansal (17)

@SixBeeps woah, cool!

TIL BASIC (1964) actually predates cellular automata (~1980s)


Roar123 (431)

This is nice! How does the logic work?

ArnavBansal (17)

@Roar123 Thanks!

We render one row at a time, based on simple rules: we look at the cell above, one cell to the left, and one to the right.

In this case, a cell is turned on if any one or two of the three cells above it are alive, but dies if all three cells are alive.

We can produce quite a lot of complexity from a small number of simple rules. Here's rule 30 for example: