Shape optimization in adaptive search spaces