Jump to content

AI difficulty levels


Recommended Posts

I'm experimenting with the Petrabot and Atlas and tried adding an Entrenched Roman Army Camp in one of the skirmish maps to be used by the enemy Gaul Petrabot (Very Hard). It works and the Gaul AI uses the Camp to train Roman troops, instant Romano-Gallic army. The only issue I have is the AI troop preferrence, the AI started to train more Veles (Roman skirmishers) during the early game and disfavored the training of Celtic skirmishers and vice versa during the late phase of the game, although the AI trains other Gallic infantries via Civic Centers in new territories, it has developed a preferrence for the Roman Triarii and uses it for the main bulk of its army, I rarely see other Gallic melee troops during the late game and have never seen the AI train Hastati. :boredom: I'm wondering if you could do something about the AI troop preferrence and balance, e.g. weaker troops varieties coexisting with stronger troop variety in the AI army depending on AI difficulty (ex. The Medium AI has a balanced preferrence of troops and uses both weak and strong variety of units belonging to the same category but of different stats, like in the case of the Roman Veles and Celtic Skirmisher, both are light infantry but the AI favored the Veles for reasons and factors unkown to me, both are equal in expense, though the Veles is weaker)

AI Population Distribution and Behavior Suggestion

AI Population: 50% Army

25% Gatherers (Default 12.5% male and 12.5% female)

12.5% Traders (Sea and land, all AI difficulties should be able to trade)

6.25% Sea transport (If available, if not, 3.125% contributes to Army and the other 3.125% to the Gatherers)

6.25% Siege Equipments (If available, if not, contribues certain percentage depending on AI Difficulty, to be explained in Siege Attacks below)

AI Army: The AI army comes in two forms depending on difficulty, default and final form, in default the AI will use citizen-soldiers until it can train strong troops (Champions) which will consist the final form of the AI army (More on default and final form armies and its relation with difficulty will be explained below). When not attacking the AI will distribute the army to defend its territory.

  • Default / Final army form and Difficulty

Sandbox: 0% doesn't use strong troops (Champions) thus it only uses a default army.

0% of the army selection is comprised of stronger troop varieties, uses 100% weaker varieties (0% Celtic Skirmishers / 100% Veles )

Very Easy: 12.5% of the army's final form consists of strong troops (Champions)

12.5% of the army selection is comprised of stronger troop varieties (12.5% Celtic Skirmishers / 87.5% Veles)

Easy: 25% of the army's final form consists of strong troops (champions)

25% of the army selection is comprised of stronger troop varieties (25% Celtic Skirmishers / 75% Veles)

Medium: 50% of the army's final form consists of strong troops (champions)

50% equal the army selection on troop varieties (50% Celtic Skirmishers / 50% Veles)

Hard: 75% of the army's final form consists of strong troops (champions)

75% of the army selection is comprised of stronger troop varieties (75% Celtic Skirmishers / 25% Veles)

Very Hard: 87.5% of the army's final form consists of strong troops (champions)

87.5% of the army selection is comprised of stronger troop varieties (87.5% Celtic Skirmishers / 12.5% Veles)

Hypothetical: 100% of the army's final form consists of strong troops (champions)

100% of the army selection is comprised of stronger troop varieties (100% Celtic Skirmishers / 0% Veles)

AI Attack Types:

  • Harassing: 50% of the AI army will stand ground near enemy territory while the 25% will lure the enemies to them, the other 25% will remain to defend AI territories.
  • Skirmish: 50% of the AI army will attack isolated enemy territories while 50% will remain and defend AI territories
  • Assault: 100% of the AI army will attack enemy territory.
  • Siege: 100% of the AI army together with 6.25% of the population that consist Siege equipments will attack enemy territory (If not yet available Siege Equipments population will contribute to the Army population).

Sandbox: 6.25% of the population contributes to the Army, does not use Siege equipments

Very Easy: 3.125% of the population contributes to Siege Equipment population while the 3.125% contributes to the Army

Easy: 3.125% of the population contributes to Siege Equipment population while the 3.125% contributes to the Army

Medium: 3.125% of the population contributes to Siege Equipment population while the 3.125% contributes to the Army

Hard: 6.25% of the population contributes to Siege Equipment population

Very Hard: 6.25% of the population contributes to Siege Equipment population

Hypothetical: 6.25% of the population contributes to Siege Equipment population

In estimate an Easy AI Gaul with a population of 100 will have an attacking army consisting of 50 soldiers which includes 12 Gallic champion units (Heavy swordsman/Heavy cavalry) and 38 various non-champion Gallic units.

Other notes:

  • Trading ships should occupy 2-4 population slots, AI loves to spam them on Naval Maps.
  • Below is a sample of a custom AI that the video game Battle Realms uses, I found that sample on google and the author of the post added some brief explanations to each part of the customizable AI.ini file. I hope that 0A.D. could produce something similar so that we can easily tweak AI difficulty and behavior to suit our own tastes.

//Notice: All numbers are percentages

[AIPlayerSettings]

Name=Invader
//name of the Custom A
Aggressiveness=40
//how many units should be gathered to attack
Cleverness=0
//units match-making in battle. e.g. will send ronin vs. kabuki heavy infantry vs. spear infantry
Exploration=100
//how many times computer will explore the map instead of attacking and harrasing
Harassment=100
//how many times computer will harass instead of attacking (Edit: attacking enemy resource sites)
Intelligence=100
//how many tactics computer uses 100-all 0-little to none Also influences if computer will focus on creating stronger or weaker units.
Attention_Span=75
//how much computer will focus on creating units instead of buildings, gathering rice, water, horses
Battle_Gear_Usage=100
//how much computer will focus on giving power to units
Memory=0
//100 means that he will make counter-units, remembering enemy units. 0-does not remember enemy units, makes normal units
Horse_Usage=100
//how fast horses will be collected
Hero_Usage=100
//how fast heroes will be created and how many
Healer_Usage=40
//how fast and how many healers will be created

Edited by wackyserious
  • Like 1
Link to comment
Share on other sites

Note that this way, you also enable the AI (or any player choosing that faction in the game setup) to build Roman structures, and in fact become a complete Roman civ.

In SVN (and thus the next release), this behaviour has been disabled, if a player gets access from a building of a different civ, it will only be able to produce its own units from that building (if it has comparable units to produce).

Link to comment
Share on other sites

Concerning your specific question on the preference given to some units compared to other possible ones, there is a function in petra/entity-extend.js which try to compute an "absolute" strength for each units by combining the different attack and armour strengths with appropriate weights, and this is what is used by petra to choose which unit to train. But this is an old function which has not been updated since years while all attack and armour stats have changed a lot. There is no pressing need to update it now as the game is still evolving and balance is far from finished, but feel free to modify this function if you need it.

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

AIs are easy to beat especially maps with treasures. You raid a bit and some units are drawn into your camp to get slaughtered. 

I played against 2 very hard AI before at 250 pop cap(+50 max) the game lags and only .1 speed works. Now I'm limiting my pop to 200 and seems to work up to .5 speed. My pc is decent(Alienware 17, 2.0 mz, 8 GB memory). Never lag on 7 AI on other RTS games. 

I think the AI should be able to make market and build merchant/s with limit. 1 for sandbox, 2 for very easy and so on up to max 3 then max of 3 merchants each thereafter every market/dock built. There are times that too much merchants get bogged down into tight spaces especially the AI build buildings (houses) too close to each other thereby hindering trade outputs. As in the dock the markets should have a toggle to lock it prohibiting usage. 

The walls should be improved too if necessary to have a toggle to be locked if you don't want AI allies to use it. 

One observation I found on the team game was that if you garrison your unit on AI buildings it gets lost (you click on AI building and you can't see or remove your unit) while the AI can enter/heal on my CC.

Another thing is the AI/human on single player mode should not be able to build a new CC too far outside its/allies boundaries until another technology would allow. I think about half the diameter of the original is reasonable. This would allow the AI from having closer defense units/buildings from the main base. If not aggressive factions could easily beat and destroy a CC without much resistance. 

Another thing I notice if Iberians have walls in the beginning it has no gates. I haven't tried the hardest but now I'm playing to have a team game 2v2 very hard AI with iberians as allies. I set it to medium coz I doubt they will build a market if I set it to sandbox. The map is very nice, Tuscan Acropolis and it's very enjoyable. 

 

Edited by Servo
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...