CS 170: Computing for the Sciences and MathematicsAdministriviaExample: Cellular AutomataFire: Initializing the SystemUpdating RulesSlide 6Slide 7BoundariesHOMEWORK!Spread of FireDiffusion using Cellular AutomataCS 170:Computing for the Sciences and MathematicsAdministriviaLast time (in P265)Runge-Kutta 2/4Cellular Automata/Game of LifeTodaySimulation / AutomataHW #8 Due!HW #9 assignedNext time in P115Example: Cellular AutomataStructureGrid of positionsInitial valuesRules to update at each timestepoften very simpleNew = Old + “Change”This “Change” could entail a diff. EQ, a constant value, or some set of logical rulesFire: Initializing the SystemGrid-site values:0 - emptyprobTree = probability of grid site occupied by tree; i.e., tree densityprobBurnin g = If tree, probability that tree is burning; i.e., fraction of burning treesHow do we represent and initialize an n-by -n grid (forest) in Maple? 1 - non-burning tree2 - burning treeUpdating Rulesvon Neumann neighborhood Function spread(site, N, E, S, W) returns next value of site, based on values in locations site, N, E, S, and WUpdating RulesAt next time step, empty site remains emptyBurning tree burns down; site becomes emptyprobLightning = probability of lightningEach step, there is this probability of each tree catching fire based on lightning strikeUpdating RulesTree has chance of catching fire only if a nearest neighbor (N, E, S, W) is a burning treeprobImmune = probability of immunity from catching fireProbability of catching fire if exposed to fire = ?BoundariesHOMEWORK!Homework 9Due THURSDAY 11/11/2010Monday’s Class in
View Full Document