AI improvements?

User avatar
No Flag Jaeger
Jaeger
Posts: 4492
Joined: Feb 28, 2015

AI improvements?

Post by Jaeger »

Like a good beer, everybody likes a good compstomp once in a while. However, I have noticed that the comps on TAD seem to be much easier to beat than on nilla, because on TAD they tend to camp more; on nilla they all just rush you. Would it be possible to bring the comps back from nilla?

Also, when I play against the AI I am emotionally scarred when I see the comp having 15 outpost wagons at TC. Is it possible to make the comp ship only 1 outpost card, make musketeers instead of halberdiers, give each computer a standard deck each game, stuff like that?

I realize I could make it more of a challange by just giving the comp more handicap, but more variety would be nice as well.
last time i cryed was because i stood on Lego
User avatar
India _DB_
Howdah
Posts: 1787
Joined: May 20, 2015

Re: AI improvements?

Post by _DB_ »

I think its possible, cuz i once designed 10\10 India in scenario editor which seemed to work lol

Giving ai good decks is easy imo.
Doing what you like is Freedom...
Liking what you do is Happiness...
Netherlands momuuu
Ninja
Posts: 14237
Joined: Jun 7, 2015
ESO: Jerom_

Re: AI improvements?

Post by momuuu »

There is an AI mod lying around somewhere that makes them seriously good. I dont remember what it is called though.. Draugur ai or sth?
User avatar
No Flag thebritish
Jaeger
Posts: 3787
Joined: Jul 18, 2015

Re: AI improvements?

Post by thebritish »

Its called Draugur AI, but it still isnt enough to be real challenge.
They just build outposts and send tons of improvements.
Before, when i play vs Dragur AI, my opponent had 17'000 HP Fort which was insane..
krichk wrote: For some reason, you want the world to know that you're brave enough to challenge thebritish
User avatar
India _DB_
Howdah
Posts: 1787
Joined: May 20, 2015

Re: AI improvements?

Post by _DB_ »

yeah, dauger ai sucks.

imo it's possible to make a piroshiki scenario where you can trigger a spain civ to do piro ff on a map lol
Doing what you like is Freedom...
Liking what you do is Happiness...
User avatar
Great Britain Panmaster
Skirmisher
Posts: 166
Joined: Jan 1, 2016

Re: AI improvements?

Post by Panmaster »

Modding the AI for AOE3 is difficult. No documentation. Only 1-d arrays. No debugger.

The AI Cannot:
1) Repair buildings
2) Use any abilities except sharpshooter
3) Use wonder powers
4) Rotate buildings
5) Build walls unless in a circle or straight line.
6) See train tracks / trade routes.
TAD AI Reference Guide
"Better to remain silent and be thought a fool than to speak out and remove all doubt." - Abraham Lincoln
User avatar
Serbia Atomiswave
Lancer
Posts: 794
Joined: Dec 27, 2015

Re: AI improvements?

Post by Atomiswave »

There is an updated version of Draugar AI. I tested it, it performs much better with most civs. You can still rush and defeat him easily, but it is much more competent if you allow him to boom.

http://aoe3.heavengames.com/downloads/showfile.php?fileid=3390
User avatar
Great Britain Panmaster
Skirmisher
Posts: 166
Joined: Jan 1, 2016

Re: AI improvements?

Post by Panmaster »

NuggetFung is the best AI out there. It trains mortars, builds forward military production and has better card selection. With a few tweaks to the mortar plans it would be even deadlier.
http://aoe3.heavengames.com/downloads/s ... ileid=3694
TAD AI Reference Guide
"Better to remain silent and be thought a fool than to speak out and remove all doubt." - Abraham Lincoln
User avatar
Serbia Atomiswave
Lancer
Posts: 794
Joined: Dec 27, 2015

Re: AI improvements?

Post by Atomiswave »

Panmaster wrote:NuggetFung is the best AI out there. It trains mortars, builds forward military production and has better card selection. With a few tweaks to the mortar plans it would be even deadlier.
http://aoe3.heavengames.com/downloads/s ... ileid=3694


I will test it asap, thnx.
Netherlands momuuu
Ninja
Posts: 14237
Joined: Jun 7, 2015
ESO: Jerom_

Re: AI improvements?

Post by momuuu »

Wasnt there some guy on these forums testing his own AI. Was it eaglemut?

If we include that, the EP would have more value for lower level players imo.
User avatar
Czech Republic EAGLEMUT
ESOC Dev Team
Donator 05
Posts: 4513
Joined: Mar 31, 2015
ESO: EAGLEMUT
Clan: WPact

Re: AI improvements?

Post by EAGLEMUT »

Jerom wrote:Wasnt there some guy on these forums testing his own AI. Was it eaglemut?

If we include that, the EP would have more value for lower level players imo.

Oh, I think you're referring to this: viewtopic.php?t=4431#p92776

As I mentioned elsewhere, I don't think my AI is really usable due to a multitude of issues - is only for nilla, uses modified proto files to some extend, needs more polishing, and even the whole concept of a turtle AI might not be enjoyable for many players.. That said, there are definitely some cool ideas there, which could be considered incorporating into a new AI.

So far the demand for a new EP AI doesn't seem to be very high imo, but if we'd eventually want to make a new AI I could offer my help. I haven't even tried all the other custom AIs out there, perhaps we could include an existing one or just improve upon it. I don't even know what would people like to use the AI for. Should it try to play competitive 1v1 builds? Should it be oriented towards comp stomps? More defensive or offensive? Only a few things in the AI are hardcoded, so it's possible to customize its behavior quite a lot. For example it's perfectly possible to make the AI build a forward base straight in age2 with no fort involved, which is one of the things I did in my own AI.

Panmaster wrote:Modding the AI for AOE3 is difficult. No documentation. Only 1-d arrays. No debugger.

The AI Cannot:
1) Repair buildings
2) Use any abilities except sharpshooter
3) Use wonder powers
4) Rotate buildings
5) Build walls unless in a circle or straight line.
6) See train tracks / trade routes.


Yeah, modding the AI can be difficult, but documentation is actually available from AoM, which covers like 90% of AoE3 stuff as well (same engine). Debugger is also kinda available, although it's just in-game where you can pause the code execution and see some variables/plans etc. Not the greatest, but hey it's something.
Points 1-3 suck, but I don't see when points 4-6 are very relevant - players normally cannot rotate buildings either, and you usually want a circle wall anyway.
Image
momuuu wrote: ↑theres no way eaglemut is truly a top player
No Flag SiegeDance
Musketeer
Posts: 64
Joined: Oct 1, 2016
Location: Kathmandu, Nepal

Re: AI improvements?

Post by SiegeDance »

Hello EAGLEMUT, if you're interested in developing the EP AI, I would suggest you look at the N3o fan patch, version 1.3z3P to be exact, as that's the latest. I have tried literally every mod that's out there but when it comes to AI, nothing comes close. Some spotlights- AI make walls, everytime, consistently, on all maps. Not just one but three layers of walls! The most remarkable thing is their deck choices. For all the civs who have the royal and refrigeration, they will use them, with all other good cards specific to that civs. They boom mostly but not at the expense of fortress army. And after that, they will literally steam roll you, not just with random compositions, but ones that counter yours. You make heavy cav skirms, they will go goons arty, if you spam muskets, they will spam skirms and so on. And they have both units train faster cards in age 2. So you can guess the rate at which they produce units. Overall a very challenging AI. They upgrade units based on priorities, and don't spam mercenary, artillery and natives. They use their core units more, with a little mixes here and there. If you allow the expert AI to boom, it's almost impossible you will win that easily. It's a mod though, so the AI is heavily modified to use new units and techs, but I think can be used as a good reference point. No other AI come even close.
User avatar
Great Britain Panmaster
Skirmisher
Posts: 166
Joined: Jan 1, 2016

Re: AI improvements?

Post by Panmaster »

EAGLEMUT wrote:
So far the demand for a new EP AI doesn't seem to be very high imo, but if we'd eventually want to make a new AI I could offer my help. I haven't even tried all the other custom AIs out there, perhaps we could include an existing one or just improve upon it. I don't even know what would people like to use the AI for. Should it try to play competitive 1v1 builds? Should it be oriented towards comp stomps? More defensive or offensive? Only a few things in the AI are hardcoded, so it's possible to customize its behavior quite a lot. For example it's perfectly possible to make the AI build a forward base straight in age2 with no fort involved, which is one of the things I did in my own AI.

Yeah, modding the AI can be difficult, but documentation is actually available from AoM, which covers like 90% of AoE3 stuff as well (same engine). Debugger is also kinda available, although it's just in-game where you can pause the code execution and see some variables/plans etc. Not the greatest, but hey it's something.
Points 1-3 suck, but I don't see when points 4-6 are very relevant - players normally cannot rotate buildings either, and you usually want a circle wall anyway.


Players do rotate trade posts automatically. The AI does not and it looks weird.

The AI I've been working on has been progressing nicely but there are still many unsolved problems:
1. Broken queries on mother nature units. Trees and animals are in a dead state while gathered. TargetID, NumWorkers and so on don't work on mother nature units. ContextPlayer has no effect.
2. Setting homecity shipment marker vector or even building.

Code: Select all

bool aiSetHCGatherPoint( vector point )
is broken.
3. Livestock plans have no effect. Tested using fatted animals. Plan was running. No way to detect if animals are fatted also.
4. Using transport plan to de-garrison buildings as described in AOM by Invent00r.
5. aiPlanAddUnit() is broken, hence the above transport plan did not work. This also affects building plans i.e. builders chosen at random.
6. Efficiently determining the targetID of settlers. Neither actiontypes nor using queries are efficient.

Code: Select all

bool kbUnitIsType()
is the only way to determine whether it's berries, mills or mines etc.
7. Hidden numbers e.g. actionID's, hidden plan variables e.g. cPlanTownBell has a hidden variable 0 which specifies the target building ID.
8. Moving military units in formation.
9. Attacking specific target even when not visible.
10. Wall Gates for Asian civs.
TAD AI Reference Guide
"Better to remain silent and be thought a fool than to speak out and remove all doubt." - Abraham Lincoln
User avatar
Canada forgrin
Howdah
Posts: 1873
Joined: Apr 27, 2015
ESO: Forgrin

Re: AI improvements?

Post by forgrin »

I only play against the computer to practice BOs occasionally. I don't think many people even do compstomp, and if they do then they probably want a different experience than playing vs another human. Therefore I don't see how giving the AI a build order is really gonna change things; those BOs pretty much all depend on unit comps that have to be micro'd correctly for the BO to work. Eg the AI isn't gonna cover falcs with pike when doing a piro FF, so it just auto-loses to 2 Huss.

If you could teach it some basic micro then it'd be alot more interesting, but micro is so abstract with so many variables that it would probably be near-impossible.

So I think pretty much the only way to get a "good" AI, as in one that performs well, would be to just make one that plays like Kynesie.

Edit: you might be able to make one that does musk-huss alright, since that combo needs fairly little micro. Human skirm-goon could infinitely kite it, but I guess that'd be entertaining for a bit.
https://www.twitch.tv/forgin14

"WTF WHERE ARE MY 10 FALCS" - AraGun_OP
User avatar
Poland pecelot
Retired Contributor
Donator 03
Posts: 10459
Joined: Mar 25, 2015
ESO: Pezet

Re: AI improvements?

Post by pecelot »

EAGLEMUT wrote:So far the demand for a new EP AI doesn't seem to be very high imo

viewtopic.php?f=19&t=6444
:mad:
an update is coming!

EAGLEMUT wrote:but if we'd eventually want to make a new AI I could offer my help. I haven't even tried all the other custom AIs out there, perhaps we could include an existing one or just improve upon it. I don't even know what would people like to use the AI for. Should it try to play competitive 1v1 builds? Should it be oriented towards comp stomps? More defensive or offensive? Only a few things in the AI are hardcoded, so it's possible to customize its behavior quite a lot. For example it's perfectly possible to make the AI build a forward base straight in age2 with no fort involved, which is one of the things I did in my own AI.

AoC AIs have an amazing feature that allows you to type a certain number responsible for a certain strategy in the in-game chat before X minute (so that the AI can adapt its BO). Not sure whether it's possible to achieve in AoE3, though. If it was not, maybe we could try to vary specific computer personalities for their most common online strategies. For instance, Akbar would do early Sepoy pressure, Napoleon would try to semi-FF and Queen Elizabeth would do musk+huss (or lb+pike, whatever).

forgrin wrote:I only play against the computer to practice BOs occasionally. I don't think many people even do compstomp, and if they do then they probably want a different experience than playing vs another human.

I know for a fact that there are many compstomps hosted daily on ESO by lower-rated players, and since I lost access to ESOC recently, I've been enjoying it, too. Demanded experience often differs: some people expect typical compstomp with a classic big clash, whereas the others use it to train and practice BOs, mechanics, treaty booms and such. If it was not possible to conjoin both of these feature in one version of the modded AI, perhaps we should consider making two of them :)
With an improved CPU with proper build orders and decisions, maybe it could also serve as a nice substitute to online gaming for those who find it too hard, can't find players and can't play online.

SiegeDance wrote:Hello EAGLEMUT, if you're interested in developing the EP AI, I would suggest you look at the N3o fan patch, version 1.3z3P to be exact, as that's the latest. I have tried literally every mod that's out there but when it comes to AI, nothing comes close. Some spotlights- AI make walls, everytime, consistently, on all maps. Not just one but three layers of walls! The most remarkable thing is their deck choices. For all the civs who have the royal and refrigeration, they will use them, with all other good cards specific to that civs. They boom mostly but not at the expense of fortress army. And after that, they will literally steam roll you, not just with random compositions, but ones that counter yours. You make heavy cav skirms, they will go goons arty, if you spam muskets, they will spam skirms and so on. And they have both units train faster cards in age 2. So you can guess the rate at which they produce units. Overall a very challenging AI. They upgrade units based on priorities, and don't spam mercenary, artillery and natives. They use their core units more, with a little mixes here and there. If you allow the expert AI to boom, it's almost impossible you will win that easily. It's a mod though, so the AI is heavily modified to use new units and techs, but I think can be used as a good reference point. No other AI come even close.

Unfortunately, it's only compatible with the former Fan Patch, which is shame, but I guess not hopeless!
User avatar
Great Britain Panmaster
Skirmisher
Posts: 166
Joined: Jan 1, 2016

Re: AI improvements?

Post by Panmaster »

AI unit micromanagement is limited by:
a) 1 second minimum update time
b) CPU performance. The game performance tanks once 10,000s of queries are running per second. I believe attack/defend plans are extremely costly once there are multiple AI's with ~100 units and game performance tanks.

In your above example of protecting falconets I believe that can be done using the built-in "defend plan":
cDefendPlanDefendTargetID set to falconet ID(s)
cDefendPlanEngageRange set to 8.00 distance
cDefendPlanRefreshFrequency set to 60 times per minute update rate


Experimenting with the values and setting the appropriate unit stance: aggressive,defensive,passive should yield interesting results.
TAD AI Reference Guide
"Better to remain silent and be thought a fool than to speak out and remove all doubt." - Abraham Lincoln
User avatar
Canada forgrin
Howdah
Posts: 1873
Joined: Apr 27, 2015
ESO: Forgrin

Re: AI improvements?

Post by forgrin »

Panmaster wrote:AI unit micromanagement is limited by:
a) 1 second minimum update time
b) CPU performance. The game performance tanks once 10,000s of queries are running per second. I believe attack/defend plans are extremely costly once there are multiple AI's with ~100 units and game performance tanks.

In your above example of protecting falconets I believe that can be done using the built-in "defend plan":
cDefendPlanDefendTargetID set to falconet ID(s)
cDefendPlanEngageRange set to 8.00 distance
cDefendPlanRefreshFrequency set to 60 times per minute update rate


Experimenting with the values and setting the appropriate unit stance: aggressive,defensive,passive should yield interesting results.

This sounds promising, but wouldn't this end up with the computer responding only once the units attack the falc, which would be too late? I think you'd somehow have to get them to sit directly on the falc to bodyblock as well otherwise they wouldn't respond in time.

Also you'd have to make it so they only respond to melee attacks obviously
https://www.twitch.tv/forgin14

"WTF WHERE ARE MY 10 FALCS" - AraGun_OP
User avatar
Hungary Dsy
Lancer
Posts: 994
Joined: Jun 27, 2015

Re: AI improvements?

Post by Dsy »

New AI would be really fun. Watched a video on youtube which mentioned that aoe2 hd removed handicaps from ai when you increase difficulty, its just plays much better through the ai programming.
The nilla and tad ai just completely bad.

Who is online

Users browsing this forum: No registered users and 8 guests

Which top 10 players do you wish to see listed?

All-time

Active last two weeks

Active last month

Supremacy

Treaty

Official

ESOC Patch

Treaty Patch

1v1 Elo

2v2 Elo

3v3 Elo

Power Rating

Which streams do you wish to see listed?

Twitch

Age of Empires III

Age of Empires IV