Simple ga algorithm