From the course: Complete Guide to Generative AI for Data Analysis and Data Science

Unlock the full course today

Join today to access over 24,100 courses taught by industry experts.

Challenge: Simulating forest fires

Challenge: Simulating forest fires

- [Narrator] Let's work on a challenge related to simulations. In this challenge, we're going to create an agent-based model for forest fires. Now it's relatively simple. We're going to use a 1,000 by 1,000 grid. Each grid will have one tree. Now trees can be in one of three different states. They can be unburnt, burning, or burned. A burning tree becomes burned after one time unit. A burning tree sets its neighboring unburned trees on fire. Now we also want to run this simulation for at most 200 time units. And then after doing that initial simulation, I want you to add a rule to allow a burning tree to cause another tree up to three cells away to start burning with a particular probability. Let's start with 0.3 as our probability.

Contents