def avg_focus_angle(model):
    """Returns the average focus angle of the current population."""
    creatures = list(model.creatures)
    if len(creatures) > 0:
        return sum(map(lambda a: a.focus_angle, creatures), ) / len(creatures)
    else:
        return 0