We describe the use of a genetic algorithm to apply active feedback to a laser wakefield accelerator at a higher power (10 TW) and a lower repetition rate (5 Hz) than previous work. The temporal shape of the drive laser pulse was adjusted automatically to optimize the properties of the electron beam. By changing the software configuration, different properties could be improved. This included the total accelerated charge per bunch, which was doubled, and the average electron energy, which was increased from 22 to 27 MeV. Using experimental measurements directly to provide feedback allows the system to work even when the underlying acceleration mechanisms are not fully understood, and, in fact, studying the optimized pulse shape might reveal new insights into the physical processes responsible. Our work suggests that this technique, which has already been applied with low-power lasers, can be extended to work with petawattclass laser systems.