You must be logged in to post messages.
Please login or register

Modding Discussions
Moderated by Alexastor, MosheLevi, Mister SCP

Hop to:    
Welcome! You are not logged in. Please Login or Register.260 replies, Sticky
Age of Empires III Heaven » Forums » Modding Discussions » Idea: Let's start a "Better AI project"
Bottom
Topic Subject:Idea: Let's start a "Better AI project"
« Previous Page  1 ··· 9 10 11  Next Page »
murdilator
Skirmisher
posted 09-22-12 06:52 AM EDT (US)         
EDIT:

Here are links to The Beginner's Guide to AI Modification, written by me:

Part 1:

http://aoe3.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=14,38878,,10

Part 2:

http://aoe3.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=14,38885,30,100


------------------------------

Original Post (9-22-2012, 06:52 AM)

I have an idea that we can significantly improve the AOE3 AI. This will of course build from the Drauger AI. I have made a decent AI in my mod N3O Fan Patch, but it currently uses some techs that I have added to the game, so it won't work yet for an unmodified Age of Empires III. Yet I can easily remove those techs with some testing (to make sure it works) so that it can be played on an unmodified AOE3 and furthermore be a base rubric for further AI improvement.

http://aoe3.heavengames.com/downloads/showfile.php?fileid=3363

Mandorex also has an improved version of the Drauger AI:

http://aoe3.heavengames.com/downloads/showfile.php?fileid=3222


I also noticed another Drauger AI improvement uploaded for Vanilla AOE3 which makes the computer build forward bases. This would be interesting to look into, but I do say that this is quite a job for one coder. However, what I suggest is that we make it a community project to sort of build off an already improved AI and (for those who have time) fix various issues. I myself am pressed for time otherwise.


Anyone for an idea such as this!


Feel free to discuss and share your ideas! Its best if we discuss before we actually decide anything big.



best of regards to all here,




murdilator

[This message has been edited by murdilator (edited 06-23-2013 @ 10:35 AM).]

AuthorReplies:
ylg_hke
Skirmisher
posted 09-24-18 08:23 AM EDT (US)     251 / 260       
Sorry i didnt make it clear, i meant ESO multiplayer comp stomps, they tend to be laggy by 25mins.

99% Agreed.

* Market techs asap. Scratch the cPlanProgression
==>rules for all civ's market mill farm plantation ricepaddy capitol upgrades are done. they all build market + research when they are aging up to age2.

* At most 2-3 Mills early on
==> yes! they tend to build excessive mills at early age3.
things have became a bit better since the introduction of "shoothuntable" rule though.

* 0.0 wood gatherer percentage after deforestation
==> I'm currently addressing this issue, how do we determine if all trees are gone? kbunitcount the tree number ?
It bugs me that kbBaseSetMaximumResourceDistance is actually rather stupid, i mean, what if we are dominating the map and there are many trees outside the range?
I think this issue should be handled alongside with multiple bases.
Take a look at these unused global variables, apparently ES developers planned to do the same, but eventually they rushed the production and left them untouched.
========================================================
extern int gGatherGoal = -1; // Stores all top-level gatherer data
extern int gFarmBaseID = -1; // Current operating bases for each resource
extern int gFoodBaseID = -1;
extern int gGoldBaseID = -1;
extern int gWoodBaseID = -1;
extern int gNextFarmBaseID = -1; // Overflow operating bases for each resource
extern int gNextFoodBaseID = -1;
extern int gNextGoldBaseID = -1;
extern int gNextWoodBaseID = -1;
extern int gPrevFarmBaseID = -1; // Phasing-out bases for each resource
extern int gPrevFoodBaseID = -1;
extern int gPrevGoldBaseID = -1;
extern int gPrevWoodBaseID = -1;
=========================================================

* "Protect" Factories, Banks, etc
==>Yes, but we can forget about banks (except Jap..?), they can be rebuilt and with 4000hp they are hardly 1st tier target.

* Tribute all resources to allies before giving up LOL
==> It should not exist, provided that multiple bases + switch base are done right. (if they can switch base and still cant comeback, then its hopeless anyway.)

* Fix the TownBell exploit
==> pretty much know nothing about it.

* Better handling of Naval games (?)
==> I feel like it will be our next major todo. :P

* Build Shrines near huntables, but not too far from base (?)
==> theoretically, yes, but i am not so sure now because we cant fix "shrined animal" issue.

* Handle regicide
==> IDK, haven't played regicide yet.
AlistairJah
Skirmisher
posted 09-24-18 09:45 AM EDT (US)     252 / 260       
* Tribute all resources to allies before giving up LOL
==> It should not exist, provided that multiple bases + switch base are done right. (if they can switch base and still cant comeback, then its hopeless anyway.
Ugh... I mean, if the AI has lost and requests to resign, it should send all of its resources to allies *if* the human player approves the resign request. I know, that's a pretty busted idea XD



About the kbBaseSetMaximumResourceDistance(), you can't make it perfect. The best idea is to cap distance and count within that distance, even if the AI controls 80% of the map or the inverse. Having the factory can help.



Town Bell bug: pretty early, humans send the explorer to the AI's base and shoots at one (only one) settler, and then the AI sends them all into the TownCenter. And humans repeat it to gain advantage over the AIs...

Panmaster says destroying the TC's base kinda fixes it, but well I just admit that I didn't really see the proof yet. The rule "ManualGathering" in ZenMaster prevents the AI from hiding villagers in TownCenter without needing to destroy bases. So if you need to hide villagers in TC you gotta do "aiTaskUnitWork(villagerID, towncenterID)". But well, how to determine if settlers are under attack? I'm just afraid that queries per location are not enough, AND GetBaseUnderAttack is not enough either.
ylg_hke
Skirmisher
posted 09-24-18 11:17 AM EDT (US)     253 / 260       
I know what you meant. well, I mean, if NPCs are capable to switch base, it will be very different from now. ie: image what will happen if villagers flee to allies' base and rebuild, most resources will be spent on constructing new barracks stables TCs troops..etc, they are not going to resign while having like 5000+ unspent resources anymore.
So if that particular NPC can't comeback in time, then the whole team is already lost.
Instead, maybe we should make AI sending wood to the ally immediately for reconstruction?

Is there a way to assign a particular place to the gather plan?

what about we aiPlanDestroy the cPlanTownBell in age1?
AlistairJah
Skirmisher
posted 09-24-18 11:22 AM EDT (US)     254 / 260       
Ah, cool, that's even more awesome
Yes you can set location for gather plans.
By the time you destroy cPlanTownBell, villagers would already have moved halfway from the resources to the town center...
ylg_hke
Skirmisher
posted 09-24-18 12:33 PM EDT (US)     255 / 260       
Good, we have to manually assign locations for late game wood income then.

hmm...make a townbell monitor for age1, mininterval 1, it should be enough?

regarding Split armies in cPlanDefend, actually, I will probably give up on defend plans, because its late-game performance on ESO has been really poor, lagged like hell even with 80 engage range.
AlistairJah
Skirmisher
posted 09-24-18 01:21 PM EDT (US)     256 / 260       
Does cPlanExplore really prioritize pre-made waypoints over auto-generated ones? It'd make units move towards attacked areas. Monitor the plan's position and destroy it at the right time. Update waypoints if necessary... Damn I have the feeling it's gonna be messy... Then create an attack plan, attack the targets. Slow and incredibly ineffective (perhaps it's even risky for the armies), but less laggy... To be applied in multiplayer only. Single player skirmish should use normal cPlanDefend.

Or, even better, don't even bother handling defense...


EDIT:
I take everything back. Those ideas are busted!

[This message has been edited by AlistairJah (edited 09-24-2018 @ 01:22 PM).]

ylg_hke
Skirmisher
posted 09-25-18 06:02 AM EDT (US)     257 / 260       
Does cPlanExplore really prioritize pre-made waypoints over auto-generated ones?
==> Yes

I just tested attack plans on ESO again.
Now i suspect the accumulation of attack plans may be the cause of lag.
plan amount can go up to 80+, even with garbage plan killer. I will try killing plans whenever plan amount > 16 or so.

BTW, I am surprised that my ai still work on ESO, I have set a lot of rules from original ai to inactive. eg: forward base, tower manager, defend0, xpbuilder, building monitor...etc.
so, now we can confirm that the total number of rules, and the number of active rules are not related to out of sync.

edit:
how do we assign HC correctly in a scnario?
http://aoe3.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=12,36949,,10
I followed rip6pack's instructions, but AI simply use my deck, i want them to build their own deck.

[This message has been edited by ylg_hke (edited 09-25-2018 @ 07:02 AM).]

AlistairJah
Skirmisher
posted 09-25-18 08:18 AM EDT (US)     258 / 260       
About the deck:
@Panmaster2014
I am sure there is, because I remember I randomly got the WoME AI to make its own deck on scenario. Not sure how, it was just a luck I guess. Perhaps use the clear hc button and/or use CreateDeck (IIRC Deck 0 is always the default so perhaps using Deck 1 would make them ignore the default).
About the OOS:
Now that's pretty cool I was just worried the problems with triggers also apply to the AI... Because, well, IIRC I also talked about the "trigger" part of OOS, not only rules. Triggers that are not executed at the same time on all PCs are more likely to make OOS, based on what Aizamk said. Didn't mess too much with triggers so I don't know. Plus, you can perfectly play multiplayer scenarios so I won't talk too much... But since Aizamk is a developer in ESOC I assume he's experienced enough to know what he's talking about.

[This message has been edited by AlistairJah (edited 09-25-2018 @ 08:28 AM).]

ylg_hke
Skirmisher
posted 09-25-18 09:56 AM EDT (US)     259 / 260       
ah..too troublesome I gave up on the scenario deck.
I just went and tested my ai vs AI5 The Helot on Himalayas, expert difficulty, all homecities were lv.10, and Helot's bonus was brought back to 1.5 for the sake of fairness as well as using the very same map twice + switch sides, and my ai won all 2 matches! (sorry murdilator, i'm not being rude.)

Anyway, the TAD original ai is very very bad at resource management.(2000+food, 200+wood & gold, WTH) We have to do something about it.
AlistairJah
Skirmisher
posted 09-25-18 10:03 AM EDT (US)     260 / 260       
We have to do something
>>> Escrows.

The Helot did not change much things apart from some int and float values... Oh speaking of changing values, I'd highly recommend to use WinMerge (search WinMerge on Google), if you didn't yet.

[This message has been edited by AlistairJah (edited 09-25-2018 @ 10:08 AM).]

« Previous Page  1 ··· 9 10 11  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires III Heaven | HeavenGames