Q.4. Cellular Automata algorithms The image below is of analgorithmically-generated cave-like structure, for use in a 2Dcomputer game. Each of the cells, laid out in a 60×30 grid, eitherhas a wall (denoted by ‘#’) or a floor (denoted by ‘.’).
The cellular automata algorithm which generated this output usesthe following steps:
• For each cell, randomly define it as: wall (45% chance) orfloor (55% chance)
• Perform the following procedure 4 times:
Calculate the number of wall neighbours of each cell, and
OR
OR