MangudAI-all-in

Upload your latest creations here.
Please note that by posting comments to posts in this forum you forfeit your personal copyright on whatever you post. AI Scripters reserves the right to re-use objective comments in script reviews without requiring the posting author's permission. Credit, where appropriate will be given in such cases.
Post Reply
User avatar
wattle
Swami
Posts: 110
Joined: Fri Aug 15, 2014 1:06 pm
Location: Germany

MangudAI-all-in

Post by wattle »

Hi, I would like to share with you a new AI.
The aim is to somewhat resemble my favorite playstyle.

While I've been interested in AI's for a long time, I've hesitated to sink in the time to try scripting my self.
MrElephant set me up with something to start and I went from there. Thank you :rolleyes:
Some parts were initially generated by Jan1302's and Hawk_Ruralist's AI Builder.
The AI has some snippets from FireBall included and ideally will include more at some point. Thank you :rolleyes:
Thanks as well to all other scripters for helping :rolleyes:

The Code might be poor and my knowledge is pretty limited. I've yet not looked into other AI's, how other scripters do stuff.
I would love to improve it at some point, but on the other hand learning and scripting requires a lot of time for me (maybe others are more talented). So I'm not sure how significant any updates will come in, or if it maybe needs to wait until I retire from work some time in the distant future :lol:


Game version: AoC+UP or AoE2:DE
Civ: Mongols
Map: Tested only on Arabia
Strategy: "Fast" castle, one TC, rush up a castle (main defense), go for Mangudai and push, while prioritize upgrades at the cost of a small eco.
Teamgames: not really tested, does not trade yet, has no proper focus-player management
(I hate too many Villagers, which mostly stress me to keep them occupied, so this AI goes only for 50 Vills for now)

(Some issues and todos are listed in the script)

Update 0.2d 24.07.2022
Mainly fixed something in the ranged-micro script, which was not properly adjusted for the Mangudai play.
Added a hard limit for camps for now, to prevent spamming those in late game.

Update 0.2c 03.07.2022
Main difference is FireBalls ranged micro code, with some adjustments by MrElephant (not sure which).
Also it now builds the castle with 4 builders.
Attachments
MangudAI-all-in_0.2d.zip
(25.88 KiB) Downloaded 17 times
MangudAI-all-in_0.2c.zip
(25.19 KiB) Downloaded 25 times
MangudAI-all-in_0.1.2.zip
(16.98 KiB) Downloaded 41 times
Last edited by wattle on Sun Jul 24, 2022 6:29 am, edited 4 times in total.

TheMaximalBeing
Forumer
Posts: 51
Joined: Fri Jun 02, 2017 11:00 pm
Location: Australia

Re: MangudAI-all-in

Post by TheMaximalBeing »

Wasn't expecting this :) Its quite good for a first attempt. I tried a few games vs. Bambi. It kept up alright in castle age but eventually gets out-boomed. The main reason being because it stops vill production when it reaches 50 villagers.

Some suggestions:
  • Keep training villagers until they make up half the pop limit.
  • Drop of resources in dark age to maintain vill production (especially from boar). To do this simply use up-drop-resources. You can use dropsite-min-distance to check that they are under the TC if you are worried about a bad boar lure.
  • Drop resources to get feudal/castle age more quickly (this will save over 100 seconds in some cases).
  • Only 2 villagers were used to build the castle. I suggest using 4 and also building it closer. You can use up-assign-builders for this. Go back to 1 builder if you are under attack to prevent suicide.
  • With only 1 castle it tends to fall behind in military numbers. I would suggest adding a second castle as soon as you can.
  • It builds the university and some upgrades too quickly. Would be better focus on getting Manguadai numbers up first and building another castle.
  • The siege workshop and rams are made too quickly when it only has a low military population.
  • It tends to go imperial age too early. By the time it gets to imp the enemy will already have far more villagers and military.

User avatar
MrElephant
Forumer
Posts: 52
Joined: Sun Dec 20, 2020 6:28 am

Re: MangudAI-all-in

Post by MrElephant »

First- congrats, Wattle, on uploading your AI. This is great. Now you have an AI for competitions as well.

A couple of notes. A few individuals are taking note of the number of builders. In your "first houses.per" file

;###################### CODE
(defrule ;first house
(can-build house)
=>
(up-set-placement-data my-player-number villager-class c: 0) ;set first house near two villagers
(up-build place-control 0 c: house) ;place control goes with up-set-placement-data
(up-assign-builders c: house c: 2) ;two vills to the foundation
(disable-self)
)


The up-assign-builders c: house c:2. This is how many builders you are actually assigning. When I was first helping work on this code- I assigned four builders to the castle here, so it is odd that less than 4 builders are being used.

The distance the castle is away from the town is set by (up-set-placement-data my-player-number -1 c: 6)

(defrule
(current-age == castle-age)
(current-age-time < 180)
(building-type-count-total castle < 1)
(can-build-with-escrow castle)
(up-can-build 0 c: castle)
=>
(release-escrow stone)
(up-assign-builders c: castle c: 4)
(up-set-placement-data my-player-number -1 c: 6)
(up-build place-control 0 c: castle)
)

Other than that- it looks like you have done some fantastic work since the earlier versions of the code. Great work.

User avatar
wattle
Swami
Posts: 110
Joined: Fri Aug 15, 2014 1:06 pm
Location: Germany

Re: MangudAI-all-in

Post by wattle »

Thanks for your feedback :rolleyes:
About the castle builders, Leif Ericson hinted at sn-cap-civilian-builders, which wasn't set and capped the builders to the default 2. I set it higher and the intended 4 builders finally do their job :)

I agree about the rams.
About the university I personally highly value ballistics. Not sure about that.
The stone gathering for the second castle may be beneficial to be increased.
Maybe I might increase the villager limit at some point. I would assume it will how ever come with the trade off of getting elite Mangudai and other important techs later. Even though I'm aware that this time-window is quite narrow.
After all, I like to beat 2 Barbies in my own games with 35-40 vills, but some fully upgraded elite Mangudais :lol:

User avatar
wattle
Swami
Posts: 110
Joined: Fri Aug 15, 2014 1:06 pm
Location: Germany

Re: MangudAI-all-in

Post by wattle »

Update 0.2c 03.07.2022
Main difference is FireBalls ranged micro code, with some adjustments by MrElephant (not sure which).
Also it now builds the castle with 4 builders.

I love the ranged micro. Thank you a lot, FireBall :rolleyes: and also MrElephant.

User avatar
wattle
Swami
Posts: 110
Joined: Fri Aug 15, 2014 1:06 pm
Location: Germany

Re: MangudAI-all-in

Post by wattle »

Update 0.2d
Mainly fixed something in the ranged-micro script, which was not properly adjusted for the Mangudai play and make them retreat to the castle, instead to TC.
Added a hard limit for camps for now, to prevent spamming those in late game.

Bandit1990
Forumer
Posts: 9
Joined: Tue May 03, 2022 2:38 am

Re: MangudAI-all-in

Post by Bandit1990 »

Hi!

So I have to admit when I first saw the name of this AI I read Mangudai but my brain then interpreted that as Mangonel so I imagined an AI that spammed mangonels causing carnage across the map! 😂

I finally got around to testing it and that micro 😍 Those mangudai raids are so satisfying to watch and of late I’ve been really surprised at how much you can do with 50 villagers.

It’s vulnerable to early attack but when it gets going it’s a treat to spectate.

One thing I did notice which I hope is a real quick fix for you is to do with mining camps. In one of the games I tested (vs Bambi) MangudAI’s stone mine got destroyed and it never built another one for the rest of the game so it never gathered enough stone to build a castle. I was wondering if you had a rule that only builds its first mining camp if the current age is equal to feudal or something?

I’m loving this AI already and am excited to see it evolve, thanks for putting the work in on making a really fun AI :)

Post Reply