Battle Plans Episode IV: Front Interpolation

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

bitmode

1st Reverse Engineer Battalion
Nov 10, 2016
3.791
6.894
The mechanics of battle plans broadly fall into four phases, the first and last of which apply to all kinds of plans and the middle two only to attacks:
  1. Drawing the plan
  2. De-virtualizing the plan
  3. Interpolating the front
  4. Unit controller issuing orders accordingly
The wiki page on battle plans covers the first phase pretty well, so I'll skip over that completely.

Just to briefly mention it, de-virtualization is a step you probably didn't really think about consciously but is needed for the following steps. If you draw an order like this:
virtual_order.png

You'll see a single arrow pointing from it while drawing. This is the virtual order you create. But the attack line intersects non-enemy territory. So once you finish drawing, the game creates two actual orders:
devirtualized_order.png

For the following phases only these actual orders count, as if you had drawn them individually like that. The same thing happens if you draw over sea tiles for instance. And it of course not only happens when you draw the order but during the plan's entire existence because provinces may change control, requiring the plan to subdivide itself or merge back together.

These two steps should be very familiar to players but when it comes to understanding of battle plans, it probably starts to go downhill after that.

Now on to the main topic. Many of you might have already seen front interpolation in the game, though it is not explicitly named there. When the tutorial asked you to draw an offensive line in Ethiopia it looked like this:
ETH_offense.png

For brevity, in the following I will name the front line in the north From, the arrow pointing south Via, and the offensive line in the south To. In case you hovered over Via, you'll have seen this:
ETH_interpol_tmp.gif

and thought "Wow, this looks really profound. I'll get back to this when I have a handle on the basics." And here we are.

What is shown is a visualization of the interpolated front steps. As the name implies, the interpolated front creates intermediate areas with the purpose of connecting From with To while using Via as a guide. For non-spearhead fronts, this is constantly being done when the front line changes shapes. The second, more important property of the interpolated front is not shown though: the province weights.

While the steps are nice to look at, they are actually not very useful by themselves and importantly do not mandate that the unit controller will attack these areas sequentially one after the other. They are used to scale a weight for each province. The unscaled weight is calculated like this:
  • +5 for each neighboring friendly province
  • +10 for each neighboring From province
  • +10 for each neighboring sea province
This weight is then scaled by how far in the interpolation steps the province appears. For instance, if it appears in the very first step, like the two northern-most Ethiopian provinces in the example, it is scaled by 100%, remaining unchanged 6 as the interpolation has this number of steps. The desert province in the north east appears in the third of fivesix steps, scaling it to 60%by 4. The provinces in the last step would be scaled to 20% in this example.remain unscaled.

"Why did you write 'would'? And what is the base weight?" I hear you not asking. The base weight is zero and hence the weight of almost all provinces in plans you draw is zero. For those keeping track, the weights of the three northern Ethiopian provinces are 15, 45, and 990, 270, 60 (from west to east).

Finally those non-zero weights are rescaled to the range 0...255 with a floor of 1, making them 36, 255, and 1 in the example. These numbers are the only pieces of information derived from the drawn arrow to be used in the next step, the unit controller which will be featured in a later post. But if you are impatient and want to have your hopes crushed early that these are used in a very clever way, take a look at this thread from two years ago and/or this wiki page.


Okay, so controlling which provinces appear in the interpolation and in which phase seems to be how we can (indirectly) influence province weights. So how are these steps generated based on the From, Via, and To lines we have drawn?

As the geometry involved deals with larger shapes, there is a short-cut for cases where both From and To are just one province respectively. In this case the interpolated front just follows Via. But keep in mind that once the front line moves, it will extend and not be in this special case anymore... Sad @TheMeInTeam face.

For the generic case, the game generates a bunch of threshold lines that use Via as a back bone. Let's assume your From is S-shaped (green) and To is U-shaped (blue). Now imagine Via (red) gets straightened onto an axis and From and To are oriented in the angle they are connected to Via with. It might look like this:
interpolation_shape.png

At the half-way point of Via, a straight line gets generated as the 50% intermediate step. This is why the interpolation always straightens out in the middle, no matter how oddly shaped your From an To are. The length of this center line is the average length of From and To, making it span wider in most cases. To add insult to injury, when From covers the whole front line (as the AI usually does it) the length of this center line is doubled. This is why it is almost impossible to make a focused attack with battle plans, as they massively bulge outwards. The space inbetween get filled with linear interpolations between this center line and From or To respectively, indicated by the more lightly colored shapes. There are as many shapes as provinces in Via.

This sequence of lines gets then grafted back onto the actual shape of Via. The developers helpfull designed a nice visualization and then blocked it off behind the debug_fronts console command. For the Ethiopia example it looks like this:
ETH_debug_fronts.png

You can see quite easily the straight, ultra-wide center line reaching far into the ocean and Sudan. If the same thing was happening on a wider land area, the interpolation would include a lot of additional provinces there. You'll also note that all the lines look much smoother than the provinces they are based on. That's because they are smoothed :cool: The From and To lines also get extended outwards by one province-length at each end. Can't make the fronts too wide, right? Oh, one can? Nevermind then.

Armed with these lines, it now also becomes clear how the area is filled: starting at From, neighboring provinces are filled in until the next line is reached. This can mean that some lines generate multiple interpolation steps (because they are several provinces away from the previous line) or none. If any parts of To lie beyond the final line, they are filled in as the last step.
 
Last edited:
  • 25
  • 8Like
  • 1
Reactions:

Deliberus

Banned
9 Badges
Jun 22, 2020
560
1.473
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Battle for Bosporus
  • Victoria 3 Sign Up
  • Hearts of Iron IV: No Step Back
This is pretty interesting to see and how the steps are generated so thank you for that.

Have you ever analyzed and compared to how this works in Hoi 3? As far as that game is concerned, you could let the AI control a set amount of units and set objectives for them to take (instead of drawing lines).
 
  • 2Like
Reactions:

bitmode

1st Reverse Engineer Battalion
Nov 10, 2016
3.791
6.894
Have you ever analyzed and compared to how this works in Hoi 3? As far as that game is concerned, you could let the AI control a set amount of units and set objectives for them to take (instead of drawing lines).
I never played hoi 3. So the target would be individual provinces then?

In my opinion the drawing of the offensive line is a red herring anyway. It looks similar to old maps. But it is spreading attacks so wide that it is really only usable once you are winning by overwhelming force anyway. And then it does not really matter how exactly the divisions move, as long as they keep the line reasonably in shape.
 

TheMeInTeam

Field Marshal
54 Badges
Dec 27, 2013
30.240
18.889
  • Age of Wonders III
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: No Step Back
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis 4: Emperor
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Cradle of Civilization
  • Battle for Bosporus
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Hearts of Iron IV: La Resistance
  • Crusader Kings III
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Magicka 2
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Victoria 2
  • Europa Universalis IV
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Hearts of Iron III
  • Magicka
  • Europa Universalis IV: Res Publica
  • Stellaris - Path to Destruction bundle
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
As the geometry involved deals with larger shapes, there is a short-cut for cases where both From and To are just one province respectively. In this case the interpolated front just follows Via. But keep in mind that once the front line moves, it will extend and not be in this special case anymore... Sad @TheMeInTeam face.
Haha.

I think most of what's written here isn't too bad. The problems are elsewhere:

  1. Spearheads don't reliably spearhead - IE "support" attacks overwrite the higher priority.
  2. Units deciding where to move on front line before attacking is complete cancer/inefficient beyond comprehension.
  3. All this work to show targeted provinces/weights/etc...and units will straight up attack away from the orders anyway. Ignoring the highlighted areas. Sometimes ignoring that targeted province isn't even on the front line. "Aggressive" orders straight up bugs the final step (unit controller moving the stuff).
It's that kind of stuff that bugs me. Algorithm for which province(s) the units attack, while far from perfect, actually does pick targets that make it possible to move a line. Assuming the units are actually there and not moving across 50% of the front line for no reason, easily spending > 80% of their time shuffling rather than fighting or building planning to fight more.
 
  • 1
  • 1Like
Reactions:

bitmode

1st Reverse Engineer Battalion
Nov 10, 2016
3.791
6.894
  1. Spearheads don't reliably spearhead - IE "support" attacks overwrite the higher priority.
  2. Units deciding where to move on front line before attacking is complete cancer/inefficient beyond comprehension.
  3. All this work to show targeted provinces/weights/etc...and units will straight up attack away from the orders anyway. Ignoring the highlighted areas. Sometimes ignoring that targeted province isn't even on the front line. "Aggressive" orders straight up bugs the final step (unit controller moving the stuff).
For this you should take a look at https://hoi4.paradoxwikis.com/User:Bitmode/Unit_controller#Attacking_from_front_lines. Though it will basically just confirm that all our grievances are by design. The unit controller is up next, and as you well know it has a mind of its own, but I wanted to sort out the front line drawing first because at least in principle, little as it is, it is the main input that drives the unit controller when it comes to attacking.
 
  • 4
  • 1Like
Reactions:

TheMeInTeam

Field Marshal
54 Badges
Dec 27, 2013
30.240
18.889
  • Age of Wonders III
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: No Step Back
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis 4: Emperor
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Cradle of Civilization
  • Battle for Bosporus
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Hearts of Iron IV: La Resistance
  • Crusader Kings III
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Magicka 2
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Victoria 2
  • Europa Universalis IV
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Hearts of Iron III
  • Magicka
  • Europa Universalis IV: Res Publica
  • Stellaris - Path to Destruction bundle
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
For this you should take a look at https://hoi4.paradoxwikis.com/User:Bitmode/Unit_controller#Attacking_from_front_lines. Though it will basically just confirm that all our grievances are by design. The unit controller is up next, and as you well know it has a mind of its own, but I wanted to sort out the front line drawing first because at least in principle, little as it is, it is the main input that drives the unit controller when it comes to attacking.
That does cover that a lot of the issues are poor design choices, I agree. Though what I read there doesn't seem to explain outcomes like this one:



While this also showcases why the shuffling algorithm is so awful, the weird interaction is that one attack to the west, by units in the teal group. It's not on their front line, not a support attack, not part of any active offensive order. There's no reason, either in UI or per the logic in the wiki link (as I understand it), that the units are attacking there. I didn't doctor that or do anything strange to cause it; I simply made the battleplan to attack the pocket to the east and the game insists on attacking to the west in some capacity.

This is reproducible with aggressive stance. You can routinely see units attacking outside of their orders/front lines/any other active combat. I get that aggressive troops will attack before ready and automatically attempt to close pockets, but that isn't what's happening here. They're outright ignoring orders to attack things off their line. I don't think that one is by design, even if for example the "spearhead but also pin" is apparently intended (but bad design)?
 
  • 1
Reactions:

bitmode

1st Reverse Engineer Battalion
Nov 10, 2016
3.791
6.894
This is reproducible with aggressive stance. You can routinely see units attacking outside of their orders/front lines/any other active combat.
If you have a save that needs at most TfV/DoD where this can be reproduced I can now most likely find out what exactly the cause is. I'm not playing the game anymore, so I'll not encounter this myself.
What would happen if you use smaller armies, like the historical corps of 4 divisions?
What are you referring to?
 

DicRoNero

Oberst
27 Badges
May 13, 2013
1.913
1.066
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Colonel
I'm not playing the game anymore, so I'll not encounter this myself.
That sounds grim. Are you done with HoI4 altogether or it's simply a break till the devs come up with something new and refreshing?
 

Question

Field Marshal
Jun 11, 2019
2.831
5.725
Aggressive seems to try to attack everywhere. For example, you could draw an arrow to attack one province away. On aggressive mode, your units wont stop there, they will keep attacking till the front line has been removed because there is nothing left to attack. Ive taken all of India this way just by leaving it on aggressive. On balanced and lower, once your units reach the end of the line, they will stop and wait for further orders.

What im really annoyed at is why units keep attacking elsewhere even on careful settings.

For example, lets say i want to do an encirclement. I draw a spearhead and i want my units to go straight ahead and take 3 provinces to close the pocket. But they will never do that, they will keep attacking "to the sides" instead of sticking to the line. Its why so many people say that the battle planner sucks and you have to micro. And everytime the front line widens, my tank divisions spread out to guard the front line instead of leaving it to the infantry, so i have to keep redrawing the front line over and over and over to get them to concentrate on one spot.

If you just want to spam mechanized/tank divisions in 1944 and hit start, the battle plan works great at overruning bad AI infantry divisions. For anything else that needs a bit of finess, it fails badly.
 

TheMeInTeam

Field Marshal
54 Badges
Dec 27, 2013
30.240
18.889
  • Age of Wonders III
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: No Step Back
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis 4: Emperor
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Cradle of Civilization
  • Battle for Bosporus
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Hearts of Iron IV: La Resistance
  • Crusader Kings III
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Magicka 2
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Victoria 2
  • Europa Universalis IV
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Hearts of Iron III
  • Magicka
  • Europa Universalis IV: Res Publica
  • Stellaris - Path to Destruction bundle
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
If you have a save that needs at most TfV/DoD where this can be reproduced I can now most likely find out what exactly the cause is. I'm not playing the game anymore, so I'll not encounter this myself.

What are you referring to?

Everything on this computer has been running newer DLC than that since I built it a while back, and I haven't been playing HOI 4 as much lately (in part due to numerous frustrations with it). However since this one is easily reproducible perhaps someone else using aggressive stance will encounter it while not using DLC. The steps to reproduce are easy enough and I can confirm they still happen now:
  1. Create a pocket with only one province between pocket and rest of AI's armies.
  2. Make a front line + battleplan to attack into the pocket.
  3. Issue the order on aggressive stance and watch some of the army attack away from pocket.
I observed this numerous times during that Bulgarian run before the game ultimately destroyed it with a different bug.

For example, lets say i want to do an encirclement. I draw a spearhead and i want my units to go straight ahead and take 3 provinces to close the pocket. But they will never do that, they will keep attacking "to the sides" instead of sticking to the line. Its why so many people say that the battle planner sucks and you have to micro.
Yeah. Support attacks override the battle plans and make spearhead units "support" pinning attacks rather than executing their order. This is, apparently, by design. This + a few other interactions (like infinite point passing as top 2 in peace conferences or farming "occupation" score without gaining significant ground) is why you'll occasionally see me call things "broken by design". They apparently intended it to be like that, despite that it objectively breaks from what the word "spearhead" means.

Due to how the game reroutes stuff on front lines, even your 1944 example is significantly worse with battleplanner. Though at that point you're probably strong enough not to care, the inexplicably long (when compared to something functional) shuffling paths waste a lot of time.
 

HugsAndSnuggles

General
86 Badges
Sep 3, 2016
2.338
2.713
For this you should take a look at https://hoi4.paradoxwikis.com/User:Bitmode/Unit_controller#Attacking_from_front_lines. Though it will basically just confirm that all our grievances are by design. The unit controller is up next, and as you well know it has a mind of its own, but I wanted to sort out the front line drawing first because at least in principle, little as it is, it is the main input that drives the unit controller when it comes to attacking.
Yeah...
In an unmodded game, all of the terrain types use the default value 0 for their worth attribute
kind of explains why battleplanner loves to attack mountains/cities through the river.
 
  • 1Like
Reactions:

Spelaren

Captain
On Probation
Jun 12, 2019
463
486
It's easier to just do it manually rather than those stupid offensive lines and spearheads that never spearhead but attack troops thus ruining the surprise.
 
  • 1
Reactions:

bitmode

1st Reverse Engineer Battalion
Nov 10, 2016
3.791
6.894
That sounds grim. Are you done with HoI4 altogether or it's simply a break till the devs come up with something new and refreshing?
It's not grim :D I have not played (as in just playing for the fun of the game) for quite a while. Hoi4 for me is more like an old junkyard where interesting things to tinker with can be found. The new stuff the devs are developing rather moves the game further away from what I'd like but the market seems to agree with them, so I'm not complaining (much).
Aggressive seems to try to attack everywhere. For example, you could draw an arrow to attack one province away. On aggressive mode, your units wont stop there, they will keep attacking till the front line has been removed because there is nothing left to attack. Ive taken all of India this way just by leaving it on aggressive. On balanced and lower, once your units reach the end of the line, they will stop and wait for further orders.
Interesting. I'll see whether I can figure this out. This is anticipating the next episode in the battle plan saga, but I was assuming that the weight has to be greater-than-zero even on aggressive. Perhaps there is an entirely separate code path that I have not yet looked at for additional aggressive actions.
But they will never do that, they will keep attacking "to the sides" instead of sticking to the line. Its why so many people say that the battle planner sucks and you have to micro. And everytime the front line widens, my tank divisions spread out to guard the front line instead of leaving it to the infantry, so i have to keep redrawing the front line over and over and over to get them to concentrate on one spot.
Spearheads (and the fabled withdraw plans) are planned for episode VI. I have not investigated them too deeply yet and I don't know if it applies in your case, but I seem to remember that positioning of a spearhead is only properly handled if it is the only attack arrow from a front line but I'm not sure on that one.
the battle plan works great at overruning bad AI infantry divisions. For anything else that needs a bit of finess, it fails badly.
That's what so weird about the scope of this system. Overrunning weak infantry could have been done with a much simpler system. And the way the AI uses the plans, always drawing a boring, straight, shallow attack line (which means the interpolated lines are more or less just a bunch of parallel lines) could also be simulated by a simpler implementation.
(Oh, what I failed to mention in the initial post is the Via line in AI's battle plans have their mid section removed, controlled by the define INTERPOLATED_FRONT_STEPS_SHORT, so their Via is basically just a straight line no matter what they draw)

Basically battle plans mix the requirements of the AI which does not really have a plan (in the true sense of the word) with the needs of players who typically do have an idea of what should be happening to some fidelity. And land combat offers a lot of fidelity. This is something podcat said in the very first dev diary:
We are developing a planning system that gives you greater control while not being as taxing as the detailed manual play from the last Hearts of Iron game. We want to give you time to look at the bigger picture. In my opinion, this also adds a lot of immersion, since it feels more like I am guiding a military campaign rather just shuffling units between provinces. For the micro-managers out there - you can still do very detailed plans and update them in real-time, which will basically work like the old manual control but the system will reward successful longer term plans, so expect to have a few things to learn!
There won't be any large "automate this" buttons in the game. We want all parts to be fun and playable. If they are not, they get redesigned or replaced.
Notice how he does not even mention actual manual control as an option there! Once you bring back manual division control into the design, I think this vision becomes contradictory because either land combat is varied enough so that it is fun to play manually OR it is a rather predictable, non-decisive little detail that you leave to an automated system and focus on the bigger picture. You can't have both because then you are asking the player to automate something (by dangling a planning bonus in front of him) that is so crucial and war deciding that it arguably overshadows big picture planning or is at least on par with it.
 
  • 3Like
  • 2
Reactions:

FStefanak

First Lieutenant
70 Badges
Mar 11, 2018
235
446
  • Hearts of Iron IV: By Blood Alone
  • Victoria 2
  • Cities: Skylines
  • BATTLETECH
  • Stellaris
  • Imperator: Rome
  • Age of Wonders: Planetfall Premium edition
  • Crusader Kings II
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV
Great stuff!
At the half-way point of Via, a straight line gets generated as the 50% intermediate step. This is why the interpolation always straightens out in the middle, no matter how oddly shaped your From an To are. The length of this center line is the average length of From and To, making it span wider in most cases. To add insult to injury, when From covers the whole front line (as the AI usually does it) the length of this center line is doubled.
If I understand correctly, it actually does two interpolations, from "From" to the center line, then from the center line to "To".

Do you know (theorize) why force a straight line in the center of the interpolation? Why not "average" that shape as well as length? So a "V" shaped "From" with a "V" shaped "To" will have a "V" shaped center as well. If my understanding is correct, that should be not just a better interpolation, but would make the actual algorithm (marginally) simpler.
 

Secret Master

Covert Mastermind
Moderator
95 Badges
Jul 9, 2001
36.589
19.899
www.youtube.com
  • 200k Club
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Semper Fi
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • March of the Eagles
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Holy Knight (pre-order)
  • Pride of Nations
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Limited Collectors Edition
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: No Step Back
  • Europa Universalis III: Chronicles
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Deus Vult
  • Europa Universalis III
  • A Game of Dwarves
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Europa Universalis III Complete
  • King Arthur II
  • The Kings Crusade
What is shown is a visualization of the interpolated front steps. As the name implies, the interpolated front creates intermediate areas with the purpose of connecting From with To while using Via as a guide.

Wait, so the visualization actually shows how those tiles are being prioritized for movement and attacks? It's not just an animation with no actual connection to AI behavior?

Hell, I didn't know that.
 

bitmode

1st Reverse Engineer Battalion
Nov 10, 2016
3.791
6.894
If I understand correctly, it actually does two interpolations, from "From" to the center line, then from the center line to "To".
That's true.
Do you know (theorize) why force a straight line in the center of the interpolation? Why not "average" that shape as well as length? So a "V" shaped "From" with a "V" shaped "To" will have a "V" shaped center as well. If my understanding is correct, that should be not just a better interpolation, but would make the actual algorithm (marginally) simpler.
Honestly while reversing it, I expected it to be exactly like you describe. I think it would also be much easier to understand for the player. Any intermediate step that smooths and reshapes the original drawn lines takes control out of the players hands. While I chose a very tame example from the tutorial, when your front line is very curved, you can't draw in a way to maintain that curve due to the median line:
CZE_plan.pngCZE_interpol.png
I don't really have a theory why someone would come up with that because in any situation where the player does want to have a straight (and perhaps twice as wide) intermediate step, they could just draw two chained arrows for that.
 
  • 2
Reactions:

Emren

Brigadier General
68 Badges
Feb 27, 2001
1.444
904
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: No Step Back
  • Europa Universalis 4: Emperor
  • Battle for Bosporus
  • Stellaris: Federations
  • Stellaris: Ancient Relics
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Synthetic Dawn
  • 500k Club
  • Europa Universalis IV
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Europa Universalis IV: Pre-order
Wow, very interesting dissection of the logic behind the battleplans. I really don't understand the logic of having that super wide front at the midpoint of Via, but there probably isn't a good logic behind it.