AoE2 units are a lot smarter than you think

  Рет қаралды 222,273

Spirit Of The Law

Spirit Of The Law

Күн бұрын

Choosing new targets may seem like a pretty simple decision, but it's not always straight forward, and it turns out AoE2 units have some excellent decision-making skills.
0:25 How units pick targets 99% of the time
0:55 What if two units are EXACTLY the same distance away?
2:38 Are armor, hills, and bonus damage factored in?
5:05 Any difference for ranged units or size?
5:40 How units choose which building to attack?
6:50 "Samurai seek out the strongest enemy units"?
_____________________________________________________________________
Patreon: / spiritofthelaw
Background music from Epidemic Sound: www.epidemicsou...
Game: Age of Empires II Definitive Edition

Пікірлер: 666
@zakpodo
@zakpodo 3 жыл бұрын
Props to "@ILickToesAtNight" for making spirit say that at the end of all his videos.
@ghaznavid
@ghaznavid 3 жыл бұрын
But the real question is - do they?
@AnimeCritical
@AnimeCritical 3 жыл бұрын
Can you explain how he managed to do that?
@ghaznavid
@ghaznavid 3 жыл бұрын
@@AnimeCritical I assume it isn't his own toes - but the name doesn't clarify.
@geebster.
@geebster. 3 жыл бұрын
@@AnimeCritical if you support him on patreon he reads out your name at the end of the videos. someone named themselves that and so he has to say that
@ramiel7666
@ramiel7666 3 жыл бұрын
...I heard it as " I lactose at night"......
@SandyofCthulhu
@SandyofCthulhu 3 жыл бұрын
I want to say that 100% of the awesome unit AI is from the programmers (such as Dave Pottinger & co.) and zero is from the designers (such as me).
@jocapoc
@jocapoc 3 жыл бұрын
oh i think we got a crossover over here
@literalvampirepotbellygobl5629
@literalvampirepotbellygobl5629 3 жыл бұрын
AoE2 units: I can do complex calculations in my head in a fraction of a second, but I'll be damned if I can figure out how to walk around this villager.
@RevWoody
@RevWoody 3 жыл бұрын
Agree. They should probably build in a 2 tile range and de prioritize pure distance--run the complex calculus with units in your area, not just the exact tied for closest ones, you dummy.
@schmid1.079
@schmid1.079 3 жыл бұрын
@@RevWoody That would make larger battles horrendous. Imagine your units trying to go to the weakest enemy unit 2 tiles across, getting blocked by other units while itself is beeing attacked. No way.
@mahatmaniggandhi2898
@mahatmaniggandhi2898 3 жыл бұрын
i will also block my comrades
@Ratciclefan
@Ratciclefan 3 жыл бұрын
XD
@daveinthemicrowave
@daveinthemicrowave Жыл бұрын
Units are smart but pathfinding make them look dumb.
@SirSpartAfterDark
@SirSpartAfterDark 3 жыл бұрын
Step 1: Just attack the closest guy Step 2: Analyze the armor, the amount of health left, the civilization, the hill bonus, the windspeed, the water depth, the time of day, the technological advancements, the time and date of birth, the alignment of the stars, and attack the one you'd kill the fastest.
@ghaznavid
@ghaznavid 3 жыл бұрын
They did that with priority fire on tanks in WW2. Shoot the vehicle that is a threat but will be destroyed easiest first. That's why the US army put the Sherman M4A3E2 Jumbo tank at the head of the column - it looked like a regular M4A3, but had much thicker armour.
@sniperdubey
@sniperdubey 3 жыл бұрын
Step 2 is actually run the damage function on every equidistant unit and pick the highest % damage. That's why it takes everything into account.
@Murzac
@Murzac 3 жыл бұрын
@@sniperdubey Yeah, the math for that is nothing for the game, considering that it's going to have to do that math any time a unit strikes another one, so doing the math a few times in the case of a tie to get the damage amount, then calculating how many hits it takes to kill the unit and picking the smallest one seems like a very good and simple way to go about doing this.
@孙林可
@孙林可 2 жыл бұрын
I wonder what "the closest" is considered in the actual game. In the actual game units can't be placed with 0 pexel difference.
@thyrussendria8198
@thyrussendria8198 3 жыл бұрын
The targeting priority for building is understandable as towers, castles and TCs have a certain thing in common other buildings don't: They attack back
@GummieI
@GummieI 3 жыл бұрын
Still should imo at least target unit producing buildings over houses as well at least
@RheaMainz
@RheaMainz 3 жыл бұрын
@@GummieI ai: "No population, no production!"
@azh698
@azh698 3 жыл бұрын
@@RheaMainz Mongols "Nope".
@RheaMainz
@RheaMainz 3 жыл бұрын
@@azh698 Huns!
@azh698
@azh698 3 жыл бұрын
@@RheaMainz Huns don't build houses, Mongols do but if you research their unique technology they don't lose pop cap if they get destroyed.
@Flavourius
@Flavourius 3 жыл бұрын
Real life Barracks: How to wield a sword, to attack, knowledge about art of war until you call yourself a soldier. AoE2 Barracks: How to know about hit points, armor, hill bonus, bonus damage and the biggest knowledge of all: Having no respect towards elders.
@eesaubaydullah4231
@eesaubaydullah4231 3 жыл бұрын
Indeed
@Cecilia-ky3uw
@Cecilia-ky3uw 3 жыл бұрын
filial piety is a useless value
@jaspermay5813
@jaspermay5813 3 жыл бұрын
@@Cecilia-ky3uw "Children, obey your parents in the Lord, for this is just. Honour thy father and thy mother, which is the first commandment with a promise: *That it may be well with thee, and thou mayest be long lived upon earth.* And you, fathers, provoke not your children to anger; but bring them up in the discipline and correction of the Lord." Ephesians 6:1-4.
@SchrodingerMil
@SchrodingerMil 3 жыл бұрын
Nah they’re the same. In a real Barracks you’ll be taught about target prioritization, how to identify an enemies armor, the benefits of fighting from the high ground, how to counter an enemies advantage (such as a swordsman switching to a mordhau grip to better handle plate armor), and off the battlefield, soldiers don’t give a damn who’s the oldest and who has the most experience, they’re all just in the Army.
@Cecilia-ky3uw
@Cecilia-ky3uw 3 жыл бұрын
@@jaspermay5813 I am no christian
@Greywander87
@Greywander87 3 жыл бұрын
Samurai: "I am the strongest warrior. I will prove this by crushing the enemy with my superior strength, starting with their weakest and ending with their strongest." Samurai: "Ah yes, an enemy samurai. What a weakling. I'll start here and work my way up to something that poses a real challenge. Like that spearman, for example."
@sethheristal9561
@sethheristal9561 3 жыл бұрын
I can't imagine a more fitting piece of characteristic Japanese pride/delusion/lack of self-esteem
@venatus5243
@venatus5243 3 жыл бұрын
They seek duel first then the strongest i
@ichtyorniscretace9624
@ichtyorniscretace9624 3 жыл бұрын
@@sethheristal9561 that's a bit xenophobic
@sethheristal9561
@sethheristal9561 3 жыл бұрын
​@@ichtyorniscretace9624 maybe. I don't think it's offensive nor I have issues with it tho :D
@agihammerthief8953
@agihammerthief8953 3 жыл бұрын
Weak samurai fears the superior reach of the pointy stick. Glorious ashigaru win yet again.
@airbornefilip9139
@airbornefilip9139 3 жыл бұрын
They "think" more than I do while chosing targets.
@busTedOaS
@busTedOaS 3 жыл бұрын
hard to say, your brain is not an algorithm but it does do some impressive things, most of the time intuitively without your awareness.
@englandrasmussen3111
@englandrasmussen3111 3 жыл бұрын
@bustedoas i like that u said this
@llSuperSnivyll
@llSuperSnivyll 3 жыл бұрын
They don't think nearly as much as you think. In the big mess that is a battle, the "weakest unit" target priority will rarely come up.
@kooroshrostami27
@kooroshrostami27 3 жыл бұрын
so you micro down siege rams when other units are around?
@theotv5522
@theotv5522 3 жыл бұрын
@@kooroshrostami27 Well, yeah. Those are expensive, big and slow. It catches people's attention faster.
@BallisticAero
@BallisticAero 3 жыл бұрын
The amount of work you put into these is very appreciated. "The more you know"
@ghaznavid
@ghaznavid 3 жыл бұрын
There's plenty of things I've changed in my gameplay from SotL videos. Unless I expect a game to go super long, I don't research crop rotation or the final wood upgrade. I use his advice on when to get wheelbarrow etc.
@DanielBerke
@DanielBerke 3 жыл бұрын
I'd assume the preference for the oldest units (all other things being equal) is simply because units get added to some sort of list in code which gets iterated through for checking things like which unit to attack, and if there's nothing else to distinguish between it just takes the first unit it comes to in the list.
@Longknife
@Longknife 3 жыл бұрын
The rule of attacking the closest sinks all of their expertise though...
@nikeayuiop
@nikeayuiop 3 жыл бұрын
Your army worths when lands a hit It is irrelevant the life of your opponent if you can not reach him, if he can out run you So the criteria of going to the closest one is indeed a better argument than going for the one with less life
@Gwagon_G
@Gwagon_G 3 жыл бұрын
At first, yes. But once the two armies interlock and the first victims fall down this deciding mechanism will do its work just fine.
@namekiannameless2752
@namekiannameless2752 3 жыл бұрын
If they actually do this complex calculation for all the units it won't work for 90s computer.
@TheMuffinman191
@TheMuffinman191 3 жыл бұрын
@@namekiannameless2752 Its not really that hard a calculation, just some basic arithmetic.
@VK-sz4it
@VK-sz4it 3 жыл бұрын
@@TheMuffinman191 calculate distance between target unit and all other, choose those that has min. If >1 Then for all them calculate number needed to kill and choose min if>1 use id.
@casusincorrabilis1584
@casusincorrabilis1584 3 жыл бұрын
AOE units are so smart they even tricked us by singing: "I'm bad, I'm bad!".
@Sephyroth97
@Sephyroth97 3 жыл бұрын
Imagine being angry at someone but he's equally distant to an old man so you just punch him instead.
@chrisl9112
@chrisl9112 3 жыл бұрын
I'm so proud of my son, the Champion. He's always been a straight A's student. It brings a tear to my eye
@kooroshrostami27
@kooroshrostami27 3 жыл бұрын
a duellant who picks a badly wounded opponent over a healthy one. What a coward!
@nikolozgilles
@nikolozgilles 2 жыл бұрын
genius*
@amoththatthinks
@amoththatthinks 2 жыл бұрын
@@kooroshrostami27 atleast being a coward will make him live whereas your brave men are rotting in the ground while their families sob!
@DanyF02
@DanyF02 3 жыл бұрын
"Omg I have so many reasons to attack this guy! Oh wait, that other guy is 2 inches closer."
@sarveshseri
@sarveshseri 3 жыл бұрын
Meanwhile... Archers : Lets kill that RAM.
@officialromanhours
@officialromanhours 3 жыл бұрын
No wonder it always crashes
@anhdunghisinh
@anhdunghisinh 3 жыл бұрын
Nah, archers only prefer to atk a ram over the other units if it stays in front of enemies units. In the end they still stick with the 1st rule always attack the closest one
@agihammerthief8953
@agihammerthief8953 3 жыл бұрын
ram close archer far therefore: MUST SHOOT RAM
@affanhasby822
@affanhasby822 3 жыл бұрын
We can still target other units right? why is this become a problem? I'm new to AoE, pls help
@anhdunghisinh
@anhdunghisinh 3 жыл бұрын
@@affanhasby822 you have to click each enemy unit at a time, which is not useful in large battle, cuz you will highly overkill
@ashclaw2306
@ashclaw2306 3 жыл бұрын
Even after all this time I learn new things about this game...
@SirPraiseSun
@SirPraiseSun 3 жыл бұрын
Yea this game is actually deeper than dota or.just as deep
@UngattTrann
@UngattTrann 3 жыл бұрын
This Champion's name was Albert Einstein
@twohandedswordsman852
@twohandedswordsman852 3 жыл бұрын
Yes.
@SIGNOR-G
@SIGNOR-G 3 жыл бұрын
More like Da Vinci
@pauls.8646
@pauls.8646 3 жыл бұрын
And then everybody clapped
@iwersonsch5131
@iwersonsch5131 3 жыл бұрын
Yes, that guy again.
@cynthiathornton5762
@cynthiathornton5762 3 жыл бұрын
There's a small book that came with my brother's version of the game that has a lot of information, and it says that Samurai "sought out high-ranking enemies on the battlefield for personal duels" Maybe that's what you remember, but it's written in the historical part of their description, and it doesn't seem to be talking about gameplay at all.
@ethribin4188
@ethribin4188 3 жыл бұрын
I honestly believe the aoe2 AI should be THE example onto how to make AI for strategy games. Yes, it comeswith the huge caviat of needing the players to find optimal strategies, so the AI can learn from them (aka the programmers tell it what to do based on what human players do) But that still leads to extreemly good results!!
@sevenpolar3483
@sevenpolar3483 3 жыл бұрын
You have to remember that it has taken almost 20 years to get to this point, really what we learnt was that if you make your AI easy to mod, the community will create a really good AI.
@shizukousapostle1stapostle710
@shizukousapostle1stapostle710 Жыл бұрын
Unless you are talking about the pathing in which case dear god
@karlheber23
@karlheber23 3 жыл бұрын
Maybe this explains how laggy it gets in the late game. Units aren't just calculating unit damage interactions, but also hypothetical unit damage interactions every time a choice has to be made. I bet the developers wish they could redo some of the optimization bottlenecks in that code...
@CMZneu
@CMZneu 3 жыл бұрын
While every little bit adds up I think computationally speaking the equation is fairly fast and computers are very efficient at these things, especially now a days, in fact I would even go as far to say the damage calculation is way faster than the distance calculation it has to do at first since that is comparatively more costly.
@tcsiyic3584
@tcsiyic3584 3 жыл бұрын
This seems very likely now that you mentioned it D: I wonder if the pro players know this optimization the devs made and would appreciate it more
@mrankitanks
@mrankitanks 3 жыл бұрын
They do those calcs only when two or more enemies are exactly equidistant. So the code is probably slower due to other reasons. As for what this does in practice, it probably only adds a few lines of code inside an if loop that is never used.
@CMZneu
@CMZneu 3 жыл бұрын
I forgot to say that this would not actually lag the game because chances are units are almost never getting to this calculation in the code because 99.9% of the time there is one unit that is closest and as long as one is closer than the others there is no need for it to do the math. So no this isn't increasing lag.
@preachey
@preachey 3 жыл бұрын
I assume that decision is on an IF, so it's not all getting evaluated unless the distance check is a tie. So 99.9% of the time it's probably not an issue.
@jordanottesen1186
@jordanottesen1186 3 жыл бұрын
I’m always in awe at how well you deliver extremely clever jokes while maintaining perfect flow as if they’re simply fact.
@hardikpande6970
@hardikpande6970 3 жыл бұрын
That champion has more brain cells than me in my maths test
@roebbiej
@roebbiej 3 жыл бұрын
We all know that during a math test the amount of active braincells temporarily reduces drastically
@Alias_Anybody
@Alias_Anybody 3 жыл бұрын
The priority of the buildings is actually the most interesting thing. I assume they always attack TCs first even if they don't shoot arrows at them? Or do they always prioritize the buildings attacking them?
@peterfrenzke6251
@peterfrenzke6251 3 жыл бұрын
I don't like that bombard cannons prefere units over buildings.
@DecagonPorygon
@DecagonPorygon 3 жыл бұрын
@@peterfrenzke6251 It makes sense, bombards are commonly utilized against archers and other siege. Microing them to attack units over buildings is much more difficult than microing them to attach buildings over units.
@hrogarfyrninga3238
@hrogarfyrninga3238 3 жыл бұрын
@@DecagonPorygon in a recent multiplayer team game, I killed 2000 units with (Portugese) bombard cannons 11. They are very important on Amazon Tunnel.
@manendralodhi
@manendralodhi 3 жыл бұрын
I am telling you. We are a fan of SOTL video's fonts more than his actual content. What beautiful font Sir!!!
@claudius6527
@claudius6527 3 жыл бұрын
Looking at ranged units would have been interesting as well. Because knowing all this, it seems like an oversight that rams can be used to counter archers although there are weaker units in range and the archer know this as well
@Lightning_Lance
@Lightning_Lance 3 жыл бұрын
good point. maybe it's on purpose because ranged units would be too powerful if they automatically picked the perfect targets.
@zerothveratross9975
@zerothveratross9975 3 жыл бұрын
If the logic showcased in the video applies to all military units, then the Archers will target whichever unit is closest, so it makes sense for them to hit the ram. They will only target the unit that is faster to kill if it's at the same distance as the ram or closer.
@claudius6527
@claudius6527 3 жыл бұрын
@@zerothveratross9975 yes the rule applies to archers as well. but since the rule was probably invented to prevent melee units chasing low hp enemies it makes no sense that the same set of rules apply to both melee and ranged units equally
@user-sl6gn1ss8p
@user-sl6gn1ss8p 3 жыл бұрын
@@claudius6527 I think the essentially free micro from the AI choosing the targets differently for ranged units would be a balance issue, as well as take out some of the potential depth of the game
@Link1506
@Link1506 3 жыл бұрын
To expand on this even more - how do units with minimum range (like skirms) behave. My guess would be that they still attack a viable target, even if another unit is right next to them.
@Tocaraca
@Tocaraca 3 жыл бұрын
I’ve noticed this in big patrol fights before, when sometimes units actually change their targets mid-fight to prioritise killing the lower HP unit first. Provided they are equidistant.
@OriginalZethrel
@OriginalZethrel 3 жыл бұрын
The auto generated subtitles here are just amazing! at 2:42 : weather has just do it well and motivate them with interviews with social workers
@NikitaOnline17
@NikitaOnline17 3 жыл бұрын
brilliant video :D every time i saw one experiment and though "that's cool, but i wonder if-" the very next experiment answered my question
@JJBeauregard1
@JJBeauregard1 3 жыл бұрын
It's topics like these that are actually really important but nobody ever seriously thinks about because it all happens automatically i find very - sometimes even most - interesting. It's also a reason why i love Sotl's channel so much, despite all the math
@3snoW_
@3snoW_ 3 жыл бұрын
It would be a lot more interesting if it wasn't just a tie breaker, i would bet that in practice this almost never happens in real games since the probability of having the 2 closest enemies at the exact same distance is close to 0.
@davidnaylor83
@davidnaylor83 3 жыл бұрын
Yes, like if units would consider going walking slightly further for an easy kill.
@Azhureus
@Azhureus 3 жыл бұрын
Great video dood. From now on, I gonna leave my units to decide their attacks !
@Just4Bboying
@Just4Bboying 3 жыл бұрын
I work in a QA job and honestly I wish I had your mindset. You take everything into account.
@UrukKing
@UrukKing 3 жыл бұрын
I was sure you would be right, after reading the title, but now I'm more impressed with the unit behaviour than I thought I'd be.
@glenrobinson9963
@glenrobinson9963 3 жыл бұрын
Love your thorough experimentation.
@buildingman
@buildingman 3 жыл бұрын
Always nice to get a new SoL video.
@BrackishBrit
@BrackishBrit 3 жыл бұрын
Been watching for like 2 years even though I didn't play AoE2 anymore. Picked up Definitive in the Steam summer sale and while your videos have helped take a bit of the edge off learning everything I can safely say I am still awful XD Thanks for the awesome content though Spirit!
@dennisjonker4804
@dennisjonker4804 3 жыл бұрын
This has been very informative. This helps with my variable calculations with regards to attack move/patrol, vs directed action.
@3xperiment8
@3xperiment8 3 жыл бұрын
I was just thinking how addicted I am to this game on this rainy sunday and about to sit at my computer to have some multiplayer brawls
@Ashasverus
@Ashasverus 3 жыл бұрын
The fact that you thought to be aware of artifacts in the software in terms of the unit placement priority raises my estimation of your abilities.
@spockamania
@spockamania 3 жыл бұрын
I swear, every time I watch one of your videos, I want to learn how to play OpenTTD. It has such good music
@Emperor_Hood1994
@Emperor_Hood1994 3 жыл бұрын
Thats seriously impressive with my time when i was Younger and played this game after school up until now i have thousands of hours and still had absolutely no clue how impressive the AI actually is another reason to love AOE2 and to be hyped for AOE4 ( since i didnt like AOE3 ) Great content mate ^^
@nilsp9426
@nilsp9426 3 жыл бұрын
What about this scenario: A) Unit that is close but surrounded, so it cannot be attacked B) Unit that is close and can be attacked Or: A) Unit that is close but surrounded B) Unit that is further away but can be attacked Is there any anti-bump built into units?
@gonzalogoded2089
@gonzalogoded2089 3 жыл бұрын
Great examples, also I'd like to see if they will follow a fleeing unit that was originally closer, but goes away, or if they will switch targets.
@chingamfong
@chingamfong 3 жыл бұрын
To add to that, do they use the nominal distance or actual pathing distance? For example if there's an obstacle between a unit and one of its target, is that one still the closest?
@laurenkirby97
@laurenkirby97 3 жыл бұрын
If the pathing is completely blocked I think it just skips to the next unit but what if the closer one is only mostly surrounded so the distance walked to reach it ends up being longer than the next closest one. In gameplay it seems like permanent obstacles factor in but if it's with units it could be different.
@alanea5860
@alanea5860 3 жыл бұрын
distance isnt measured directly ... but pathfinded around all obstacles so if you make maze it will still find shortest way if theres no way unit is ignored in favor of any other
@laurenkirby97
@laurenkirby97 3 жыл бұрын
@@alanea5860 Do non permanent obstacles get factored in the same way though?
@ramsessiereveld2824
@ramsessiereveld2824 3 жыл бұрын
aah spirit, you always know exacly what game mechanic I did not know I needed to klnow about, but did. Well done sir!
@VraccasVII
@VraccasVII 3 жыл бұрын
Just the fact that hills give a modifier blew my mind already, I never knew this when I played this back then
@Vordikk
@Vordikk 4 ай бұрын
Nice analysis! From it i can imagine and recreate target seeking logic in code if needed However, i'd like to add considering distance into account too.
@-Raylight
@-Raylight 3 жыл бұрын
Glad to know that even AI prefers to attack to old and weak people xD
@rao5108
@rao5108 3 жыл бұрын
"even"? I am worried for all the elders around you...
@mauromasterx
@mauromasterx 3 жыл бұрын
noticed archers doing it as well, probably another rabbithole there too Spirit, sometimes they even chase a bit the weakest guy before reengaging closer ones
@ianwong411
@ianwong411 3 жыл бұрын
wow. genius for figuring this out. me, i didnt even bother which unit my unit attacks during clashes
@GarthOJ
@GarthOJ 3 жыл бұрын
I'm getting really emotionally invested in this champion.
@blakelivesay
@blakelivesay 3 жыл бұрын
Super interesting, although I imagine many of us would prefer the targeting to prefer how quickly it would kill over nearest unit within reason. Taking into account damage that could be done to you would be helpful too.
@ananass8030
@ananass8030 3 жыл бұрын
Good video You forgot in the building target one very important unit trap, they auto target above *all* (except an enemy unit that pass really close to them, or even that not, I'm not sure) an enemy farm they're standing on, if they happen to just have killed another unit while on the farm
@shaunroberts2037
@shaunroberts2037 3 жыл бұрын
Wow these champions are really well educated, they must have been taught by ancient AOE gold sages
@Dsnake5
@Dsnake5 3 жыл бұрын
OMG this is amazing, great video man. I'm a science person and this is incredible, keep them coming!
@AkosJaccik
@AkosJaccik 3 жыл бұрын
"I prefer elephants." - Champion, 2021
@marksway57
@marksway57 3 жыл бұрын
All of this is really cool to know. Thank you.
@premmagar1170
@premmagar1170 3 жыл бұрын
Great video!! That's very detailed video indeed
@devangnivatkar2649
@devangnivatkar2649 3 жыл бұрын
Whoa, this was amazing to know!
@jeffreyblack666
@jeffreyblack666 3 жыл бұрын
In online multiplayer games, determinism can be quite good. Taking the oldest unit in a tie can be an easy way to get that determinism. It also makes sense programmatically if it is iterating through all units to find the one to attack. It reaches the oldest one first decides to attack it, and then gets no better target.
@KeeteleKeet
@KeeteleKeet 3 жыл бұрын
Great video! Thank you for the info.
@Xenotric
@Xenotric 3 жыл бұрын
I guess with the age thing is they lock on the moment something enters their range and dont swap unless certain conditions are met such as weaker or closer. Did you test putting the enemies down first then spawning the champion in the middle to theoretically remove that element?
@hedgehog3180
@hedgehog3180 3 жыл бұрын
They might also be choosing from a global list of enemy units.
@roym2185
@roym2185 3 жыл бұрын
Super smart tie-breakers there. Some interesting stuff. As always, great job SOTL. Would love your take on more practical game stuff from yourself. Like how much damage do you have to do to make a trush worth it... given you're sending 4 or 5 vills across the map. That'd be a nice series. Same can go for drush and scouts, etc. as you're investing military and could have just gone up to castle. How much damage do you need to do in order to make a drush or scout rush worth it? Another could be about laming - how much damage do you have to get in to make laming with a villager worth it... given Goth/Mayan/Chinese get loom first/immediately. Going forward with a vill and laming round resources. Similar comparisons. A final one... how much does forcing opponent to quickwall reduce their resources through inefficiency (like if they quickwall round berries or wood). Would love your stats and take on those.
@kartiksaraf4676
@kartiksaraf4676 3 жыл бұрын
Based on this I would love to see a battle where the 1st step is removed, that is units DON'T attack the closest one. I imagine a 60 v 60 champion fight to actually never finish and it all being a formation match where units keep on realigning themselves and choosing new targets
@munsters2
@munsters2 3 жыл бұрын
Thank you. That is really useful information.
@MajoraZero
@MajoraZero 3 жыл бұрын
The target selection being entirely deterministic is very clearly a design goal of the process, in order for multiplayer to work correctly! Maybe something you could look into is what is actually random during an Age 2 match.
@Mine4dayzz
@Mine4dayzz 3 жыл бұрын
This has really made me appreciate my units more!
@alastairshaw3311
@alastairshaw3311 3 жыл бұрын
Love the video SotL! I assume its the same for Gia? The Boar always picks my weak villagers, or at least that's what it feels like!
@dalemac89
@dalemac89 3 жыл бұрын
I'd have thought this would be some form of graph search function like Dijkstra or A*, with nodes weighted by distance, type, hp, armour, or any other relevant property. If not, it would be super fun to refactor into one of the afformentioned, nice problem to solve!
@marcgomez8391
@marcgomez8391 3 жыл бұрын
So you're telling me the game has this amazingly well-structured priority focus system that would make macro significantly more benefitial... only for them to prioritise closest targets anyway? lol what
@ryanergo754
@ryanergo754 3 жыл бұрын
Try the same experiment with 200 units on the battle field and remove the closest mechanic. I did once. Completely stopped the AI army with 17 archers.
@MrAbgeBrandt
@MrAbgeBrandt 3 жыл бұрын
How does one "remove" that mechanic?
@Kieva_Storm
@Kieva_Storm 3 жыл бұрын
This is actually super cool information. One thing I would prefer to see from the unit AI, though, is to see a 'buffer zone' for the closest unit rule. Like if you have a 1-hit unit like 3 steps further than the full hp equivalent, that it would go for the 1-hit unit. Something to consider the efficiency of dropping off a unit that might take only an extra game second to reach.
@miiiiiiiiiiii
@miiiiiiiiiiii 3 жыл бұрын
Great vid Spirit
@oscarvozzi7548
@oscarvozzi7548 3 жыл бұрын
Spirit of the law champion: calculating hp armor hill and bonus damage. Mine champion: following the same trade cart for 15 minutes.
@magpiepicapica
@magpiepicapica 3 жыл бұрын
this fight in the end was beautiful
@zakpodo
@zakpodo 3 жыл бұрын
This is amazing by the way, quite a lot of complexity added simply to create a mechanic that has extremely little impact on gameplay (such that 20 years later most of us are unaware of its existence). As an aside, it is kind of true that samurai do target stronger units. At least relative to other units and to the extent that uniques are strong. As their bonus will make them comparatively faster to kill.
@HammerspaceCreature
@HammerspaceCreature 3 жыл бұрын
The strengths and weaknesses of AI compared to humans in games are always very interesting. It reminds me of developing builds for the AI Heroes in Guild Wars 1. They weren't as smart as people but because they had perfect information they played like absolute gods at very specific things like Curses, where they would always know exactly which enemies had debuffs applied to them and would always refresh them the instant they ran out.
@commanderkeen4971
@commanderkeen4971 3 жыл бұрын
I love that everyone of your patreons has a normal name except ILickToesAtNight :-D comedy gold
@checktaschu4492
@checktaschu4492 3 жыл бұрын
some developer must be incredibly happy that his effort is finally recognized
@abacaxi.maldoso
@abacaxi.maldoso 3 жыл бұрын
Those guys are philosophers! Starter than me!!
@UKFX
@UKFX 3 жыл бұрын
Damn, those AoE2 devs were really dedicated to the intricacies of their design. So few devs would put so much effort into strategy unit logic these days.
@user-sl6gn1ss8p
@user-sl6gn1ss8p 3 жыл бұрын
No offense, but I'm pretty sure you are wrong : p
@inwector
@inwector 3 жыл бұрын
This is the most satisfying video you have ever made.
@PowermadNavigator
@PowermadNavigator 3 жыл бұрын
Hmm... makes sense. I remember in AoE1 and its expansion, the CPU's units also frequently targeted my injured units. The logic there seemed flawed and seems to have been improved kinda. Those units would also prefer to hit ranged units if engaged by them first, ignoring others on their way even when taking hits from them. Even if shot first by another ranged unit, the enemy unit seemed likely to target another nearby unit, once it gets close, that is injured (if available). This is what I remember... was some time ago now, haha. More than some time actually...
@legendaryvicius
@legendaryvicius 3 жыл бұрын
I see through you Spirit! All the while i was thinking "what is gonna get at here?" and then BUM! Samurai comes into the picture! You just can't help yourself, can you? Lol
@d0nutwaffle
@d0nutwaffle 3 жыл бұрын
You could make a vid on building target priority for trebs as well. The order seems to go something like TC towers castles everything else
@J.W.J.
@J.W.J. 3 жыл бұрын
James Cameron tried to warn us. It all begins with AoE AI.
@lloouuiissttaaii
@lloouuiissttaaii 3 жыл бұрын
Yesterday I realised that the trebuchet did target Malay Habour as a priority target, then generic barracks. Maybe SOTL may make a video discussing the full Hierarchy of siege unit targeting? This time should include all buildings like habour, tower, TC, Castle, krepost, donjons.
@srilemobitelsrile8809
@srilemobitelsrile8809 3 жыл бұрын
So they think in distance and 'hits'. Nice.
@ivanstrydom8417
@ivanstrydom8417 3 жыл бұрын
I'm not sure if you already have, but could you make a video explaining how the Saracen market bonus works and compare it to how the Guilds tech works? Thank you for fun and enlightening content.
@MrTheQuestioner
@MrTheQuestioner 3 жыл бұрын
Franks balance change: make chivalry cause all units to prefer the stronger enemy unit.
@alanea5860
@alanea5860 3 жыл бұрын
and unable to target gbeto / female villager at all
@zakpodo
@zakpodo 3 жыл бұрын
What about ranged units? Does proximity matter if there are multiple units within range? My hunch is that it does not matter, unless they have to move to get within range of a target, but that's not based on anything.
@davidnaylor83
@davidnaylor83 3 жыл бұрын
Yes, good question. Would be interesting to see how ranges units pick their targets in another video.
@Aelfraed26
@Aelfraed26 3 жыл бұрын
Damn you weren't joking with that title. I thought I was getting clickbaited. Btw, I'm pretty sure the vast majority of wars weren't won by being chivalrous with the enemy.
@Sputnik5790
@Sputnik5790 3 жыл бұрын
The endscreen Transport Tycoon musik is so nostalgic.
@LethalOwl
@LethalOwl 3 жыл бұрын
This Champion was having a field day.
@pranavchoudhary5746
@pranavchoudhary5746 3 жыл бұрын
Should have included trebuchet's target selection as well in this video. Seemingly my trebs always prefer to bring down enemy market first when I leave them unpacked in the middle of the enemy's base.
@zanstaszek9
@zanstaszek9 3 жыл бұрын
5:20 it may work not exactly on the size of the unit, but how the distance is calculated between units. In some games it takes the distance to the center of another unit, in others it considers the distance to the edge. If the 2nd method is the case, when both enemy Champion and Elephant were at the same distance to the edge, the other factors (like effective health or order of placement) should be observed.
@ThePariahDark
@ThePariahDark 3 жыл бұрын
That would have been quite the interesting attack cry. "Men! Attack the old, attack the weak, attack the wounded! Leave the strongest for last!"
@RobotShield
@RobotShield 3 жыл бұрын
I’m only 2Mins into the video but this feels like a quiz. We should be posting our scores in the chat
@RobotShield
@RobotShield 3 жыл бұрын
I got 2 correct
@dembro27
@dembro27 3 жыл бұрын
This is like watching a mouse navigate a maze or a crow figure out a puzzle.
@vagabondsoul1286
@vagabondsoul1286 3 жыл бұрын
Whoever was the developer who wrote the attack algorithm really poured their heart and soul into it.
@erwinwendler4621
@erwinwendler4621 3 жыл бұрын
I also noticed that buildings like castles now instantly hit important buildings on the same radio of attack first, for example a tower or enemy tc instead of a closer house. Sadly they still get bugged and dont redirect the attack automatically to passing units, meaning you have to manually target them yourself
@Badcrow7713
@Badcrow7713 3 жыл бұрын
Complete knowledge of Effective HP, good to know
When to get wheelbarrow and hand cart
11:38
Spirit Of The Law
Рет қаралды 140 М.
Star Destroyer (AoE2) #Shorts
0:27
MikeEmpires - Age of Empires II
Рет қаралды 193 М.
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 16 МЛН
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 6 МЛН
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 66 МЛН
Will A Guitar Boat Hold My Weight?
00:20
MrBeast
Рет қаралды 272 МЛН
Ranking the University Techs (AoE2)
13:31
Spirit Of The Law
Рет қаралды 187 М.
Mayan Unique Tech: Hul'che Javelineers [AoE2]
9:36
Spirit Of The Law
Рет қаралды 230 М.
Are Longswordsmen finally a good unit? (AoE2)
11:57
Spirit Of The Law
Рет қаралды 222 М.
10 Historically Accurate AoE2 units
14:00
Spirit Of The Law
Рет қаралды 124 М.
Age of Mythology 1-month checkup & stats!
8:53
Spirit Of The Law
Рет қаралды 60 М.
How Good are Longboats? (AoE2)
10:55
Spirit Of The Law
Рет қаралды 148 М.
Mule cart vs lumber camp face-off (AoE2)
10:41
Spirit Of The Law
Рет қаралды 91 М.
Vikings overview (AoE2) - updated for 2023
17:48
Spirit Of The Law
Рет қаралды 189 М.
Stellaris Is A PERFECTLY BALANCED Family Friendly Game WITH NO EXPLOITS!!
35:15
Italian overview (2024 update)
16:22
Spirit Of The Law
Рет қаралды 82 М.
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 16 МЛН