Finding the Average Tiger

Learn how to monitor and add additional statistics in different climates to the framework.

Implementing the average tiger feature

Now that you have extensible statistics tracking in place, you can use it to monitor more insightful statistics for your evolution, such as the average tiger for each climate.

You’ve already identified the fittest tiger for each climate; however, what matters more is how the entire population changes in a given climate. To identify this, you can implement an average_tiger statistic that tells you the average tiger for any given generation.

To do this, start by creating the following average_tiger/1 function in your TigerSimulation module:

Get hands-on with 1400+ tech skills courses.