Optimizing wave enegy havesting through genetic algorithms