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.389 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 ··· 10 ··· 14 15 16  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 11-14-18 10:19 AM EDT (US)     376 / 389       
Any progress on escrows?

anyway, i just wanted to say that kbUnitQuerySetAreaGroupID is very important when it comes to maps like ceylon, Yucatan.
AlistairJah
Skirmisher
posted 11-15-18 01:47 PM EDT (US)     377 / 389       
You know, I kinda missed you

No progress at all... I practically abandoned this stuff. I mean, I *think* there is not much to do with escrows. But I'm checking here from time to time hoping to get interesting infos.

Indeed I was making a short AI for a single player RPG scenario. Query with area is really helpful. BTW I think you should seriously consider recheck the original AI, it has too many typos and human mistakes. I don't remember all of them... But I it's always better to remain clean.
ylg_hke
Skirmisher
posted 11-15-18 11:42 PM EDT (US)     378 / 389       
haha, I was busy last 2 weeks.

I haven't checked anything about "resource leakage in escrows" yet.
Can you please give me some more infos about it, so that we can speed up our overall progress?
eg: Does it happen all the time, or randomly? By how much(approximately)?

Currently I think kbUnitQuerySetAreaGroupID is a must for ManualGathering, take Yucatan as the example, we have 2 seas on 2 sides, without AreaGroupID, we might end up in tasking a fishing boat on the left to the right, the same goes for land areaGroup.

BTW I think you should seriously consider recheck the original AI
==> True, but don't worry since I disabled most rules, I also build my own functions, only things like ai chats from the original AI are active.
Its fair to say i put a new AI after the original one so that i dont have to constantly worry about OOS error.
Panmaster2014
Skirmisher
posted 11-16-18 10:37 AM EDT (US)     379 / 389       
Currently I think kbUnitQuerySetAreaGroupID is a must for ManualGathering, take Yucatan as the example, we have 2 seas on 2 sides, without AreaGroupID, we might end up in tasking a fishing boat on the left to the right, the same goes for land areaGroup.
I think kbCanSimPath() would also work.
Fishing boats are a nuisance.
What's the fastest way to count total settlers count and population?
AbstractFishingBoat includes too many ships so I think counting each settler is fastest: coureur, cree coureur, pilgrim, wagon, settler, Asian settler...

I hope kbUnitQuerySetAreaGroupID doesn't slow queries down. Testing already has sorted queries of a normal sized map down to 2000 to 4000 per second.

Escrows don't leak as far as I can tell. I was more concerned with shipments or xp being escrowed.
Using aiTaskBuild, aiTaskTrain, aiTaskResearch results in wrong values for escrow amounts requiring kbEscrowAllocateCurrentResources() to reset in proportion to percentages. Gaining back resources from cancellations might also mess it up.

Not made any real breakthroughs. Lot's of small ideas but nothing inspiring. You can add action type 8 for units blocking building foundations and wandering away.
ylg_hke
Skirmisher
posted 11-17-18 04:06 AM EDT (US)     380 / 389       
I think kbCanSimPath() would also work.
==> how? it always returns false.
even if kbCanSimPath works, if it can't simPath, then we will have to continue the for-loop, right? then it might ends up in doing hundreds of loops to get the correct resource.

What's the fastest way to count total settlers count and population?
==>the fastest way must be AbstractVillagerNo + SettlerWagonNo, but the fastest may not be the most helpful one, it largely depends on how you are going to handle the villagers.
personally I don't think counting all villager types is a good idea.

Using aiTaskBuild, aiTaskTrain, aiTaskResearch results in wrong values for escrow amounts requiring kbEscrowAllocateCurrentResources() to reset in proportion to percentages
==>thanks!

[This message has been edited by ylg_hke (edited 11-17-2018 @ 04:11 AM).]

Panmaster2014
Skirmisher
posted 03-06-19 12:34 PM EDT (US)     381 / 389       
Work on the AI project continues.

Micromanagement efforts for conventional scripted AI have improved dramatically.
The "attack nearest unit" algorithm is by far the most efficient but more sophisticated tactics such as melee mode are used effectively also.

Neural Net AI Training is hampered due to commanding 80 units with multiple actions and have only a simple "good" or "bad" feedback. Either it always converges on "attack nearest" or "retreat from enemy" to avoid losing units or worst of all no changes or a NaN explosion.

Action ID 42 allows cannons to be controlled more effectively.
Atomiswave
Skirmisher
posted 03-26-19 03:36 AM EDT (US)     382 / 389       
Do you plan to release it to the public?
murdilator
Skirmisher
posted 07-21-19 05:50 AM EDT (US)     383 / 389       
Is this thread still active? Is anyone still interested?
Atomiswave
Skirmisher
posted 07-24-19 09:17 AM EDT (US)     384 / 389       
Ofc, we are still waiting for new version of your AI projects. Helot Major is great.....
Panmaster2014
Skirmisher
posted 07-26-19 07:47 AM EDT (US)     385 / 389       
edit:
What new things have been discovered?

What's the most efficient way to detect and delete settlers stuck between buildings?

What causes lag? Attack-plans or build-plans?


edit: edit:
Now have:
unlock all homecity cards, taunts, gates, wonder powers, HC destination, treaty time, repair, cancel train, eject garrison.

Building rotation is far too difficult.
Abilities are quite close but there's 1 parameter I can't identify. I've found where the explorer plans use ability 91 sharpshooter and have found the entire code but it takes 1 unknown parameter as well as guardian ID, explorer ID and ability ID.

[This message has been edited by Panmaster2014 (edited 08-09-2019 @ 00:40 AM).]

murdilator
Skirmisher
posted 11-02-19 12:46 PM EDT (US)     386 / 389       
I have added a new AI for download:

https://www.moddb.com/games/age-of-empires-iii-the-asian-dynasties/downloads/ai-9-the-big-daddy

This AI trains 4 unit types, and upgrades all economic upgrades for Natives and Asians.

All AIs redone with new calculations.
murdilator
Skirmisher
posted 05-08-20 08:21 AM EDT (US)     387 / 389       
AI trains less of units with 4 unit types but with 3 unit types it trains more in blocks (that is to say it trains too much of one unit). This said, AI works with more interesting combinations, and it is possible to add behavior for certain cards such that in Industrial Age the Computer favors the cards over others. An example of this would be my Japanese AI and British AI which use Shipments and Rockets to supplement their armies. The Spanish AI and Russian AI also send a set of Heavy Cannons.

This movement and changing up of AI is possible only with some cards, in which you do not jack up the deck completely. Also, AI basis for my AI does not use Level 40 Cards. It can use level 25 Cards. If a card is pre-researched, either by start or custom home city, the computer player can and will use those cards on low levels automatically (Levels 5-20). It is also in the code to favor Native Warrior Shipments. An ideal AI would use some shipments for each civ, and for Chinese and Iroquois perhaps use Shipment Handling to send cards (lategame unit shipments) when appropriate.

The article I wrote here is a report on AI behavior and I intend to share the little things I have found work. In my AI the Japanese Shipments are over 5000 in value so they beat the Shogun Shipment by far. Also another factor in Japanese AI is that I've put a low priority for the Daimyo and Shogun Units, such that it can focus more on Naginata Riders. This is not ideal, but it works better overall for now. Making a Mansabdar Monitor for Shoguns/Daimyos doesn't work right; I would have to ask others how they've done it (and this is because training an un-enabled unit for a civ bugs up the AI).

[This message has been edited by murdilator (edited 05-08-2020 @ 08:23 AM).]

AlistairJah
Skirmisher
posted 06-16-20 07:11 AM EDT (US)     388 / 389       
@Panmaster2014 You have to manually count the ability's index in powers.xml and abilities.xml

It can be tedious for some, but not for you since you literally counted each civ's HC Card ID lol

The problem is that no matter what player you put in the parameter, YOU (I mean, as the human that owns the game copy) have to "confirm" the cast in order for the ability to work. The AI itself can't cast. I absolutely have no clue how to circumvent it...

Also, I don't know if you have noticed, but many of the console commands behave unreliably when you reference them in GroupAI or GroupXS. I tested repairUnit(), specialPower() and the HC gather point functions. I don't know why they work when used as a command, but not when used by the AI...
murdilator
Skirmisher
posted 08-13-20 11:36 AM EDT (US)     389 / 389       
I have tested the AI 9 - Big Daddy AI on Hard on NR20 and it works: It produces villagers, fishing boats, upgrades, and Towers and Military. It gets to Industrial (mainly because it builds military in Colonial and Fortress), not always to Imperial, unless it begins on a Custom Map with extra resources/villagers. On Custom Maps with big starts it can work well for a NR10 AI, though the N3O AI which it was based on is primarily a Post-Imperial DM AI.

I wanted to mention this because I find that it's hard to get treaty games unless you play NR40 or something long like that, and the AI gives players the option to have a game with their friend on LAN or play 1v1 Solo. The Big Daddy does do decent on Rush Games, and booms up and ages up, but was primarily tested on Custom Maps. It is aimed more to fun, and less to spamming troops, unlike the previous AIs that I have done.

The AI is less aggressive than a Vanilla AI, but should give a better account of itself in units and especially using the civilization's special units. The AI occasionally makes use of its consulate. I had to make it up to 0.6 on the UnitPickerPreference for it to do this.

I do not wish to make a master AI, but rather several different kinds of AIs, each with its own forte and weak points. I encourage other designers to take ideas from my works, and add to their own creations. That way we keep a public sentimental ownership, rather than a private ownership. If there ever is an AI in the future AOE3 game series that is too good, then someone will have to make a degraded version, like a reverse pattern from that AI. I never hope the day comes when custom AIs will be surpassed by conventional ones.

In development, the AI can use Native Warriors, Mercenaries, and the like, but it has to be told to build trading posts and have a Native Bias: in the UnitPickerPreference it is 0.5 + Native Bias / 2.0.
« Previous Page  1 ··· 10 ··· 14 15 16  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires III Heaven | HeavenGames