Ai building walls/gates

Post Reply
User avatar
Savra
Posts: 5629
Joined: Wed Aug 01, 2018 6:21 pm

Ai building walls/gates

Post by Savra »

I was looking through the ai's build command list and started wondering if we could try and allow them to build walls and gates around factories and megas.

The reason I say this is because the ai will already build towers and factories around the tc, and if they have a factory built next to the tc, they could build a wall or gate around the factory. In the end the aims would have some fortified tc's that a player might actually have to use some breacher units on, especially when the new balance update comes.

The way it might look is:

Code: Select all

{"production Role":"TASK_FACTORY_BUILD_DEFENSE", "trnRace":"RACE_HUMAN", "buildPriors" : [{"weight":10, "unitList":{" unitTypes":["UNIT_WALL", "UNIT_GATE"]}}]}
For elves we could use a parapet or wolf den in place of a gate.
User avatar
Anchar
Posts: 1884
Joined: Sat Jun 27, 2020 2:39 am

Re: Ai building walls/gates

Post by Anchar »

I am for it. The main weakness of the AI opponent is their lack of proper defense. Great idea.
User avatar
Savra
Posts: 5629
Joined: Wed Aug 01, 2018 6:21 pm

Re: Ai building walls/gates

Post by Savra »

Yes, I am in agreement on the part about "lack of proper defenses", undead for example only have 1 and they constantly build them, transform them, and send them on their way only to have them die half way before getting to the battlefield. I added their other towers to the list and it improved them quite a bit, also I have the skull gate already made, however I would need permission to json it in for the undead to use. https://ageofstrategy.net/viewtopic.php ... =60#p93014

Anyway, @Alexander82 what do you think?
User avatar
Shark guy 35
Posts: 1294
Joined: Mon May 11, 2020 6:00 pm
Location: The United States Of America
Contact:

Re: Ai building walls/gates

Post by Shark guy 35 »

Yes, AI can easily be defeated with a strong attack, as they seen to never use walls.
"A good plan, violently executed now, is better than a perfect plan next week".
-General George S. Patton
User avatar
Savra
Posts: 5629
Joined: Wed Aug 01, 2018 6:21 pm

Re: Ai building walls/gates

Post by Savra »

@Stratego (dev) I'm fairly sure this is possible so what might your thoughts be on this for AOF and possibly the other variants as well?
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Ai building walls/gates

Post by Stratego (dev) »

you mean simply building walls around factories? would that be a wise decision from the AI? - at least i never build walls around my factories. i rather find walls on bottlenecks of land like between hills so build short walls there to keep enemy far.

however everything is possible, the thing u suggested also, but naturally : needs coding.
User avatar
Savra
Posts: 5629
Joined: Wed Aug 01, 2018 6:21 pm

Re: Ai building walls/gates

Post by Savra »

Well, it should be fine. Theoretically if an ai builds 4 factories around one tc, they would have 8 spots to build at. With those 8 spots and the fact that most races have gates, they are more likely to have enough room to maneuver their units around. For races like elves, they could use wolf dens or other towers in place of a gate, allowing for them to pass through and still have use for such structures. Orcs don't have any problems with getting through there walls so they don't have to worth.

Furthermore, if a ai built a tower at one section of the tc, they wouldn't be building any walls around that. So basically the walls are a added defense to protect their factories in place of missing towers.
User avatar
Anchar
Posts: 1884
Joined: Sat Jun 27, 2020 2:39 am

Re: Ai building walls/gates

Post by Anchar »

In fact, I agree that the walls of people and undead will rather interfere with the AI, but the bottom line is that the AI is weak and doomed to fail in advance due to 2 reasons:

1) He does not use the potential of defense and construction to the full. Of course builders are a little more useful now than when I first played, but randomizing centers is a pretty weak defense. I believe that his builders could build more structures, which would make the AI more difficult. It would also be nice if they tried to build mega buildings.

2) The player, in turn, can build up the entire map with his towers and start spamming for example with catapults. AI, since he thoughtlessly goes into the attack, is doomed to lose his fighters from defense over and over again, while the player, on the contrary, accumulates his strength.

This is a problem with all games. Although in the galaxy era, towers when I played towers were less useful and the fight with the AI was more difficult. In the era of world wars, I think in vain the towers were added there it was possible to leave trenches and hide anti-aircraft, anti-ship and anti-tank guns in these trenches, which would be more interesting, more realistic and would give AI hope for victory.
User avatar
Savra
Posts: 5629
Joined: Wed Aug 01, 2018 6:21 pm

Re: Ai building walls/gates

Post by Savra »

Well, I modified the undeads ai so they produce all their towers, so that improved them a bit.

I think the walls would improve their rear tc's as well plus it would stop them from sending builders to attack your base for a while.

Also the ai can build megas, its just rare.
User avatar
Anchar
Posts: 1884
Joined: Sat Jun 27, 2020 2:39 am

Re: Ai building walls/gates

Post by Anchar »

By mega buildings, I meant that he would build them without fail, and not because some builder accidentally got such an idea.
User avatar
Savra
Posts: 5629
Joined: Wed Aug 01, 2018 6:21 pm

Re: Ai building walls/gates

Post by Savra »

This might have something to do with the fact that the ai has a small percentage of building a mega building, also ai won't build factories or Megas if an enemy (even neutrals) are within 3 turns from their tc, and finally having space to build it. I actually watched a scaledfolks ai actually build 3 temples under these conditions and the others almost did so as well.

I could increase their chances of building Megas though if @Stratego (dev) and @Alexander82 wouldn't mind?
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Ai building walls/gates

Post by Stratego (dev) »

we must not. AI will lock itself.
actaully we should remove all megas to be built by AI if we want to be sure not to lock in itself....
User avatar
Savra
Posts: 5629
Joined: Wed Aug 01, 2018 6:21 pm

Re: Ai building walls/gates

Post by Savra »

What do you mean by locking themselves?

Currently they only have the weight set to 10 on while everything else is set to 50 or has higher priority.
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Ai building walls/gates

Post by Stratego (dev) »

lock means it can "block" the way out of a corner.
and since that building is very very very long to build AI will not get out in time to be a competitive opponent.
User avatar
Savra
Posts: 5629
Joined: Wed Aug 01, 2018 6:21 pm

Re: Ai building walls/gates

Post by Savra »

I have never encountered the ai doing this but rather building them in places were they can get around them. Also I believe the ai still has to factor in the 3 turn conditions with the enemies. As I stated with the scaledfolks who met the perfect situation with this, they had plenty of room to maneuver around their temples and even were able to build up to 3.

Basically it just has to do with the conditions. Also if I'm not mistaken it takes 2-3 TC's to be able to produce additional mega buildings correct?

I could experiment with the ai to see how well they do with building Megas on maps, plus we could make it so they have to meet a certain condition that requires the enemy to be a certain distance away before they start building Megas.
User avatar
Savra
Posts: 5629
Joined: Wed Aug 01, 2018 6:21 pm

Re: Ai building walls/gates

Post by Savra »

Btw, the weight was 100 not 10, my mistake.
Post Reply

Return to “Archived - Other”