| ||||||
The battlefieldpart of Imperial Domination II is slowly becoming a solid feature. However, it requires a good strategy to win a battle and this makes it very hard to program the AI. I've spend some hours looking to the screen thinking of the best way to solve this but those where some very wasted hours. In almost every blogpost I complain about not wanting to program AI and it should get a bit boring to read, but I'll try to explain why it's so hard. First of all some more info about the battles. The gameplay can be compared with chess. You and your opponent can move one unit every turn. However, instead of "killing" an enemy unit when you move on it, they will fight each other every turn that follows. Every unit has 100 HP, infantryattack, cavalryattack and armorpercentage. Basically every turn a units HP is reduced by armor%*attack of every enemy unit in bordering cells. So the basic strategy is to inflict as many damage on your opponent every turn while trying to receive little damage. This can be done for example by attacking cavalry with spearmen. Now there are a few main aspects that the AI has to keep in mind while taking moves, most aspects that a human doesn't even has to think about. I think the most important are Space, Time & Teamwork and Reaction. Space Time & Teamwork Reaction I really hope I can make the AI smart enough. When a battle is to easy to win it could not only make the battles boring, but also unbalance the campaign. I get back to you when I made good progress on the AI and hopefully I have a demo of the battles ready soon. | Comments Leave a Comment |
|||||


