adding 4-of-a-kind functionality to AI