Genetic-algorithm-optimized neural networks for gravitational wave classification