Whilst being very bored recently I started playing around with simulating cellular automata once again. But to challenge myself a bit more than usual I set three specific limitations that made this a bit harder than I was used to:
- The simulation functions should be able to handle n-dimensional rules and states.
- The rules should be given as integers.
- The state should be represented as an integer, making use of the fact that the whole state consists of a n-dimensional array of booleans that can be flattened.