This is one of my favorite problems and I it plays a key-part in my new empire-building game. It's about attacking wooden cubes.
I have a gameboard with 54 land- and about 20 sea-areas. Mechanics in my game produce some military units, both ships and land-units, on selected areas during whole game. Every unit is marked as a wooden cube and most of these units are controlled by AI. That means there are areas with different size of armies in them and some of them are hostile toward each others. So problem is how to make an AI cube-armygroups recognaize size of other cube-group and attack them.
Of course it's not that simple. Mechanism should not be too obvious and predictable, nor too random, but consequence of random events and players (also AI players) choices. It cannot be done by cards, but instead there is a possibility of using kind of lottery for the random element.
How would you do this?
I considered that, but I chose throwing die instead. In every area there can be some advantage for defender or attacker which increase numbers in die.
I also thought about cubes attacking adjacent area, but then I found out anoither problem, hooking. If there are three areas, A, B and C and all are adjacent to another, A and B controlled by blue human-player and C controlled by red AI-player. Blue have 3 armies in both A and B, while red have 5 cubes in C. On his turn, red AI will attack another of blue's areas, because he outnumbers it. In the following battle he destroys enemy, but lose also 3 armies and have only two of them left. Now he is easier target for blue's remaining armies than he was before attack (before: 6 blue vs 5 red, after: 3 blue vs 2 red). So this gives a slight advance for human player, because he knows when AI enemy attacks. By using die, I can add random element in battle but not in enemy strategy itself. Do you see what I mean?
For more, I wouldn't like to make AI cubes attack human players whenever it is possible or when they are overwhelming, but to make them think on strategical, operational and tactical level.
Strategical level - allies, neutral or enemy. AI players react to random events by comparing possible enemy's military power, economical resources and capacity of both mentioned to AI's own corresponding stats.
I consider this is easist one, because such stats are easy to mark and record and whenever random event say enemy declares war if.. you just check the conditions from stats. Only problem of this is to make it as simple as possible.
Operational level - where to attack, where to defend. This one is hard nut to crack, because operational planning is really PLANNING. And I haven't seen any boardgame with AI capable to plan full scale attacks. So I think I'll have to compromise here a little bit.
My idea by now is to make some objective areas for AI. When AI attacks, some objectives are randomly chosen. Now AI player will focus most of his spare units toward those targets and when he reaches most of them, objectives change (and player may get some penalties, ie. Losing units/resources). I'll try to modify some areas as "strategical regions", with some extra production or some other thing valuable to player.
Tactical level - when and how to attack, when and how to defend. This is another though one because it is about comparing strengths of armies and making decisions like whether to attack or not to attack. Players also have to observe enemy units and try to take account their goals and intension, while planning their own attacks.
So I thought it could be something like this.
- When AI attacks to objective area, he can use his units from every area adjacent to target.
> Every such area should still have half as many units as adjacent areas have enemy units, excluding the area which is been attacked.
- Fog of war: When AI's area is attacked he roll a die for every unit, except three units. When AI attacks he roll a die for every unit except four units. Every 1 in die reduce his army by one unit and every 6 in die increase it with one unit. This simulates the fog of war and uncertainty about enemy's total strength.
> After rolling units, numbers of cubes on the game board should be correct.
Example:
Human player is blue, AI is red.
There are areas A, B, C, D, E and F. C an D are adjacents to all other areas. Blue control areas A, C and E, red contol B, D and F. Blue have 6 armies in A, 5 in C and 4 in E, while red have 5 in B, 8 in D and 4 in F. Red's object is Area C. According to my idea, red can assign 2 units from area B, 3 from D and 2 from F, in total 7 units for capturing area C.
This leaves B 3, D 5 and F 2 units for defensive missions.
Before conducting combat AI rolls three dice to see complete size of attacking group.
|A 6| |B 5|
|C 5| |D 8|
|E 4| |F 4|
This is very complicated and propably have some bugs and stupidities, but I'll fix them after playtest as well as I try to simplihy whole process. Anyway how did you like it by this far?