Teaching a Computer to Sort