Region AI

Show us how intelligent you are by discussing the AI in this forum.

Moderators: Balthagor, Legend, Moderators

Post Reply
User avatar
Legend
General
Posts: 2531
Joined: Sep 08 2002
Human: Yes
Location: Ancaster, Ontario - BattleGoat Studios
Contact:

Region AI

Post by Legend »

Discuss Regional AI in this thread.
Janster01
Warrant Officer
Posts: 43
Joined: Aug 10 2005

Post by Janster01 »

The AI should compare its forces against the opponents at all times ,if it has the info, or cheat to get the info if difficulty is set high enough.

The AI should strike the second the defense of another nation is too low.

This will prevent people from removing their armies entirely, however aggressiveness of AI should be able to be adjusted for those who only want to play SIM-NATION (TM)

Janster
Janster01
Warrant Officer
Posts: 43
Joined: Aug 10 2005

Post by Janster01 »

Oh and developers should purchase a thumb hammer.

Use this hammer EVERY time you get delusions of grandeur with AI.

To see what happens when you get ambitious with AI programming, play Master of Orion III or Victoria for 24 hours straight, then come and reply on this thread.

Janster
ozmono2005
Brigadier Gen.
Posts: 539
Joined: Jun 01 2005
Location: Sydney

Post by ozmono2005 »

Play deep blue 10 (or however many years ago it was) to find out what ambitious AI can do EDIT= I started a thread I hope will be sticky and hopefully it can cater for the AI limitation arguements and wether it should cheat arguements. Its in this subject"AI" and it has a poll question
Janster01
Warrant Officer
Posts: 43
Joined: Aug 10 2005

Post by Janster01 »

Chess is a game with very limited rules, and is infact more of a memory challenge than anything else.

computers are good with memory.

Janster
BigStone
General
Posts: 1390
Joined: Dec 22 2004
Location: Holland

Post by BigStone »

Janster01 wrote:Chess is a game with very limited rules
ABSOLUTLY NOT

If you think chess is only a matter of moving forwards and a database you don't understand nothing of the game
Never heard of: ...en passant.... promoting pawns... rocade... draws .. stalemate ..???

Cheers
User avatar
Graymane
Major
Posts: 160
Joined: Jul 26 2005

Post by Graymane »

I suggest the first thing to solve here is recon and force estimation. Recon itself should be a mission given to a lower level force AI (garrison, offense, etc) when the higher level controller determines that it needs more data for a force estimation. We might also want a "strategic AI" that is the same level as a garrison level AI that handles strategic assets such as long range recon planes and the like (or maybe decides to build a radar station).

Force estimation: We need to determine or have the devs clue us in on what is currently used for force estimation. If we can get the AI to use TO&E and unit organizations like divisions, then we can somewhat simplify this process (I envision something like "1 mech inf div and 1 armor div stationed around Omaha").

For the math of force estimation, we should take a look at the unit values and how they are used by the game to determine odds/results. We can't develop this in a vacuum because it depends on what the game is actually using to calculate these values.
BigStone
General
Posts: 1390
Joined: Dec 22 2004
Location: Holland

Post by BigStone »

Janster01 wrote:The AI should compare its forces against the opponents at all times
Ha.. finaly something i agree with you Janster... :wink:

@ Oz: i will place here a short resume to continu the discussion
in your -AI principles- post (What unit should be build) to prevent fragmentation ...

Correct me if i'm wrong .....



A) SCENARIO
v
B) MILITARY COMPARISON
v
C) REGION COMPARISON
v
D) AGENDA
v
E) DIPLOMACY
v
F) BUILD UNIT


A= Preprogrammed matters (following the SR storyline) such as: * Don't like region X *Attack region X after a year gametime.
But NOT definitive !

B= A bit tricky... But certainly the amount of bases and money spend on defence are the biggest factors...
DEFCON
A damm pitty spec OPS aren't implemented
Recon
And i want ask the DEV's - How the Military bars in the Status Graphs are specified... ???

C) Easier then B: Treasury,Resources,Production etc etc

D) Now the AI should make up his stance: Agressive or Defensive-neutral
And here should the idea from Graymane about -adaptive- be implemented

E) Now diplomacy comes into play...
When agressive = demanding diplo
defensive = constructive diplo

F) Now the AI can decide which units its gonna build.
Agressive = lets say...80% attack units and 20% defensive
Defensive = VV

Hope it make some sense....

Cheers
ozmono2005
Brigadier Gen.
Posts: 539
Joined: Jun 01 2005
Location: Sydney

Post by ozmono2005 »

BigStone wrote: @ Oz: i will place here a short resume to continu the discussion
in your -AI principles- post (What unit should be build) to prevent fragmentation ...
Okay, but I worry that if we talk about such things here than they will domminate this thread and prevent people who haven't been following the AI subject from posting as it won't be as simple as a general comment
BigStone wrote: Correct me if i'm wrong .....A) SCENARIO
v
B) MILITARY COMPARISON
v
C) REGION COMPARISON
v
D) AGENDA
v
E) DIPLOMACY
v
F) BUILD UNIT
Now I don't think your wrong in any way and it does make sense
BigStone wrote:B= A bit tricky... But certainly the amount of bases and money spend on defence are the biggest factors...
DEFCON
A damm pitty spec OPS aren't implemented
Recon
And i want ask the DEV's - How the Military bars in the Status Graphs are specified... ???
I want to post something on that B but I'll (risk fragmentation by) posting it in the "AI principles thread" as our post are becoming unaccessiable to people whom are just starting to look at this "AI" subject
BigStone
General
Posts: 1390
Joined: Dec 22 2004
Location: Holland

Post by BigStone »

@ the DEV's: Can't you assign Oz as a moderator for this AI-section... ?
So he will be able to structure the posts..
(unless he doesn't want to ofcourse)

Cheers
Janster01
Warrant Officer
Posts: 43
Joined: Aug 10 2005

Post by Janster01 »

Hehe

I have played chess a lot in my life, and I can tell you its no simple game, however, the RULES are simple, but the game itself is not.

For each chesspiece there are 2 rules, how it moves and how it strikes, and thats IT, exept for peasant piece having the en passent special move :)

The trick here, is to reduce the number of rules for the computer, and make it all simpler, then the AI will really shine :)

Another example, is that while there are very powerful chess computers, the chinese version GO, has no really good ones...however GO is a game of conquest and territory control, and a few more rules, and suddenly the AI has problems.

Altough my current AYA version of GO still beats the crap outta me :)

with regards
Janster
Guest

Post by Guest »

They won't do that, thanks for the cofidence Big Stone but I'm leaving this forum for awhile anyway. I enjoy discussing things here but I want to get into the industry and have alot to do if I'm ever going to make it.

I have to teach myself in my spare time many things needed to develop a game and still have to get by so I don't have time anymore anyway BUT thanks for the confidence
angelsenior
Corporal
Posts: 3
Joined: Nov 16 2005
Location: Belgium

Post by angelsenior »

hi all,

here are some ideas about regional AI;

First part; goal determination:
depending on the scenario, each region should start with a list of enemies to defeat; this is composed by the scenario creator (a human being in a better position to judge which regions to attack first based on all possible factors) and follows the tendencies of the region as stated in the scenario briefing.
on this list all other regions are sorted in the order in which the region will declare war on those regions and try to conquer them.

region nr 1 is his prime enemy; the region AI will amass his offensive troops ready to invade and conquer this region

region nr 2 is his second choice target, the region will not attack it as long as region 1 isnt conquered, BUT it does position a limited portion of his offensive troops, ready to exploit a possible weakness/situation

region nr 3; 3rd choice target, same as region 2 but less troops will be stationed at its common border

for both 2nd and 3rd choice regions, the rule is the region will not start the war but it wont sue for peace either once those regions started it themselves.

regions nr 4,5,6,7,..... only the normal defensive units are stationed at these borders.

3 last regions; these regions, being the latest on the list, will actually be considered as possible allies for the time being, and the region will try to make treaties and arrangements as much as possible.

regions bordering his priority regions will also be regarded as possible allies to strengthen its position against his future enemy (possibly even attack together).

When a region is eliminated, it drops from the list and all the regions coming behind it move up a position; 2nd choice region now becomes first choice in case the 1st region is conquered.

This list is only a starting point;
at scenario start, first is a randomization process which will shift a few regions on the list a few spaces; it picks at random 2-4 regions and moves them 1 or 2 spaces up or down (this is to differentiate the scenario a bit each time you play it).
during the game, regions on the list may move up or down the list depending on certain situations; if a region conquers another region, it moves up the list by, say, 2 spaces.
if it makes a strong alliance with another region, it moves up 1 space
if it is at war with 3 or more regions it moves down 1 or 2 spaces
This represents regions becoming more dangerous then others.
if this would cause a 1st choice region to drop to a lower position, the AI will prefer to sign a temporary peace so it can deal with its new 1st choice region (as it judges this region as more dangerous).

Second Part; affecting troops:
A region will split up its armed forces in several groups:

garrison group: this group contains about 30-40% of the regions troops,
40% units from this group protect the border zone; mostly foot infantry
30% units protect key installations wherever these are (this group may in fact contain the engineer units which will be in a position to move through the region and construct wherever construction is needed, to automate engineer use a bit) some infantry, some artillery
30% units act as a defensive reserve; they are divided among the military bases of the region and from there on will rush to meet any INVADING units. the aircrafts and frontline combat units of the garrison group should be in this portion.

1st offensive group; it contains about 40% of the regions troops
the group is composed of;
50% frontline troops; these include armor, mechanised infantry which have high attack and speed values, they are the first to fight.
(5 to 10% of these troops could form a reserve to plug any holes in the line if enemy units threaten to pierce the frontline)
20% artillery units; these follow the frontline units and will try to bombard the closest enemy stack with which the frontline troops are in contact with
10% airplane units; these attack enemy troop concentrations a few hexes in front of the frontline troops, they will relocate to bases closest to the front when possible
5% AA units; these position themselves close to the frontline troops to give them protection against enemy aircraft.
15% supply trucks; these trucks will rush to units in need of supply (they move to a hex adjacent to the unit needing supply, they will not move adjacent to an enemy unit unless it is the only way to reach a unit.
The goal of the 1st offensive group is primarily to invade and conquer the nr 1 region on the list.

2nd, 3rd or more offensive groups;
the remaining 20% of troops are divided between these offensive groups
these are the troops who cover 2nd and 3rd choice regions (stationed near the border).
they will also counterattack against any enemy region who declared war on the region so that the 1st offensive group can continue its operations as normal.

the main idea is that each group has its own objective to fulfill and doesnt need to worry about the rest. offensive groups are created as the need presents itself (the more enemies, the more offensive groups are needed)
a war declaration upon the region will, in fact, trigger the creation of a new offensive group to counter this threat (ie conquer this enemy).

definition of zones of operation;
each military group will have its own zone of operation
for the garrison group this includes the original territory of the region plus all conquered hexes which are 4 hexes or more away from any enemy ground units.
in this zone, the garrison group will send units to protect the border/ control key locations, the reserve units of the garrison will try to RECAPTURE any hexes of the zone of operation lost to an invading enemy.
a hex only ceases to be part of the garrisons zone of operation when that territory is enemy-controlled at the moment peace (if ever) is signed with that particular enemy OR becomes owned by another region to which it is neutral.

for the offensive groups this includes;
-the border area of its future enemy which encompasses all hexes within a 3 hex range from the border while still at peace; the group positions its units within this area, facing the border 1st hex: frontline units, 2nd hex: arty units, 3rd hex: supply and AA units, and the reserve units, aircraft units are stationed at bases closest to this zone.
-the enemy (only the enemy of this particular group) region's territory when at war; the units will move towards the closest portion of enemy territory to conquer it, ever moving further as they expand their own territory.
to conquer territory some guidelines are needed to decide how to distribute units and give orders:
-the units are spread out along the border (in fact divided in subgroups, each subgroup having/determining its own objective)
-the capital is the main objective
-every road running from the region territory towards the enemy capital is an avenue of attack, each avenue being awarded its own subgroup of units, avenues should be strictly separated (ie one group should not infringe upon another groups avenue)
-a subgroup will proceed along the road, capturing every land hex within 3 or 4 hexes of the road and every supply source this same area may contain.
-whenever a subgroup reaches a crossroad, some units will break off and form a temporary group to follow this road to its conclusion (capturing any supply source along the way)
-when a group reaches the end of a road, it ceases to exist and reintegrates the closest subgroup, this subgroup will slow down to allow those units to catch up.
-when the enemy capital is conquered and relocated, new avenues of attack will be determined at that point and distributed to subgroups, disbanding/creating groups as necessary
-there should be a minimal number of units per group, so that each group retains a regular fighting capacity, if not enough groups are available to cover every avenue; a defensive group is created instead (this contains less units but stays on the defensive to cover an avenue against enemy attack thus not needing as much units)
-there should also be a maximum nr of units per group, each unit above this nr is redistributed to other groups who are not at maximum
-the aircraft component of the offensive should limit its operations to the main avenue of attack

CONQUERED territory will be included in the garrison's group operation zone as soon as no enemy unit is within 4 hexes of it AND is adjacent to or linked through a connected series of such hexes to an existing hex of that same zone. a check should happen at the end of each day for this calculation. this ensures the offensive group doesnt need to worry about defending the conquered territory.

newly built units should be attributed to each group evenly whenever possible, counting the total number of units in the group meaning an offensive group fighting an enemy will receive most units as it loses units due to the fighting; this check happens at the moment of starting the unit construction and is used to determine which kind of unit should be built, when the unit has finished building the check happens again to see which group actually has a free spot for this unit at that time (this means a unit could be built to join a certain group but actually be attributed to another group due to losses in other groups who need to be replaced first).

The NAVAL units;
these units should mostly be grouped with the garrison.
only when the border of an enemy (for which an offensive group has been created) starts/ends at the coastline, will a group of naval units be joined to the offensive group to move up along the coast, a second such naval group may be added to the same offensive group if there are 2 seperate coastlines bordering that same enemy.

a purely NAVAL offensive group may be created if at war with an overseas territory (ie not linked by land hexes), with its objective of securing the enemy shore followed-up by landing the corresponding ground offensive group there to conquer it.

The General idea here is that all the decisions to be made by the AI are divided by group/subgroup so each group has only a limited choice and can choose easily. some randomization element could be added to this to give some unexpected situations.
When adding all parts together, the AI will/should now be a more active/interesting foe to beat.

some of this could even be used to delegate tasks to ease play for human players.

Enjoy!
Marshal Qin
Corporal
Posts: 9
Joined: Jun 03 2005

Post by Marshal Qin »

Just had a thought that may be of some use..


Would it be possible for AI regions to draw a line between 2 high defence value points/hexes within its own borders that incorporates other high value hexes along a border with its neighbour/s

This line could be used as the FEBA and used to build up forces for either attack or defence.

AI units could then automatically move to this line instead of moving forward in penny packets or letting themselves get surrounded - basically an area rally point for bases that is not collocated with a base unless one forms part of the line

Once a certain attack value had been accumulated that totals approx. 3:1 or 10:1 depending on that regions current military thinking and what enemy units are visible (and their combined attack/defence total), then the AI could decide to advance en masse.

When land area has either been taken or lost then the line could be redrawn.

Is this feasable? ???
42 characters? 42 is THE answer though..
Post Reply

Return to “AI - Artificial Intelligence”