Page 1 of 1
AI upgrade
Posted: Sun Aug 13, 2017 11:28 pm
by Sunrise Samurai
In the interest of building a better ai, I have a suggestion to improve its base building ability. The current ai has a simple, effective routine that many players, including myself, often copy for it's ease of building and capability for protecting tcs. My suggestion is that the ai should start out prioritizing factory buildings, same as now, until it can build no more. Then, prioritize castles next, wherever possible. Most maps won't fit many, especially since the ai will attempt to build them adjacent to tcs, as usual. This at least ensured the ai will try to have castles. Finally, towers are built when factories and castles are no longer possible. Towers are built first in empty places adjacent to tcs, then in empty places adjacent to factory buildings. When these are all done, workers will attempt to build siege equipment in a location adjacent to themselves or assist other workers.
So in short, order of priority and location is
1. Factories, adjacent to tc
2. Castles, adjacent to tc
3. Towers, adjacent to tc
4. Towers, adjacent to any factory building
5. Catapult/battering ram, adjacent to any worker.
Re: AI upgrade
Posted: Sun Aug 13, 2017 11:46 pm
by Alexander82
I agree
Re: AI upgrade
Posted: Mon Aug 14, 2017 12:28 am
by Sunrise Samurai
Is that simple enough to program? Also, have the ai prefer stronger towers, namely fortress in human, rather than the flimsy, lower range thing it currently builds.
Re: AI upgrade
Posted: Mon Aug 14, 2017 2:44 pm
by Detros
Sounds reasonable. Even better could be to have AIs with several strategies of what to prefer building in which order and randomly pick at the start of some maps.
But shouldn't this be a general change to the AI at AoS and then, if successful, transferred to other variants?
Re: AI upgrade
Posted: Mon Aug 14, 2017 2:53 pm
by Alexander82
Also we shoul make sure that ai research upgrades for the units that is using
Re: AI upgrade
Posted: Mon Aug 14, 2017 3:46 pm
by Sunrise Samurai
I can't say that is a bad idea at all, but the first part I want to see is just some extension to it's overall building process, without specific strategies. My suggestion was merely an expanded layout of the original, which gives a higher chance for castles, fortification around factories, and then keeps workers busy on basic siege equipment.
Re: AI upgrade
Posted: Mon Aug 14, 2017 4:37 pm
by Puss_in_Boots
I think AI has trouble recognizing the definitions of the castle, thus causing them to create castles on an unavailable space.
It was from an old topic I remember reading a few months ago. Don't know if it is still not possible, but it would be nice if they could.
Re: AI upgrade
Posted: Mon Aug 14, 2017 4:42 pm
by Sunrise Samurai
I've seen it happen. The ai on rare occasion attempts to make one as a "factory" and has the space available to do so, resulting in a successful attempt.
Re: AI upgrade
Posted: Mon Aug 14, 2017 4:51 pm
by Puss_in_Boots
I believe you, but I still want a screenshot.

Re: AI upgrade
Posted: Mon Aug 14, 2017 5:49 pm
by Sunrise Samurai
Lol I think I've only seen it twice, maybe three times. Out of probably thousands of games.
Re: AI upgrade
Posted: Mon Aug 14, 2017 7:01 pm
by LordOfAles
+1
Re: AI upgrade
Posted: Mon Aug 14, 2017 9:07 pm
by Sunrise Samurai
At the very least, setting castles in their own category with a higher priority than towers would mean more locations are checked. If none work, the ai moves on to towers. And adding towers next to any factory means ai bases are far more fortified.
Re: AI upgrade
Posted: Sat Sep 09, 2017 3:46 pm
by Sunrise Samurai
Puss_in_Boots wrote:I believe you, but I still want a screenshot.

Well I finally got that screenshot, but it won't upload because it says the file size is too big. Any ideas how to shrink it on an Android phone?
It's rather surprising to see the rare occasion when it happens. This time it's a mansion, and the ai started it turn 1 lol.
Re: AI upgrade
Posted: Sat Sep 09, 2017 3:47 pm
by Puss_in_Boots
You can post the image on imgur and give the link to the image right here.
Re: AI upgrade
Posted: Sat Sep 09, 2017 8:25 pm
by Sunrise Samurai
Age of Fantasy
https://imgur.com/a/0pcgT
Here. The screenshot you requested.
Re: AI upgrade
Posted: Sat Sep 09, 2017 8:35 pm
by Puss_in_Boots
Its great!
But the terrain and placement is kinda weird.
I notice the mountain bear.

Re: AI upgrade
Posted: Sat Sep 09, 2017 9:02 pm
by Sunrise Samurai
Well I didn't exactly expect the ai to start making a great building. It was in the map "mountains" with a 3ai orc/human/undead vs me as elves.
Re: AI upgrade
Posted: Sat Sep 09, 2017 9:05 pm
by Stratego (dev)
yes, in AOF i let AI toi build mega structures to see if they work right (placed properly)
Re: AI upgrade
Posted: Sat Sep 09, 2017 9:25 pm
by Sunrise Samurai
Currently it's rare. That's why I was suggesting the order of placement outlined in the original post. There's no point in the ai making towers if there's a single location it can build in, even if it only checks adjacent to tcs.
Re: AI upgrade
Posted: Sat Sep 09, 2017 9:28 pm
by Puss_in_Boots
I think it should start building fortresses around TCs and buildings if the nearest enemy unit is no less than 15 tiles away.
Re: AI upgrade
Posted: Sat Sep 09, 2017 9:35 pm
by Puss_in_Boots
Sunrise Samurai wrote:5. Catapult/battering ram, adjacent to any worker.
However, it should be whenever a worker is next to a tower/fortress, so that we don't see workers charge into battle.
Re: AI upgrade
Posted: Sat Sep 09, 2017 9:37 pm
by Puss_in_Boots
And then more builders will start to build wagons beside the catapults to transport them if the nearest enemy is further than 9 tiles away from its location.
Re: AI upgrade
Posted: Sat Sep 09, 2017 9:43 pm
by Sunrise Samurai
No for the proximity rule, best not to complicate it. The ai always starts with rear tcs first, but if it can't build based on enemy proximity, this means it will never build castles on small maps.
I actually said catapult/battering ram adjacent to any worker to keep from needing a specified space. This means the ai would never go on a worker kamikaze, since once a worker has a free adjacent space new seige equipment can be built, making it able to utilize any random space.
Re: AI upgrade
Posted: Sat Sep 09, 2017 9:48 pm
by Sunrise Samurai
Puss_in_Boots wrote:And then more builders will start to build wagons beside the catapults to transport them if the nearest enemy is further than 9 tiles away from its location.
This would be nice, except the ai isn't likely to plot out how to use a wagon as anything other than a 1 power melee unit.
Besides
viewtopic.php?f=115&t=4254&p=41675&hili ... gon#p41675
Re: AI upgrade
Posted: Sat Sep 09, 2017 9:52 pm
by Puss_in_Boots
Oh, yeah! *facepalm* I cant believe I forgot about this topic already.

Re: AI upgrade
Posted: Sat Sep 09, 2017 10:13 pm
by Sunrise Samurai
Lol well, I've missed things like that myself. Besides, the ai is as good with wagons as it is workers with no more space to build.