ZebbaAI

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.
Zebba
Forumer
Posts: 13
Joined: Mon Mar 06, 2023 1:25 pm

ZebbaAI

Post by Zebba »

Hello there!

Finally, after I've been working on this AI since Summer 2021 now (with interruptions), I decided that it's time to share ZebbaAI to everyone.

The initial idea behind ZebbaAI was to create an AI that plays all various strategies to see how they tend to work out in varying situations, including adapting its strategy to opponent strategies. For that to work the goal is to give the AI all the necessary tools to make use of everything the game offers, e.g. deer pushing. It's not yet at a point where I'd like to have it, since implementing some of these abilities are quite time consuming, but I'm working on it.

Game Mode: Random Map, Empire Wars & Custom Scenario (consider map restrictions)
Civs: Can play all civilizations, including the expansions
Maps: besides standard open maps like arabia, ZebbaAI can play nomad, arena, fortress & other hybrid maps and custom maps. (Not optimized on water-maps though)
ZebbaAI can't play properly on island-like maps or on Black Forest type of maps: It needs a map with land connection to the enemy
Taunts in TGs: AI reacts to following taunts: 3 ("food please"), 4("wood please"), 5("gold please"), 6("stone please"),
31("Attack an enemy now"), 38("give me your extra resources"), Flare-Location + 48("I'm being attacked, please help")
Strategies: Drush, Archerrush, Scoutrush, Towerrush (currently deactivated), FC into Unique Unit, FC into Gold Unit,
Fast-Imp (only pockets in team-games or on closed maps like Arena)
Difficulty: there are no levels of difficulty for ZebbaAI. Its current level is comparable to the hard DE AI.

Stay tuned for more improvements & updates in the future! :)

====================================================

New in Version 1.2.4

General:
- Deactivated TSA in Imperial-Age --> AI will now properly attack in imperial-age with its army instead of sending in units one by one
- implemented improved version of retreat rules for enemy fortifications (only before castle-age for testing purposes & lag-prevention):
--> added player loop, so AI should now be able to retreat from any enemy tc & tower
--> AI should no longer run with parts of its army through the enemy tc when retreating
- Reduced priority of producing villagers when being far behind military-wise
- AI will add a 3rd archery-range if encountering a lot of man-at-arms in feudal-age
- AI can now make skirmishers against hand-cannoneers
- overall improved counter unit selection, map-scouting, strategy adaptations, research-timings
- overall improved eco-balance-system in castle-age

Villager Ram Defense:
- now also applies for all tcs instead of just the starting tc
- should now also work for rams by any enemy
- AI will now also attack armored elephants with villagers

Defending Forward Towers:
- AI will now also attack walls, in case the tower is walled in (I haven't tested this functionality yet enough to see if it's worth it)
- will no longer rush forward towers with villager when having a low amount of villagers or if the enemy is teutons while having multiple towers
- will now target towers more precisely with rams

Evacuating villagers:
- should now also work properly in 2v2s & 3v3s
- added market rules to buy the necessary resources for a new tc

Team-Games:
- further restricted counter unit production for AIs in pocket position before imperial-age

Drush:
- disabled scoutrush as a follow up strategy
- opponent should now be scouted in time before the attack

Archer Rush:
- will no longer make archers if the opponent has a high amount of skirmishers

Scout Rush:
- improved eco-management in feudal-age to be able to afford archery-range, mining-camp & blacksmith earlier
- adjusted rules for building a 2nd stable in prolonged feudal-age fights
- fixed a bug where a pocket in TGs wouldn't start attacking
- will no longer build a range in TGs as a pocket

Castle-Age Eagles:
- added ability to switch from eagles to ranged units if encountering infantry or hand-cannons

Castle-Age Boom:
- will now delay barracks for longswords/eagles when booming
- will buy additional stone if required to build extra TCs
- overall improved build order to setup boom faster

Castle Drop on Arena:
- fixed a bug where the AI would sell its stone after a failed castle-drop instead of building a safe castle in its base
- fixed a bug where the AI would stop making villagers for the rest of the game

Aztecs:
- will now properly make jaguar warriors to counter enemy infantry

Cumans:
- if going for a boom as a pocket in TGs, AI will now go for the 2 TC-Feudal-Boom

Dravidians:
- will no longer train elephants

Bug Fixes:
- fixed several bugs regarding Deer-Pushing & own Base-Scouting
- fixed a critical bug in boar-luring that caused that the AI wouldn't garrison villagers into the tc to shoot the boar, resulting in losing lots of villager
- fixed some bugs where the AI would not correctly delete villagers, train new villagers or research imperial-age
- fixed a bug that caused the AI to not build the first mill next to the berries

====================================================


I thank everyone for the feedback! If you're noticing any strange behaviour or you have any feedback I'll be more than happy if you'll let me know! :)

What's up next:

- further stabilizing & improving retreat rules & base scouting
- further improving team-games to a point that team members work together more often
- improving deer-pushing by using precise coordinates
- fully implementing proper ranged unit army micro
- implementing sheep scouting, eating only one sheep at a time
- adding late game army compositions
- reactivating towerrush & improving it
- using the scout to block villagers in drushes & scoutrushes
- adding a new defensive fast feudal strategy
- further developing full DUC Dark-Age economy
Attachments
ZebbaAI all published versions.zip
(936.61 KiB) Downloaded 59 times
ZebbaAI v. 1.2.4.zip
(106.06 KiB) Downloaded 88 times
ZebbaAI v. 1.2.3b.zip
(96.05 KiB) Downloaded 86 times
Last edited by Zebba on Thu Aug 31, 2023 9:24 am, edited 19 times in total.

yuu2319
Forumer
Posts: 3
Joined: Tue Feb 07, 2023 4:49 am

Re: ZebbaAI

Post by yuu2319 »

Thank for sharing the AI. He's a very good AI. Sofar haven't seen any bug

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

Re: ZebbaAI

Post by Bandit1990 »

Fantastic AI - first 2 games and it beat my latest version of Bright Spark in some close feudal skirmishes!

I applaud you for making ZebbaAI so diverse! It seems that it is strongest when it starts with archers or skirms and weakest when it starts with infantry, but there's nothing new there and I think that's the same with everyone.

Love the TC avoidance, I've seen Bright Spark try to lure in ZebbaAI archers to the TC and they stop just in time, it's brilliant.

Its weakness seems to be towers right now, I don't know if you have any avoidance code in yet but I round ZebbaAI lost the upper hand a couple of times when it started losing archers to tower fire. In the battles I saw this was just enough to turn the tide and defeat ZebbaAI. Tower avoidance or tower preference are both different options that may help with this (dodge the tower or have melee units attack it or archer sit underneath it under the minimum range).

I really look forward to seeing what you do next and I will definitely be using ZebbaAI as one of my regular sparring partners - thanks for the hard work!

Zebba
Forumer
Posts: 13
Joined: Mon Mar 06, 2023 1:25 pm

Re: ZebbaAI

Post by Zebba »

yuu2319 wrote:
Mon Mar 20, 2023 7:42 pm
Thank for sharing the AI. He's a very good AI. Sofar haven't seen any bug
Thank you for your Feedback! I really appreciate it :)
Bandit1990 wrote:
Wed Mar 22, 2023 4:50 pm
Fantastic AI - first 2 games and it beat my latest version of Bright Spark in some close feudal skirmishes!

I applaud you for making ZebbaAI so diverse! It seems that it is strongest when it starts with archers or skirms and weakest when it starts with infantry, but there's nothing new there and I think that's the same with everyone.

Love the TC avoidance, I've seen Bright Spark try to lure in ZebbaAI archers to the TC and they stop just in time, it's brilliant.

Its weakness seems to be towers right now, I don't know if you have any avoidance code in yet but I round ZebbaAI lost the upper hand a couple of times when it started losing archers to tower fire. In the battles I saw this was just enough to turn the tide and defeat ZebbaAI. Tower avoidance or tower preference are both different options that may help with this (dodge the tower or have melee units attack it or archer sit underneath it under the minimum range).

I really look forward to seeing what you do next and I will definitely be using ZebbaAI as one of my regular sparring partners - thanks for the hard work!
Thank you a lot, Bandit! I agree, it seems like archers/skirmishers don't require a lot of army control and can be dangerous by just sending them forward, compared to scoutrushes or drushes. Most likely because pathing & unit targeting is something I'm struggling to fix properly.

I'm really curious though about the tower-avoidance you mentioned, since it actually has an avoidance code for towers as well. I'm planning to implement the ability to send archers underneath the tower as well.

Overall, attacking behaviour is something I haven't focused on yet with this AI, but it's the next thing on my list where I want make an overhaul, adding patrol attacking and targeting areas in the opponents base more precisely. Hope to get that out pretty soon, but rather unlikely to get a new version with this before the "Prince of Arabia" tourney.

User avatar
Esty
Waheguru
Posts: 1159
Joined: Wed Dec 30, 2015 7:37 am

Re: ZebbaAI

Post by Esty »

Lately curious to test the latest AIs... i tested Zebba.

this AI deserves more congratulations than encouragement, as it already offers diversity of strategies while being playable for all civs at a pretty decent level. Many details like the use of TC to kill the boar show that this AI is already very advanced. I had the curiosity to test it last week and I was impressed. I just needed time to post a feedback :)
Author of TRiBaL_Warrior, Yggdrasil, PharaoN, WoodyWood Pecker and currently :o dette :dance

Zebba
Forumer
Posts: 13
Joined: Mon Mar 06, 2023 1:25 pm

Re: ZebbaAI

Post by Zebba »

Esty wrote:
Fri Mar 24, 2023 12:25 am
Lately curious to test the latest AIs... i tested Zebba.

this AI deserves more congratulations than encouragement, as it already offers diversity of strategies while being playable for all civs at a pretty decent level. Many details like the use of TC to kill the boar show that this AI is already very advanced. I had the curiosity to test it last week and I was impressed. I just needed time to post a feedback :)
Thank you for your kind words, Esty! :)

venomus
Forumer
Posts: 50
Joined: Sun Sep 05, 2021 10:26 am

Re: ZebbaAI

Post by venomus »

Hey. I have tested on Nomad and just build houses nonstop.

Zebba
Forumer
Posts: 13
Joined: Mon Mar 06, 2023 1:25 pm

Re: ZebbaAI

Post by Zebba »

venomus wrote:
Sun Mar 26, 2023 7:54 am
Hey. I have tested on Nomad and just build houses nonstop.
Hey! Thanks for your feedback. I'll bring out a new version very soon that should fix this and several other issues on nomad.
I haven't tested my AI on nomad for a while, therefore it might face some issues here and there on this map right now.

Zebba
Forumer
Posts: 13
Joined: Mon Mar 06, 2023 1:25 pm

Re: ZebbaAI

Post by Zebba »

Updated for the recent patch.

Zebba
Forumer
Posts: 13
Joined: Mon Mar 06, 2023 1:25 pm

Re: ZebbaAI

Post by Zebba »

Updated to v. 1.2.0 for the upcoming Prince of Arabia Tournament.

Post Reply