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.385 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 2 3 ··· 10 ··· 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:
Mister SCP
Scenario Reviewer
posted 09-22-12 07:38 AM EDT (US)     1 / 385       
Have not much experience with it but I'd like to help


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
murdilator
Skirmisher
posted 09-22-12 09:30 PM EDT (US)     2 / 385       
Here is another to look at:


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


I do think that the author knows more than me about what he is doing. I have also just put up my AI for download in the miscellaneous section, though it isn't their yet. It should be compatible with any game version. (Needs a test run though to see if it does, but it should because I removed all of the foreign techs from it).
murdilator
Skirmisher
posted 09-24-12 12:32 PM EDT (US)     3 / 385       
Here, I have uploaded my custom AI, and made it compatible with RE 1.03 Asian Dynasties:

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

Hope it works. If not, just say, because I haven't tested this ingame; just removed the codes pertaining to my mod that I believed in there.
Naitrino
Skirmisher
posted 10-05-12 10:35 AM EDT (US)     4 / 385       
Hello there!

While i was testing Draugur and Mandos Ai mods... I came up to a problem that i still cannot find a solution..
Im not familiar with programming so maybe you could help.

Since these Ai packs have a lot of work done on them we could try make them even better..

The problem...

When i play a map with 5 enemies sometimes ( almost all times ) some civs refuse to age past age 2 or they just age slower..
Slower maybe way too much than it should.. I cannot find the part in the AI that has to do with the age up thing.. I found like 3 parts that has to do with it and i dont find somethin wrong there either.

Any ideas?
Mister SCP
Scenario Reviewer
posted 10-05-12 12:03 PM EDT (US)     5 / 385       
keep in mind the max age and the age up times also have to do with difficulty and personallity (e.g. rushboom factors)


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
Emperia1
Skirmisher
posted 10-05-12 12:16 PM EDT (US)     6 / 385       
Draugur AI has too many flaws, I've been working on improving the AI for quite some time (should be released in a month or so).
Naitrino
Skirmisher
posted 10-08-12 06:05 AM EDT (US)     7 / 385       
@ Mister SCP

Well i am testing on "Hard" Difficulty and sometimes they stay at age 2 forever. (Recorded Game showed me 3000 ++ on each resourse and they only create army).

The Villagers just sit there and the Ai creates them till it reach the number it needs for each age but still doesnt use them even if there are farms with 2/10 working.

This happens 80% of times to civs that where attacked... After the attacks they stuck. The original Ai was makin them freeze completely.

I believe that there are some conditions that Draugur has put for updating that "stuck" the game...
With my few knowledge i cant really find out what code lines are these that freeze the Ai to ageup ...

Any ideas ?



Another thing about the Updates.

There are varius updates included in the Agemonitors..
Like this:
veteranUpgradeMonitor

If the computer cannot work this out, is this a reason that it stucks there?
The original AI system, how was that working out the unit updates ?

[This message has been edited by Naitrino (edited 10-08-2012 @ 06:16 AM).]

Emperia1
Skirmisher
posted 10-08-12 11:43 AM EDT (US)     8 / 385       
The original AI system, how was that working out the unit updates ?
It's handled internally (the game engine).

Draugur does not give the AI much freedom, it sort of follows a pattern for each game... and the code is very inefficient.
Felix added too much crap, he shouldn't force unit, arsenal and native upgrades.

[This message has been edited by Emperia1 (edited 10-08-2012 @ 11:52 AM).]

Naitrino
Skirmisher
posted 10-08-12 11:56 AM EDT (US)     9 / 385       
The mod things dont really matter a lot ...

And the AI works much better on fights..

But the age thing destroyes the game..

The unit upgrades should be done on later ages i suppose and not on the second one..

Will changing the lines of ageing get it kinda back to normal ?

Cause the original AI kinda fails all the time no matter the difficulty
Emperia1
Skirmisher
posted 10-08-12 02:48 PM EDT (US)     10 / 385       
The AI you're must be bugged in some way. And on topic.. it'd be best if you waited for my AI to come out.
The mod things dont really matter a lot ...

And the AI works much better on fights..
What do you mean?

[This message has been edited by Emperia1 (edited 10-08-2012 @ 05:18 PM).]

Naitrino
Skirmisher
posted 10-09-12 06:39 AM EDT (US)     11 / 385       
I wait for your mod ofc

I just try to find out why the AI ages up so slowly...

You say that draugur did too many modifications that messed up the game, i said that this doesnt really matter and the modifications are fine really. Its good to have upgraded enemies that are tough and needs efforts to take them down.
If it wasnt for that Ageup problem i would be very happy.

The AI works better on the attacks, i mean that the computer makes better armies and defends its colony much better than it used to be on original AI system.

The Mod i used was at first the draugurs and after that i used mandos mod 5.1. I did put both of them on a fresh original installed game ( not any cracked versions, i do own the game).
So why you believe that my AI is bugged?
Emperia1
Skirmisher
posted 10-09-12 09:37 AM EDT (US)     12 / 385       
So why you believe that my AI is bugged?
Are you on the latest game patch? That could be the problem.
Naitrino
Skirmisher
posted 10-11-12 07:32 AM EDT (US)     13 / 385       
Yes I am ... I use the 1.03 for TAD and installed all the rest for the other games as well...

I tested N3o mod ... and looks that the Ai isnt makin so many mistakes so far...
Emperia1
Skirmisher
posted 10-11-12 08:39 AM EDT (US)     14 / 385       
Yes I am ... I use the 1.03 for TAD and installed all the rest for the other games as well...

I tested N3o mod ... and looks that the Ai isnt makin so many mistakes so far...
Then the maker of the script has made an error.
As for the N3O AI... forcing economic cards to the deck wasn't done correctly, and now there's not really any space for anything else. You won't see the AI vary its selection of units, since they're predefined (which causes a few issues, it's a good ida but needs some form of randomization).

[This message has been edited by Emperia1 (edited 10-11-2012 @ 08:41 AM).]

Naitrino
Skirmisher
posted 10-12-12 11:08 AM EDT (US)     15 / 385       
The makers Error is confirmed.. I am talkin with mandos as well and i tested the mod many times.. There are problems ok ...

As for the n3o i dont know if the units vary or not but so far it ends up to be a tough AI and the ageing goes up well. Until someone make a new mod for AI i will be playing with it.

( I do need to be on expert mode to get enough resistance)

The handipack of Computer on expert mode is 50% i think ??
Cause i will use this myself as well.. Kinda stupid to play with 0% when computer has 50%
murdilator
Skirmisher
posted 10-17-12 12:17 PM EDT (US)     16 / 385       
Ah, good, looks like this thread is going somewhere! How do you guys do? I would love to see other work on an improved version of the AI. Its so awesome to see others' contributing again to the community with truly important works.

This is all very good feedback! The more we have, the better we'll be off.

I think it's important the the AI will eventually upgrade the arsenal, but there is no need for it always to do so in the beginning. How to get rid of this would take some work and at least for myself, some extra research and/or trial and error. However I believe that making the basic rubric of a powerful, yet inflexible AI should be a good start.

As to the N3O AI: (I am the author) There is a lot of room for general improvement. The whole patch idea went a bit too far, so I didn't have enough time to code and test the AI. I apologize that it is quite beta. I admit about the cards; I was just starting to implement these and should look into randomization. Then I realized that if I added too many they would not be included in the deck; there is a better way to do this. Perhaps the section with the '700 wood is greater than 600 wood' could work as a basis for card choice? Then cards would not be so preset.

I wish I could understand how to install forward base building, but I'm not at the stage where I know how to really add new rules: they seemed to bug up on me when I made them, so I didn't try again after my second failed attempt to do so. I just tried modifying existing ones and got it to work decently. Maybe I could take a look at the AI Necro, which seems to have this included.

One thing I would like to note, however, is the importance of allowing India to build elephants; the computer automatically favours them as the best counters (mayne because they are the biggest, costliest unit, like cannons in that way?), and likes to spam them, but on the original Drauger AI elephants are given such a low priority that the Indian AI doesn't do anything but build some sucky units.

Also just another random note: I've found out that giving small multipliers to units really helps the computer's performance in countering other units. (For instance Musketeers having 21 ranged attack, but 1.1x against Cavalry and Heavy Infantry/or Hand Infantry makes the computer extra favour muskets in these situations. I thought it neat how I could manipulate the AI in this way, making it train units that human players usually train in the same situations). Or take for instance Dopplesoldners having 1.1x against Pikemen units. The computer magically seems to favour more Dopplesoldners now as Germany. The same goes for Spain with Rodeleros, although I made them all build more often ranged infantry, because that is what still dominates Age of Empires III lategame; there is no longer as much lagg as the computer struggles to surround your units with too many hand infantry.

I still really ponder about the economy and would like to improve it. Maybe including cards like Extensive fortifications would also help? I found that the best card I gave them was improved buildings, although they often get it way in the beginning, potentially harming their starting economy. Really helps for a turtle and late-game though.

Question: is it possible to make the computer use Bank wagons to build buildings other than banks and at the same time build banks? Lets say, let them use the bank wagon to construct Revolution Bakeries (I building I added, buildable via a Bank Wagon shipped with the Fort Wagon once you revolt)? It seemed to bug up for me when I tried. Also, I think there is still a bug for the Discovery Travois as well and I would love to fix that if possible. I'm also not sure if European civs would use a bank wagon to build an Asian Bank either. Any ideas anyone? (Perhaps I could look at this in the travois section)


Ah, this is so exciting! Thanks a lot for the comments Emperia1 and Naitrino! I will definitely hope to improve perhaps sometime. I really admire the constructive criticism you guys gave. Good luck and God bless you on your work Emperria1! I look forward to it as well!



Best of regards,



murdilator

[This message has been edited by murdilator (edited 10-17-2012 @ 12:44 PM).]

Naitrino
Skirmisher
posted 10-18-12 07:14 AM EDT (US)     17 / 385       
Its great to see people still interested in this great game

I am keep testing on your mod, i find it hard enough for me and i like that a lot..

There are parts you can improve but i dont think i really know what to change so it gets better and everytime i tried i messed somethin up completely...

I played on Amazonia and the Ai did transfer units on enemy side but never attacked the enemies, The ages go up exactly like they should i think.

The enemies create units that are the same... but i dont really mind since its still hard for me to win them!

As for your patch... And improvements that are easy to be done....
--> You should make AI upgrade walls ( whenever they built)
--> If possible fix the walls over trade roots. (Its around in other mods and i think its easy to add it).
--> Any idea why the AI stuck when they transfer units on other sides? (Try amazonia map for instance)
--> some people say that your unit selections are too standar, i dont know about this...

"Question: is it possible to make the computer use Bank wagons to build buildings other than banks and at the same time build banks" --------> I dont know anythin about this but i suggest use an existing type of this like the fort wagons and just change the inside of its code.( and add maybe the new wagons?? )


I will keep playing this patch and see if i can help with my opinions... I wish i could learn to change the code without ruining the whole game
murdilator
Skirmisher
posted 10-18-12 10:32 AM EDT (US)     18 / 385       
Interesting thoughts. I agree the AI should be smarter on water maps, and I don't know anything other than to perhaps make them more water friendly, like build more warships, and perhaps make a forward base rule (I know how to do in theory, but not otherwise), making the computer for instance try and build barracks on your island on maps like Caribbean. I haven't made them upgrade the new naval upgrades either, or many of them at least. That would also include the native warships. I tried to get them to build Buccaneer Ships for the Native Americans, but they really rarely build them. Then again on land maps, we wouldn't want to set the regular multipliers for ships too high in that they build too many warships on land-water maps, for instance, Araucania or Saguenay. It requires simple testing.

You can be encouraged because I actually don't know too much about AI coding. I basically just copy and paste useful code onto a separate notepad document and try and use it later and see whether it works. Then if it doesn't (after I apply it in the appropriate places), I just use my backed up file. It might take me a couple times of testing and looking through the document before it works, and its best I find adding one simple feature at a time.

If you want to change the unit preferences, there are two places: one is the specific unit chart (when you open the AI Main file, just press ctrl-F, insert cUnitTypeMusketeer, and press enter. It should bring you there), the other is the civ strategy preference where you change the balance of Infantry, Cavalry, Artillery, Native Warriors and Trade Routes. But besides this, I purposely allowed the AI to build more musketeers because that's much more cost effective than Halberdiers or Pikemen in the long run; its much more fun having civs build their royal guard units. I know for instance Spain could build more Rodeleros and I tried that once, but Spain became really easy to counter (sometimes) and they couldn't beat walled settlements. But I liked their fast hand-based military then. Maybe I will change military to be more civ-oriented rather than No-Rush oriented. Its quite easy if you want to do this, just set the values for Musketeer at 0.5 or 0.4 while placing Pikemen at 0.6 and Rodeleros at 0.85.

Just a note about the AI: I made it build more ranged infantry because it uses Attack-Move, or they basically attack units on site without much tactics. This is also the reason why they don't attack as often always when they see your base, because if you use Attack-Move with units on enemy buildings they will just stand there and do nothing, until an enemy comes in their LOS. There are only two civ exceptions that are hardcoded: Japan and Germany. You cannot make these civs build specific units, so I had to also balance the game in a way which favoured these AI's to build more complementary units. However, it is possible to change these civs' bias on artillery, which I for one think Germany builds to much of (They should build more Infantry). Japan seems ok, but maybe more infantry instead of artillery.

General note about the AI: Although the AI has attack plans on land, I do not know if they have water attack plans of any sort; they just try to land off units, and this is quite inefficient, especially as warships are slower. It would be cooler if I could make them come in waves (then make warships a bit faster and not as long by 10%) with several warships.

As for overall improvement of the patch, I guess you may be referring to game-play in my patch (could have slight changes here and there but is quite competitive; Japan and India could receive a better early game; Germany may be too good; Sioux need better colonial age; Iroquois economy mixed up mid-game, more economic improvements), but you could be referring mainly to the AI. I admit I balanced it for more Deathmatch games and Land Supremacy games. I neglected water, and the Natives especially need improvement on the water, as their canoes are extremely weak. I also should increase the villager limit to 99 (I upped it somewhere middle in the document from 70 to 80ish or something, but in the beginning of the document I realized I hadn't changed the Imperial Age of amount of villagers, which was listed as 70. Therefore I often gave them a minor handicap. Also the Natives build 10% more villagers for the firepit).

I've thought the same about banks, but not been serious enough about testing it out.

I haven't thought about the trade route thing over walls, although it would magnificently help the AI. I will not shrink the wall size down to 61.0 or 60.0 (down from 62.0) unless I make the computer build their buildings tighter (3.0 meter distance). Although this allows much more room, and I hoped to make this for housing, farms, mills and plantations, this makes their units stuck by their buildings, often preventing them from doing too much with their military inside their own base. I do believe, however, that farms, mills and plantations can also be governed by a different rule (means I could modify this without changing the gameplay, and can make them build barracks in a certain location but packed with perhaps eight barracks, while keeping their base orderly and preserving fighting room), but I would like them to be able to build several walls if I can manage this, and they will also then with their lower wall size not cramp into each other as they are in the habit of doing. I believe this possible, but it needs a little testing.

I think rules could be added which could make walls be built in several layers and even tighter on maps like Great Lakes (see beginning in the rules list for different maps). Originally in the N3O mod, I had planned to make Great Lakes 20% larger and Prairie Rivers 20% smaller, but it interfered with playing it on Online Rated Games. I just recently looked back at my AI a few days ago after I saw this thread start to gain activity, so its likely I can fix several errors if I learn to add custom rules.

I would also like them to build Russian Forts with the Musketeer fort building card, but then they might make all of their musketeers from wherever they are on the map try and build it. That would be actually kind of funny to watch if you had spies and see one after one musketeer tottering to build the fort. Another problem with this is that they might try and build the fort over and over again in the same location even though it just got destroyed by mortars. Hehe...Sounds like human players who play Russia online, right?

This project is ambitious, but I'm sure many will like to help if they have the time. The hardest thing for me as a coder to accomplish is getting the firsts ideas of changes. You've already done a great service to me, and I hope you'll have time for more!



Have a God Bless and good day!




regards,



murdilator
Emperia1
Skirmisher
posted 10-18-12 03:10 PM EDT (US)     19 / 385       
I tried to get them to build Buccaneer Ships for the Native Americans, but they really rarely build them.
You need to create a maintain plan, see the rule 'navyManager'.
General note about the AI: Although the AI has attack plans on land, I do not know if they have water attack plans of any sort; they just try to land off units, and this is quite inefficient, especially as warships are slower. It would be cooler if I could make them come in waves (then make warships a bit faster and not as long by 10%) with several warships.
You can modify the attack conditions in the rule 'waterAttackDefend', but you can't make naval attack goals or a naval unit picker.
I would also like them to build Russian Forts with the Musketeer fort building card, but then they might make all of their musketeers from wherever they are on the map try and build it. That would be actually kind of funny to watch if you had spies and see one after one musketeer tottering to build the fort. Another problem with this is that they might try and build the fort over and over again in the same location even though it just got destroyed by mortars. Hehe...Sounds like human players who play Russia online, right?
That's easy to do, you just need to grab a unit that's actually inside the base.
Once a building fails to be constructed the plan is also destructed, so it won't be built again until the next rule loop comes and a new plan is created.

Here's how it might work (though the engine might not use the ID properly and find a Musketeer itself, if it does work it's limited to one Musketeer):

/*
* Makes musketeers build forts.
*/
rule makeFortsWithMusketeers
inactive
minInterval 60
{
// Don't continue if we're not allowed to build anything.
if(cvOkToBuild == false)
return;

// Don't continue if we can't make any forts.
// cUnitStateABQ counts units being made or buildings being constructed.
if(kbUnitCount(cMyID, cUnitTypeFortFrontier, cUnitStateABQ) >= kbGetBuildLimit(cMyID, cUnitTypeFortFrontier))
return;

// This is the query we use to find a Musketeer.
static int baseUnitQuery = -1;

// Create the unit query.
if(baseUnitQuery < 0)
{
baseUnitQuery = kbUnitQueryCreate("Base Unit Query");

// This makes sure the unit returned by the query is not outside of our base.
kbUnitQuerySetPosition(baseUnitQuery, kbBaseGetLocation(cMyID, kbBaseGetMainID(cMyID)));

// This makes sure the unit returned by the query is not more than 50 meters away from the center of our base.
kbUnitQuerySetMaximumDistance(baseUnitQuery, 50.0);

// This makes sure the unit returned by the query is ours.
kbUnitQuerySetPlayerRelation(baseUnitQuery, cPlayerRelationSelf);

// This makes sure the unit returned by the query is a Musketeer.
kbUnitQuerySetUnitType(baseUnitQuery, cUnitTypeMusketeer);

// This makes sure the unit returned by the query is alive, and not being created.
kbUnitQuerySetState(baseUnitQuery, cUnitStateAlive);

// This makes sure the unit returned is not dead.
kbUnitQuerySetIgnoreKnockedOutUnits(baseUnitQuery, true);
}

kbUnitQueryResetResults(baseUnitQuery);
int numMusketeers = kbUnitQueryExecute(baseUnitQuery);

// Check if we have a Musketeer.
if(numMusketeers >= 1)
{
// The ID of the Musketeer unit.
int musketeer = kbUnitQueryGetResult(unitQueryID, aiRandInt(numMusketeers));

// Build a fort if we're not doing so already.
// The fort will be constructed in the home base.
if(aiPlanGetIDByTypeAndVariableType(cPlanBuild, cBuildPlanBuildingTypeID, cUnitTypeFortFrontier) == -1)
{
int planID = aiPlanCreate("Construct Fort", cPlanBuild);

// Set the building.
aiPlanSetVariableInt(planID, cBuildPlanBuildingTypeID, 0, cUnitTypeFortFrontier);

// Set the priority.
aiPlanSetDesiredPriority(planID, 100);

// Mil vs. Econ.
aiPlanSetEconomy(planID, false);
aiPlanSetMilitary(planID, true);

// Set the escrow.
aiPlanSetEscrowID(planID, cMilitaryEscrowID);

// Add the musketeer builder.
// Should not be detected as a type, rather a unit id.
aiPlanAddUnitType(planID, musketeer, 1, 1, 1);

// Set the base.
aiPlanSetBaseID(planID, kbBaseGetMainID(cMyID));

// Activate the plan.
aiPlanSetActive(planID);
}
}
}

If you want the AI to build more different units (i think that would be better than setting specific preferences), you need to increase the number of types for the unit picker to select.

In the rule 'militaryManager':

if (cvNumArmyUnitTypes >= 0)
gNumArmyUnitTypes = cvNumArmyUnitTypes;
else
gNumArmyUnitTypes = 3;

At the moment only 3 units are picked and when the AI is trying to train maintain all the Consulate armies they can't make anything else.

This rule increases it to 4 upon reaching the Fortress Age and makes extra space for Consulate armies.

/*
* Updates the number of units for the unit picker to select based on age.
*
* Created 12:24PM 10/13/2012
*/
rule updateUnitPickerUnitTypes
inactive
minInterval 120
group secondAge
{
// Quit if there is no unit picker.
if(gLandUnitPicker < 0)
return;

// The number of units we want to be training.
int numTypes = 0;

// Define number of units to pick based on age.
if(kbGetAge() == cAge2)
numTypes = 3;
else if(kbGetAge() >= cAge3)
numTypes = 4;

// Asians need extra space for Consulate armies.
if(civIsAsian() && gConsulateFlagChosen)
{
if(kbGetAge() == cAge2)
numTypes = numTypes + 1;

// Only two extra types.
else if(kbGetAge() >= cAge3)
numTypes = numTypes + 2;
}

// Update the unit picker.
kbUnitPickSetDesiredNumberUnitTypes(gLandUnitPicker, numTypes, 0, true);
}

By the way.. any form of planned attacks (opportunity scoring is in the script), resource gathering (partially), claiming a trade post (opportunity scoring is in the script) and water transport (for attacks) are directly handled inside the game engine.
So there are certain limitations as to what can be done (eg. we can't fix that weird transport bug).

Try using Notepad++ for editing, which can be downloaded here.

If you need any help with anything, let me know!
I'll be releasing my AI script pretty soon.

- Emperial

[This message has been edited by Emperia1 (edited 10-19-2012 @ 09:43 AM).]

murdilator
Skirmisher
posted 10-21-12 07:26 AM EDT (US)     20 / 385       
Thanks for the help! I will greatly appreciate it.

I haven't gotten that far on those things suggested, but I have gotten the Computer to upgrade walls. Also, I have found out the reason why the Asians and the Aztecs do not build gates: It is a bug in the techtree. They do not have "cWallGate" enabled in their "Age0Buildings" techs. They have WallConnector, WallStraight2 and WallStraight5, but not "cWallGate." All the other civs have "cWallGate" enabled. This however, is visible to human players, by which the converting to gate is just an option, but the computer has to somehow detect this in the game code itself and see if it can "build" gates.

EDIT: I think this may be the same for decks, that if you forbid one card you may hurt usage of using things from the same card row which use the original forbidden card as a prerequisite tech.

I've tried messing around with the decks to some degree, and it seems to have worked decently. I have gotten rid of some of the earlier economic cards being in the decks (Food Silos, Rum Distillery, Sustainable Agriculture, Ironmonger, Silversmith), but maintained later ones (Refrigeration, Royal Mint, Textile Mills), given back some more mercenary and unit shipments, and allowed the computers to have more military shipments. I still have to test this for more of them.

EDIT: I've managed to get a lot of the things I wanted in the decks (Military Improvement shipments, some specific to civs, will add more). Also I'm adding back some of the starting unit shipments (some mercenaries).

I was wondering, would it be possible for the computer to "think" that Economic Theory is greater than Food Silos, for instance? I could give it its own value, but I thought of something more deep. Perhaps certain shipments are valued more, or favoured, such as the case with 700 resource shipments being greater than 600 resource shipments; Or I could simply make them include some later economic shipments without forbidding other shipments.

EDIT: I found out a good way to do this, but still would think it cool if the computer would favour shipments in the grade of their availability instead of always favouring them.

I had a problem making the Indian AI use Mughal Architecture. I'm pretty sure I tested it before on an earlier version of the AI than now is released, and they had this card in their deck.

I have also tried to make them have less wood cutters by changing the resource priority from economic/2.0 to taking away /2.0, and allowing equal gatherers for all resources.

EDIT: Letting them have less wood-cutters is a partially bad idea, because although they build mill/farms/plantations/paddies earlier, they hardly have enough wood to construct the right amount of things.

I'm thinking also about making the Computer prioritize shipments like Indian 1300 wood infinite > 900 wood infinite > 800 wood infinite > 500 wood infinite > 300 wood infinite.



regards,


murdilator

[This message has been edited by murdilator (edited 10-21-2012 @ 03:04 PM).]

murdilator
Skirmisher
posted 10-21-12 04:30 PM EDT (US)     21 / 385       
I've uploaded a new version of my AI.

New features, a summary:

- AI builds and upgrades walls
- has fixed decks, plus decks improved
- most early economic improvements removed; replaced by standard crates and unit shipments; civs will now have military improvements and the better economic improvements, and will ship these appropriately (I will add some more later, but this is a solid version).
- Slightly changed unit preferences for Spain, France, Japan and India. Japan will build more infantry and less artillery; has more military cards. India will build MUCH more infantry, less elephants, ship a reasonable number of Urumi, Howdahs or 1300 wood (not berserk on Urumi, Howdah, or 1300 wood).
- Deathmatch gameplay should be improved as AIs build an extra town center, and Asians build two less castles (to conserve space).

(AI itself, made compatable with regular TAD):

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

or (N3O Fan Patch)

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


regards,


murdilator
Emperia1
Skirmisher
posted 10-21-12 06:56 PM EDT (US)     22 / 385       
Remember that unit preferences should be based on infantry/cavalry/artillery biases... i don't think predefining them is a good idea.

[This message has been edited by Emperia1 (edited 10-22-2012 @ 11:47 AM).]

murdilator
Skirmisher
posted 10-22-12 08:39 AM EDT (US)     23 / 385       
It will take me a while to fully understand what you wrote above. I am still amateur at this, but want it to progress forward. That being said, I apologize if I do not understand fully what you write right away, because I am trying more or less with common sense across the board. I am no computer coder, but more than rightly a scenario designer.

About Civ-Specific units:

If in a rush game, I agree with you; and certain civs, like France, Spain, etc. might do better without special unit preferences. And I can attest to that fact, I now think of removing at least those. I think the Dutch could use more Ruyters with the Halberdiers instead of always just building halberdiers/cannon/skirmisher/hussar. Although that's a good combo, the Ruyter is also very good. But then again the Comp sucks with Ruyters, so its best to let the Dutch build what they want.

I do not have special unit preferences for the Aztecs, Germany, Japan, or the Iroquois.

But now take for instance. The British computer will regularly choose Grenadiers as a counter to cavalry on my patch if I do not make them build musketeers (because grenadiers have 1.5x against). That is why I make them build muskets, and plus muskets, not dragoons, are the main British unit.

Portugal and the Ottomans seem to play out decently as well. I could keep preferences for Musketeer civs, and remove it for more melee based civs. I purposely made them favour more musketeers and janissaries because they would otherwise not stand a chance.

India, I can slightly agree in lowering the need for always Sepoys/Gurkha, and may lower it slighly. I may equalize it with Rajputs, Sowars (more preferred now), Zamburacks, but I want them to mainly build less mercenaries, and that could be an easy thing to do. The most important thing I don't want India doing is overspamming elephants. They could have like 4-6 in an army, but the rest should be infantry and Sowars. Then they get Urumi from Shipments or something like that. Then I can replace the Elephant Cards with more Camel-favouring Cards and perhaps 4 Mahouts Shipment or something.

I have thought of removing Musketeers from Germany.

Also: Asian civs should only build 1 type of consulate army, because the later ones hog up population space and take a long time to build. Perhaps the first or the second could always be preferred?

I want to reformat their bases as well. Make them more efficient at building buildings, make them build more important buildings instead of just spamming so many towers, that the wall space may be a little smaller and we might have room for more walls afterwards.

Then more food/coin gatherers could be wanting as well.


Thanks for the advice! I may update on weekends, where I have time to test.


regards,


murdilator

[This message has been edited by murdilator (edited 10-22-2012 @ 08:50 AM).]

Naitrino
Skirmisher
posted 10-23-12 09:41 AM EDT (US)     24 / 385       
On my way testing the new n3o

Will post any comments or any problems i may come up to!
dietermoreno
Skirmisher
posted 10-24-12 00:58 AM EDT (US)     25 / 385       
murdilator, you should make an AI scripting tutorial because it appears that you are more knowledgeable in AI scripting than anyone else here.
« Previous Page  1 2 3 ··· 10 ··· 16  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires III Heaven | HeavenGames