  Laser-accelerated protons have a great potential for innovative experiments
in radiation biology due to the sub-picosecond pulse duration and high dose
rate achievable. However, the broad angular divergence makes them not optimal
for applications with stringent requirements on dose homogeneity and total flux
at the irradiated target. The strategy otherwise adopted to increase the
homogeneity is to increase the distance between the source and the irradiation
plane or to spread the beam with flat scattering systems or through the
transport system itself. Such methods considerably reduce the proton flux and
are not optimal for laser-accelerated protons. In this paper we demonstrate the
use of a Genetic Algorithm (GA) to design an optimal non-flat scattering system
to shape the beam and efficiently flatten the transversal dose distribution at
the irradiated target. The system is placed in the magnetic transport system to
take advantage of the presence of chromatic focusing elements to further mix
the proton trajectories. The effect of a flat scattering system placed after
the transport system is also presented for comparison. The general structure of
the GA and its application to the shaping of a laser-accelerated proton beam
are presented, as well as its application to the optimisation of dose
distribution in a water target in air.
