Harnessing pulse generation from an ultrafast laser is a challenging task as reaching a specific mode-locked regime generally involves adjusting multiple control parameters, in connection with a wide range of accessible pulse dynamics. Machine-learning tools have recently shown promising for the design of smart lasers that can tune themselves to desired operating states. Yet, machine-learning algorithms are mainly designed to target regimes of parameter-invariant, stationary pulse generation, while the intelligent excitation of evolving pulse patterns in a laser remains largely unexplored. Breathing solitons exhibiting periodic oscillatory behavior, emerging as ubiquitous mode-locked regime of ultrafast fibre lasers, are attracting considerable interest by virtue of their connection with a range of important nonlinear dynamics, such as exceptional points, and the Fermi-Pasta-Ulam paradox. Here, we implement an evolutionary algorithm for the self-optimisation of the breather regime in a fibre laser mode-locked through a four-parameter nonlinear polarisation evolution. Depending on the specifications of the merit function used for the optimisation procedure, various breathing-soliton states are obtained, including single breathers with controllable oscillation period and breathing ratio, and breather molecular complexes with a controllable number of elementary constituents. Our work opens up a novel avenue for exploration and optimisation of complex dynamics in nonlinear systems.