|
• ai
AI isn't limited to unit management in a strategy game, but if you want a way to do AI for it, then think of how you play Game of Generals.
SETUP: Do most people place their valuable players in the front lines?
Do most people place their valuable players on one side?
Do most people place their valuable players around the flag?
Do most people place their flag in the corner, near it, or near the center
depending on what you want your AI to think the enemy is doing, the AI would setup differently so he can counteract it perfectly. For example, ideally he would kill your 4 with his 5, your spy with his *snicker* private, your generals with spies/5, etc, and rip through like tissue paper.
GAME:
here, you need to make it so the computer does not know what the pieces are, but after a battle, he will know. you can do this by giving each player's piece a variable claled 'discovered', where after a battle, he will match with the counter, but if discovered=false, he will charge in with a private, or searg.. etc.
Movement.. I'm just going to keep it simple to say he will sacrifice weak guys to know who he's fighting. Then, by doing this, it might be easier to determine what the last piece is by process elim. To keep the game going, I suggest that the AI MUST move forward unless if on the enemy side of the board, (but before that is done, check to see if he can kill someone from behind etc).
Grid based AI in a TBS is pretty hard. The easiest thing you can do is have the computer move while implementing only some features such as hierarchal seeking.
|