Self solving rummy algorithm