AoE2 units are a lot smarter than you think

  Рет қаралды 223,588

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
@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.
@孙林可
@孙林可 3 жыл бұрын
I wonder what "the closest" is considered in the actual game. In the actual game units can't be placed with 0 pexel difference.
@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.
@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
@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.
@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.
@casusincorrabilis1584
@casusincorrabilis1584 3 жыл бұрын
AOE units are so smart they even tricked us by singing: "I'm bad, I'm bad!".
@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.
@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
@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!
@Sephyroth97
@Sephyroth97 3 жыл бұрын
Imagine being angry at someone but he's equally distant to an old man so you just punch him instead.
@DanyF02
@DanyF02 3 жыл бұрын
"Omg I have so many reasons to attack this guy! Oh wait, that other guy is 2 inches closer."
@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.
@Kirisapostle12
@Kirisapostle12 2 жыл бұрын
Unless you are talking about the pathing in which case dear god
@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.
@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.
@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.
@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
@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
@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.
@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
@dennisjonker4804
@dennisjonker4804 3 жыл бұрын
This has been very informative. This helps with my variable calculations with regards to attack move/patrol, vs directed action.
@Just4Bboying
@Just4Bboying 3 жыл бұрын
I work in a QA job and honestly I wish I had your mindset. You take everything into account.
@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
@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.
@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!!!
@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!
@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
@Azhureus
@Azhureus 3 жыл бұрын
Great video dood. From now on, I gonna leave my units to decide their attacks !
@glenrobinson9963
@glenrobinson9963 3 жыл бұрын
Love your thorough experimentation.
@Vordikk
@Vordikk 9 ай бұрын
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.
@buildingman
@buildingman 3 жыл бұрын
Always nice to get a new SoL video.
@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.
@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 ^^
@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.
@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!
@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.
@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
@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.
@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.
@Dsnake5
@Dsnake5 3 жыл бұрын
OMG this is amazing, great video man. I'm a science person and this is incredible, keep them coming!
@miiiiiiiiiiii
@miiiiiiiiiiii 3 жыл бұрын
Great vid Spirit
@premmagar1170
@premmagar1170 3 жыл бұрын
Great video!! That's very detailed video indeed
@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
@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.
@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.
@KeeteleKeet
@KeeteleKeet 3 жыл бұрын
Great video! Thank you for the info.
@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.
@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
@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
@marksway57
@marksway57 3 жыл бұрын
All of this is really cool to know. Thank you.
@devangnivatkar2649
@devangnivatkar2649 3 жыл бұрын
Whoa, this was amazing to know!
@inwector
@inwector 3 жыл бұрын
This is the most satisfying video you have ever made.
@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
@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!
@munsters2
@munsters2 3 жыл бұрын
Thank you. That is really useful information.
@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!
@-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...
@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
@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.
@ianwong411
@ianwong411 3 жыл бұрын
wow. genius for figuring this out. me, i didnt even bother which unit my unit attacks during clashes
@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.
@shaunroberts2037
@shaunroberts2037 3 жыл бұрын
Wow these champions are really well educated, they must have been taught by ancient AOE gold sages
@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.
@GarthOJ
@GarthOJ 3 жыл бұрын
I'm getting really emotionally invested in this champion.
@aretiredsubberl7036
@aretiredsubberl7036 2 жыл бұрын
I mean the samurai would also get taken down by the other samurai with 2.2 hit so he kinda seeks out the strongest to fight I guess?
@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.
@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...
@magpiepicapica
@magpiepicapica 3 жыл бұрын
this fight in the end was beautiful
@ThmSphone
@ThmSphone 3 жыл бұрын
That's why I'm subscribed, nice
@andenkiroghan896
@andenkiroghan896 3 жыл бұрын
You are so methodic, I love it. Pls make broodwar units analysis, we need you.
@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.
@TheNezperdian
@TheNezperdian 3 жыл бұрын
Amazing video!
@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
@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
@Zilto1d
@Zilto1d 3 жыл бұрын
Great video!
@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
@fastfat08024
@fastfat08024 3 жыл бұрын
Awesome content keep it going 😉
@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
@abacaxi.maldoso
@abacaxi.maldoso 3 жыл бұрын
Those guys are philosophers! Starter than me!!
@whydoyougottahavthis
@whydoyougottahavthis 3 жыл бұрын
I ponder a guess that it attacks top then left when given a forced choice, oxymoron lol, I postulate that it is because the program is crunching the numbers including sub pixels and such in a way that includes the angle at which the game is played at, and it somehow takes that into account
@mayureshbakare3021
@mayureshbakare3021 3 жыл бұрын
I am doing PhD and your videos help me relate to analytics needed in my study
@commanderkeen4971
@commanderkeen4971 3 жыл бұрын
I love that everyone of your patreons has a normal name except ILickToesAtNight :-D comedy gold
@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.
@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.
@Badcrow7713
@Badcrow7713 3 жыл бұрын
Complete knowledge of Effective HP, good to know
@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.
@marwanbensaud548
@marwanbensaud548 3 жыл бұрын
love these details
@TheKioskarz
@TheKioskarz 3 жыл бұрын
What about trebs? There are two (probably) bugs in game: 1. If enemy units attack your packed treb, you can unpack him, and enemy units change target to your another units. 2. When AI treb attack one enemy castle, but second enemy castle shot to AI any units, then treb is packed and changing target to second castle. Then second castle is behind first castle, treb move in direction first castle and castle kill him.
@checktaschu4492
@checktaschu4492 3 жыл бұрын
some developer must be incredibly happy that his effort is finally recognized
@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.
@WearilyCorrect
@WearilyCorrect 3 жыл бұрын
Well thought out
@AdrickBruno
@AdrickBruno 3 жыл бұрын
I thought they might attack based on proximity of my own TC, not the oldest, maybe I'll check that, anyway nice job man
@JoeKnaggs
@JoeKnaggs 3 жыл бұрын
Great video, thanks :)
@Sputnik5790
@Sputnik5790 3 жыл бұрын
The endscreen Transport Tycoon musik is so nostalgic.
@waitWAID
@waitWAID 3 жыл бұрын
here is an issue with the wonder logic: the decision tree might be based on the game mode it was defaulted to, so them not choosing a wonder might depend on that + it might actually depend on unit type and the type of damage it deals to different targets
When to get wheelbarrow and hand cart
11:38
Spirit Of The Law
Рет қаралды 143 М.
Do champions counter trash units?
14:20
Spirit Of The Law
Рет қаралды 354 М.
OCCUPIED #shortssprintbrasil
0:37
Natan por Aí
Рет қаралды 131 МЛН
Sigma girl VS Sigma Error girl 2  #shorts #sigma
0:27
Jin and Hattie
Рет қаралды 124 МЛН
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН
Top 10 Cavaliers (AoE2)
12:15
Spirit Of The Law
Рет қаралды 121 М.
PRECISION Soccer Trick Shot Challenge!
15:11
Colin Amazing
Рет қаралды 2,8 МЛН
Da Vinci's Marvel Escape Room from Inscape
35:16
The Puzzle Desk
Рет қаралды 302
Korean Turtle Ships
7:33
HistoryMaps
Рет қаралды 31 М.
Zoro Faces the Return of the Dice-Dice Fruit | One Piece
1:37
Crunchyroll
Рет қаралды 3,3 МЛН
How good is the new Composite Bowman? (Armenian unique unit)
11:52
Spirit Of The Law
Рет қаралды 166 М.
Playing Microsoft Solitaire Collection Part 1427!!!
18:11
Adam Sager
Рет қаралды 14
How good are Mangudai? (AoE2)
14:51
Spirit Of The Law
Рет қаралды 122 М.
Don’t Pick the Wrong Balloon!
1:00
That's Amazing Shorts
Рет қаралды 150 МЛН