thanks for ze help :)
Printable View
thanks for ze help :)
Sounds like you just need to come up with some good algorithms based on math that determine how many they want to take from the pile. Obviously they don't want to take the last one if it can be helped. I think a lot of if statements would be the way to go. if (2 stones in pile 3 remain && pile 1 && pile 2 are empty) take 1 etc. =/ it doesn't really seem to be that much of a strategic game so I don't know how much you could really do.
I think understanding the math behind the game will definitely help you create an AI which will always win (if it can). This game is also known as Nim.
For a mathematical approach to always winning, see Nim - Wikipedia