Shadow

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.
TheNightPanda
Forumer
Posts: 86
Joined: Sun May 27, 2018 3:22 am

Re: Shadow

Post by TheNightPanda »

FireBall37 wrote:
Sun Jun 27, 2021 12:54 pm
Thanks Promi! New update coming soon. I've been stuck on one bug for a WHILE. :)
Team games incoming? :)

FireBall37
Forumer
Posts: 47
Joined: Sat Aug 22, 2020 10:49 pm

Re: Shadow

Post by FireBall37 »

Yeah, probably in the next few I'll start looking at that and other civs

FireBall37
Forumer
Posts: 47
Joined: Sat Aug 22, 2020 10:49 pm

Re: Shadow

Post by FireBall37 »

Alright, here's the next version of Shadow.
Changes:
--Improved ranged micro
--Better knight micro
--Better build orders on feudal/castle
--Ability to retreat army to defend in some cases
--Added some raiding (I love watching this! :D )
--Some archers in some cases
--Anti-drush/anti-scrush micro
--Sheep scouting
--Much better farming
--Much better tower/tc avoidance

Hope you enjoy it!

lolasik43
Forumer
Posts: 20
Joined: Sat Nov 25, 2017 4:05 am

Re: Shadow

Post by lolasik43 »

Yea !!! :rolleyes:

Arpheus
Forumer
Posts: 25
Joined: Wed Mar 10, 2021 1:11 pm

Re: Shadow

Post by Arpheus »

You made a really strong AI. I saw the tournament twitch stream where it won against Promi with impressive group micro and had to do a test against Barbarian (unofficial slightly adapted one to run at extreme difficulty). In the very first game in a Teuton vs Teuton matchup on new arabia on extreme difficulty it won against the Barbarian AI. I used 2x speed most of the time and 4x speed when there was no micro needed.

That is very impressive. It first had a great feudal pressure for quite a few minutes where it destroyed barbarians first ranged army and picked out lots of vills even near the enemy TC (great micro!)and killed the few scouts but unfortunately it then got locked into an edge of the map by a huge barbarian feudal army consisting of around 15 archers and 10 scouts which cleaned up a large army from Shadow but still it got to castle age first and built up some army strength, won some engagements, even went under towers when it was good to do so but most of the time stayed away of Tower and TC fire (a feat not many AI's have) and destroyed the towers with knights + skirms eating the damage and attacking vills.
It then added some rams and won the game.

Barbarian even built 4 towers in this game to defend against Shadows relentless pressure - never saw that before. But still your AI outmaneuvered them most of the time - very impressive. Also continously adding some spears to your skirms is so important and was one of the things that made this pressure possible even when barbarian brought 1-2 scouts many times to kill the skirms. Other AI's would go pure skirm and lose engagements.

Also the early scouting is really good. The new Arabia map still messes a bit with the AI with the far away wood lines. It built the first lumber camp next to 3 trees before it made a better lumber camp at a wood line.

Overall I was really impressed. It is the first AI I encounter which seems on a level to beat Barbarian. Wish you much luck for the rest of the tournament!



I also played against it twice with Teutons vs Britons (Shadow). First game it was rough to deal with the pressure but I could defend against it moderately and boom behind with quite some losses especially to the knights in Castle age. I could add more and more TCs up to 4 TC boom and was able to defend - it called the GG without even being attacked at a point where I had around 6k score and it had only 3.7k if I remember well - I guess it saw that it couldn't win this any more. The massive skirm pressure and added knights were really strong.

In the second game with same settings (DE, extreme, normal speed, new arabia) I knew what was coming and I was able to defend well. 22 pop up -> 1 range constant +1/+1 updated skirm production and semiwalls to hold it at bay - it lost a few skirms, i lost a few skirms and it never wanted to really commit. I also had a tower as backup for the skirms which helped.
In Castle age I added 1 Stable Knights and after a while pushed it back into its base with around 15 skirms and 7 knights where it soon called the GG at 32 min. It was storng enough so that I could only go 2 TC boom for the first minutes of Castle Age without feeling threatened.

From what I have seen in these 2 games it has a predictable strategy but it is strong in what it does. Definitely a good AI to train against. Not sure if it would ever add a 2nd TC or if it goes all in 1 TC all the time?

A possible way to improve it could be to add maybe 2-3 scouts to help against enemy skirms or pressure other areas of the enemy base like wood lines and gold while the skirms deal with the main army. But make sure that it flees from spears and causes idle time otherwise it might not be worth to add this. Not sure when would be the best timing for added scouts - maybe when the skirms are in a stalemate or have already pushed the enemy back into TC safety.
A nice side effect would be that the scouts would at the same time "scout" what the enemy might be doing in the back of its base. In that first game against the Barbarian AI it could have found out that barbarian was amassing a massive scout/archer army out of vision.

One problem that I found was when it tried to retreat away from my army and there was the edge of the map and/or a wood line blocking that way - they would be stuck there at the edge and not really fighting but just dying to my army. This is also what happened against the barbarian AI. They could have killed quite a few archers while being killed by the scouts in that situation if they didn't bug out/panic run away into the edge of the map.
Maybe if they are stuck somewhere the best way would be to just try to at least kill some enemy units before dying.

/edit: After playtesting your AI and writing this I saw that you wrote that it plays mainly/only Vikings. I might test that another time if it changes much

lolasik43
Forumer
Posts: 20
Joined: Sat Nov 25, 2017 4:05 am

Re: Shadow

Post by lolasik43 »

Shadow is a very strong AI ! I like his micro-controlling of units.
He can beat the Barbarian AI and that's cool!
FireBall37 Thank you for Shadow AI !

FireBall37
Forumer
Posts: 47
Joined: Sat Aug 22, 2020 10:49 pm

Re: Shadow

Post by FireBall37 »

Hey thanks for the encouragement guys! I am also very happy with how Shadow is doing. In the future I hope to make him better vs humans, but there are a lot of improvements to make first! :head
I am also surprised that Shadow works not as Vikings. But he is probably not as good. As for the resigning, I don't want Shadow to wait for the last second to resign, because I don't like having to watch games like that! :D

Arpheus
Forumer
Posts: 25
Joined: Wed Mar 10, 2021 1:11 pm

Re: Shadow

Post by Arpheus »

I was able to do a few more tests this time with vikings. Shadow plays them the same as other civs but it might be slightly stronger - hard to say. I don't do AI scripting but I could imagine that it works with other civs because they have the same units and Shadow anyways tries to balance the Eco depending on the ressources it has which is a good base to also play with other civs which might save up certain ressources.
I could imagine that it might be different with eagle civs.

I did another test this time Vikings vs Vikings Shadow vs Barbarian 2x speed, DE, Extreme difficulty. Shadow didn't take any Rhinos up until 21 min into the game because they kept moving in and out of an unscouted area. It also didn't find 2 sheep but still won vs Barbarian. That is a crazy feat.
It shouild really try to scout everything near the base to not have this case where it misses 900-1000 food in a crucial time.

The Skirm and Spear micro is very impressive. How it keeps the spears quite a bit behind the skirms all the time unless there are socuts is just great. Even when barbarian tries to focus them its hard for barbarian to kill the spears since they are kept well behind the skirms for the moment where they are needed.
Haven't seen this level of micro from any other AI so far. Barbarian has good micro and really good tower placement but this specific skirm + spear micro is just awesome.

I agree that the way it handles resigning makes sense the way it is.

Really looking forward to see more from this AI. Still hoping that there will be more AIs where I can play Sicilians at least from the new DE civs. So far Promis DE AI is probalby one of the few if not the only one which officially supports the new civs. Not sure if other AIs also do that.

If you need specific testing/feedback let us know. I am very eager to see better AIs for DE and since Barbarian has not been updated for quite a while it might be the time for new AIs to shine and become the best AIs around.

Arpheus
Forumer
Posts: 25
Joined: Wed Mar 10, 2021 1:11 pm

Re: Shadow

Post by Arpheus »

I did 4 AI vs AI games Shadow Teutons vs Shadow Vikings. It won 2 of them with Vikings and two with the Teutons. Missing Wheel Barrow (it doesn't research it for other civs) starts to have more impact the more time passes. It is also a bit luck dependent at which base the fighting happens (hill advantage and idling vills/army).

Overall Teutons often had the stronger Feutal army which snowballed some times probably thanks to the cheap farms. But Shadow is great at not letting its army die when it is at a disadvantage. The longer the game went the higher the chances for Vikings to take over with free wheelbarrow.

Here some suggestions from what I watched:
  • Seems that it only lures and pushes standard boar and deer. It seems to not recognize Rhinos and Elephants (instead of boar) until late feudal/castle age and also it didn't even try to go for Ostrichs in a game.
  • Sometimes it has Scout stuck problem - not sure if this is also a problem related to the exotic boar/deer variants that bug it out
  • It also has the problem where some villagers are blocked by other vills at wood lines - sometimes up to 3 of them not working. This happens a lot not only for the AI but also for players if you are not careful so not sure if this can be fixed unless you split the vils better on the multiple lumber camps (1 vill on one LC and 13 on the other wasn't perfect)
  • The houses in front of Shadows TC can sometimes be a hindrance since they make defense more difficult since your skirms can't micro as well as they could without the houses and knights sometimes get stuck there. But you might want to look at that for yourself if not having them there or having more space between the houses would be better or not
  • when it attacks and gets a lead it often stays and fights at the same position for a long time. If it would move around a bit on the left and right and come back from time to time to the starting attack position it might find more stuff to kill and cause even more enemy idle time. It should just not go behind the enemy TC otherwise the reinforcements might suicide themselves into the TC

Micro that could be improved:
  • In Castle Age at the enemy base it went forward to attack but once the knights engaged it pulled back all skirms + spears which caused the death of the knights.
    When it engages with the knights against an almost same power army it should either pull everything back (knights and skirms) or commit. But be aware that pulling back will still cause losses.
    Maybe the threshold for decisionmaking on attacking and defending is too narrow so that it often attacks and then retreats based on maybe only 1 more enemy unit reinforcement. That can lead to unfavorable fights because engaging is already a commitment and retreating will cause some losses from shots into the back while running away.
    If these probable losses are also considerered for the decisionmaking on wether or not to retreat it might do these attack --> run --> attack --> run switches less often for better results
  • Also retreating knights from an enemy mangonel when it was already attacking it is not a good idea. Once it is in range of a mango it should priorize killing it pretty much always unless when it is 100% sure it will die instantly and not even get 2-3 attacks in
  • Mangonel shoots at own units fighting enemy units even when the own units have higher numbers there. Such friendly fire should be avoided
    Also Mangonels seem to often shoot at single archers when there are lots of other opportunities to cause more damage like stacked archers / skirms in range.
  • Is it possible in DE to take advantage from hills or are they still not visible to AI?
But even with these things that could still be improved it is already a great AI which does so many things right. Especially when you fix the exotic boar/deer problem it should be consistently stronger since missing out on these hundreds of ressources hurts a lot.

FireBall37
Forumer
Posts: 47
Joined: Sat Aug 22, 2020 10:49 pm

Re: Shadow

Post by FireBall37 »

Hey man thanks for the insights! Those are some perceptive suggestions. My hunting is only deer and boar because I’ve never tested on DE, so that is something for me to keep in mind. Thanks for all the other advice too! B)

Post Reply