optimize ordering of generated moves