I have a game that works kind of like this.
There are 3 piles of 10 rocks. On your Turn you can remove up to 3 rocks from one pile. The last person to remove a stone from the board loses.
The issue is, i want the opponent to be an AI, which would theoretically have to be able to compute the best move possible.
Heres the problem.
In pile one, there can be 0-10 stones(11 possibilities)
Pile two, 0-10(11), and in pile 3 also.
SO, that means theres 11*11*11=1,331 possible outcomes.
At first, I thought I can write all the code and think through all the outcomes, but this is ambiguous and timely.
What way(s) can i approach producing the AI to go through these possibilities?
--Note
Each stone is given a number
A1 is the first stone in the first pile
Also you cannot pick any stone from any pile, each pile removes from stone 10 -> 1(which i have already programmed separately) So if you pick three stones in Pile 3, it will check to see what the highest number stone is and remove 3 accordingly, if there isnt three left it tells you to re-do your selection.


