Fire CA model
You'll remember from the first evening lecture that you can use Cellular Automata to model forest fires.
For this project, you could:
Day one: build a basic fire model that outputs to the screen as text.
Day two: build a fire model that shows the results of the model run on a GUI.
Day One
Check out the first lecture again, and click through to the associated materials (these are from our 'advanced programming' course). Have a go at implementing a basic CA. Note that the most important thing when building a CA is to have *two* arrays -- one array that contains the current starting states, and one which you fill with the results. This prevents you from distorting your input data by copying the results over it. At the end of the iteration, you *then*, having worked out the whole picture, copy results over the starting array to provide the starting conditions for the next iteration. If this doesn't make sense, just ask us. The second thing is how to reference one cell from another. This is in the lectures, but as a refresher, you do this kind of thing:
for (int i = 1; i < array.length - 1; i++) { // Why start at 1? Why end at length - 1?
for (int j = 1; j < array.length - 1; j++) {
if (start[i-1][j-1] == 0) {results[i][j] = 0;}
}
}
Day Two
Get the results displayed on the screen as a picture. You may find it difficult to get each iteration to show, but give it a go getting the final result showing.