The present paper outlines the application of a genetic algorithm for the structural constrained optimization problem of the reinforcement of timber beams using composite materials. The genetic algorithm uses an objective function with adaptive penalization as well as an adaptive mutation scheme. The aim is to minimize the material cost of strengthening timber beams and the constraints are the ultimate limit states for flexural and shear behaviour and the serviceability limit state of deflection, according to Spanish Technical Building Code. For this purpose different properties are used, such as section geometry, length, timber class and load conditions. The reinforcement solutions have been encoded in a binary database: type of composite material (CFRP or GFRP), reinforcement mechanical properties and geometric configuration. The search space for the minimum cost consists of 65 billion possible solutions. The genetic algorithm has been used for several specific load and geometry cases for glued laminated timber in order to find whether there is a specific reinforcement configuration more feasible for certain loading situations: short or long beams and lower or higher loading increments. Five cases were analysed. In the first three cases, the length of the beams had constant values of 2, 2.5 and 3m, whereas the value of loading was variable. In the latter case, the value of the load was fixed and the length of the beam was variable. Analysis of the results shows that GFRP reinforcement is more efficient than CFRP for ultimate limit states.