  Context. The complexity and variety exhibited by the light curves of long
gamma-ray bursts (GRBs) enclose a wealth of information that still awaits being
fully deciphered. Despite the tremendous advance in the knowledge of the
energetics, structure, and composition of the relativistic jet that results
from the core collapse of the progenitor star, the nature of the inner engine,
how it powers the relativistic outflow, and the dissipation mechanisms remain
open issues. Aims. A promising way to gain insights is describing GRB light
curves as the result of a common stochastic process. In the Burst And Transient
Source Experiment (BATSE) era, a stochastic pulse avalanche model was proposed
and tested through the comparison of ensemble-average properties of simulated
and real light curves. Here we aim to revive and further test this model.
Methods. We apply it to two independent data sets, BATSE and Swift/BAT, through
a machine learning approach: the model parameters are optimised using a genetic
algorithm. Results. The average properties are successfully reproduced.
Notwithstanding the different populations and passbands of both data sets, the
corresponding optimal parameters are interestingly similar. In particular, for
both sets the dynamics appears to be close to a critical state, which is key to
reproduce the observed variety of time profiles. Conclusions. Our results
propel the avalanche character in a critical regime as a key trait of the
energy release in GRB engines, which underpins some kind of instability.
