How to resolve the algorithm Forest fire step by step in the Phix programming language
How to resolve the algorithm Forest fire step by step in the Phix programming language
Table of Contents
Problem Statement
Implement the Drossel and Schwabl definition of the forest-fire model.
It is basically a 2D cellular automaton where each cell can be in three distinct states (empty, tree and burning) and evolves according to the following rules (as given by Wikipedia) Neighborhood is the Moore neighborhood; boundary conditions are so that on the boundary the cells are always empty ("fixed" boundary condition). At the beginning, populate the lattice with empty and tree cells according to a specific probability (e.g. a cell has the probability 0.5 to be a tree). Then, let the system evolve. Task's requirements do not include graphical display or the ability to change parameters (probabilities p and f ) through a graphical or command line interface.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Forest fire step by step in the Phix programming language
Source code in the phix programming language
You may also check:How to resolve the algorithm Stair-climbing puzzle step by step in the Fortran programming language
You may also check:How to resolve the algorithm Input loop step by step in the R programming language
You may also check:How to resolve the algorithm Almost prime step by step in the Frink programming language
You may also check:How to resolve the algorithm HTTPS step by step in the Icon and Unicon programming language
You may also check:How to resolve the algorithm Variables step by step in the F# programming language