Python brute force + pruning
\ndef stoneGameIX(self, stones: List[int]) -> bool:\n        nums = [0,0,0]\n        for x in stones:\n            nums[x%3] += 1\n        if sum(nums[1:]) == 0
```\ndef stoneGameIX(self, stones: List[int]) -> bool:\n        nums = [0,0,0]\n        for x in stones:\n            nums[x%3] += 1\n        if sum(nums[1:]) == 0:\n            return False\n        nums[0] %= 2\n        t = min(nums[1],nums[2])\n        if t > 0:\n            nums[1] -= t-1\n            nums[2] -= t-1\n            \n        def dfs(pre,p):\n            if sum(nums) == 0:\n                return "Bob"\n            if p == "Alice":\n                for i in range(3):\n                    if nums[i] > 0 and (pre+i) % 3 != 0:\n                        nums[i] -= 1\n                        if dfs(pre+i,"Bob") == "Alice":\n                            nums[i]+=1\n                            return "Alice"\n                        else:\n                            nums[i] += 1\n                return "Bob"\n            else:\n                for i in range(3):\n                    if nums[i] > 0 and (pre+i)%3 != 0:\n                        nums[i] -= 1\n                        if dfs(pre+i,"Alice") == "Bob":\n                            nums[i] += 1\n                            return "Bob"\n                        else:\n                            nums[i] += 1\n                return "Alice"\n        \n        return dfs(0,"Alice") == "Alice"\n```
[]