Cellular Automata Java (Beginner)

647 views Asked by At

I'm creating a game along the lines of Minicraft. I posted a question about how I should make a terrain similar to the one in the game here and user by the name of Quirliom posted an answer referring to what is called cellular automata.

I had absolutely no clue what it was, let alone how to do it. I did look it up and see what it was. But I have yet to find out how to do it. Could somebody please explain how to do it and how it works, perhaps a link or two or even some source codes/ examples.

2

There are 2 answers

0
addaon On

For the theory, check out http://en.wikipedia.org/wiki/Book:Cellular_Automata. Once you have a sense of what cellular automata are in general, the next step is finding sources on their application to landscape generation (a pretty non-standard but not unheard of use); I suspect the initial theory readthrough will give you a pretty good sense on implementation techniques.

0
OB1 On

Formally, cellular automata are a subclass of dynamical system where space and time are discrete.

Depending on the model considered, some properties may or may not apply:

  • The component of the model are connected by a regular graph that is invariant by translation, rotation, etc.
  • Given S the state space, the updating rule is a function F(S^n) -> S where S^n is given by the neighborhood of a cell.
  • The updating rule is the same for all component.
  • The updating rule apply to all cells simultaneously, building states t+1 from states t.

Generally, cellular automata are good models to simulate a dynamical environment (sand, brownian motion, wildfires) because they allow large size and computation speed, due to their extreme simplicity.

If you want an entry in the world of cellular automata, I recommend you look up the Game of Life by Conway, find a tutorial and implement it.