Interaction between microwaves and nonlinear materials: an optimization procedure based on genetic algorithms