• Post New Message
You're browsing the GameFAQs Message Boards as a guest. Sign Up for free (or Log In if you already have an account) to be able to post messages, change how messages are displayed, and view media in posts.
  1. Boards
  2. Fire Emblem Heroes
  3. Practical AI Prediction

User Info: QuiteQuarky

QuiteQuarky
2 months ago#1
Table of Contents
1. Introduction

2. Getting the AI Started
2-a. Holding Position
2-b. Engaging the Player

3. Movement
3-a. Movement Order
3-b. Chase Priority
3-c.Tile Selection
3-c-i. Enemy Threats
3-c-ii. Requires Teleport
3-c-iii. On the Diagonal
3-c-iv. Special Terrain
3-d. Block Breaking

4. Assists
4-a. Movement Assists
4-b. Rallies
4-b-i. Rally up
4-c. Staves
4-c-i. Healing
4-c-ii. Restore
4-d. Refreshing

5. Combat
5-a. Initiator Selection
5-a-i. Win > Draw > Loss
5-a-ii. Debuff/Afflictor Priority
5-a-iii. Massive Damage
5-a-iv. Movement Range Priority
5-b. Target Selection
5-b-i. Win > Draw > Loss
5-b-ii. Debuff/Afflictor Priority
5-b-iii. Massive Damage
5-b-iv. Double Baiting
5-c. Vantage Nuances
5-c-i. Special Activation
5-c-ii. Assist “Bypass”
5-d. Rally Trap Examples
5-d-i. Rally Trap A
5-d-ii. Rally Trap B

6. Closing Remarks


1. Introduction
I’m making this post today in an effort to spread knowledge about how the “AI” moves and chooses which actions to take in Fire Emblem Heroes (FEH) so that you can have the tools you need to build strategies. The main draw is that I have mocked up scenarios in-game and recorded them to demonstrate the AI behavior in a simplified setting. I’m not here to tell you what works best or what is and is not the metagame but rather to illustrate and simplify the “tiebreaks” the AI makes to choose what is the “optimal tile to take the optimal action on the optimal target” at any given point during the AI’s phase.

Linked below is the full guide that I used when learning about AI decision making in FEH. The hard work is done for us, thank you Mia! I did not create “Mia’s AI Manipulation Instructional Academy” (henceforth Mia’s Academy) nor do I want to take credit for it. This is an amazing resource that I encourage you to use:

Mia’s AI Manipulation Instructional Academy
https://vervefeh.github.io/FEH-AI/textguide.html

As I discuss the AI decision making below, I will link to locations in Mia’s Academy so that you can see which pieces of Mia’s Academy I am highlighting. Mia’s Academy is dense and succinct, there’s a lot of info jammed in there so I’m happy to help interpret it if you’re having trouble.

I’m simplifying major points from Mia’s academy with text and video examples. I will touch on major points you can use to help you best predict the AI’s future decisions given any board state without actually having to go through the motions in-game. This is particularly applicable for Aether Raids since you get no retires. I’ve chosen a specific order to present the information as I think this will be the most illuminating for us mere humans when building an “intuition” for FEH AI decision making. Where applicable, I’ve ordered subsections based on the order the AI makes the tiebreaks. For example, the AI considers win>draw>loss for combat targeting before it considers massive damage and so I have ordered win>draw>loss ahead of massive damage in section 4.

Lastly, I’ll refer to the AI units as just that, “AI units” and will be explicit when discussing the “player units".

With that said, let’s begin!
We're all just quark soup.
(edited 2 months ago)

User Info: QuiteQuarky

QuiteQuarky
2 months ago#2
2. Getting the AI Started
This is relevant for all game modes but Aether Raids functionality will be emphasized.

The AI has two main modes of “action”, 1) holding position and 2) engaging the player. In PvE content you can’t tell what the AI will do until EP1 rolls around. In Arena the AI is always in mode 2) engaging the player. In Aether Raids the AI starts in mode 1) holding position then when one of a couple specific conditions is fulfilled will move to 2) engaging the player. These conditions also hold for PvE maps where the AI starts in the hold position mode.

2-a. Holding Position
While holding position, the AI is still eligible to take actions as long as the eligibility requirements for those actions have been met, e.g. healing requires damage to have been dealt. However, merely dealing damage (via a bolt trap, for example) is not enough to move the AI to mode 2) engaging the player.

https://www.youtube.com/watch?v=_z3JBC1FFWY

2-b. Engaging the Player
The AI will begin engaging the player when at least one of the following conditions are met:
1) If any AI unit “threatens” a player unit.
2) If any AI unit is attacked by a player unit. (An AI unit being “threatened by” a player unit is insufficient.)
3) If any player unit occupies a tile the AI would otherwise be able to move to or through. (The AI unit need not have a weapon equipped.)

https://www.youtube.com/watch?v=IlsOA-KvoC8

3. Movement
This section will explore movement without action for the sake of simplicity. Tiebreaks discussed in this section when determining what is the “optimal tile” are generally applicable when the unit can take some action at the end of movement, just be aware “taking action” has precedence over “taking no action” and thus the “optimal tile” selection is influenced accordingly. For example, an AI unit may move to assist an AI ally instead of moving along the shortest path to the player’s units. Then, the tile selection occurs between tiles from which the AI unit can assist its ally instead of selecting between the tiles closest to the player’s unit.

When the AI has no other actions that it can take, it will simply move. In this case, the enemy AI will always move as close as possible to the “optimal target” and will end movement on the “optimal tile”.

3-a. Movement Order
When there are no other actions to be taken, the AI will move units in the following order: Melee (no assist) > Ranged (no assist) > Melee (w/ assist) > Ranged (w/ assist).

https://www.youtube.com/watch?v=tZfoUiieHhg

Mia’s Academy citation -
https://vervefeh.github.io/FEH-AI/textguide.html#step1 part B

3-b. Chase Priority
The AI chases the target that will take the most damage and deal the least. The AI will move along the shortest path to reach the chosen target.

https://www.youtube.com/watch?v=TJtOCEeAAwU

Mia’s Academy citation -
https://vervefeh.github.io/FEH-AI/glossary.html#section4j

3-c. Tile Selection
With all else being equal, the AI chooses tiles “up” then tiles “right” as “more optimal”. Mia’s academy numbers tiles and the AI favors tiles with a higher number based on Mia’s Academy scheme found here: https://vervefeh.github.io/FEH-AI/glossary.html#section1b.

If all else isn’t equal, the AI makes some extra decisions which I get into below.
We're all just quark soup.
(edited 2 months ago)

User Info: QuiteQuarky

QuiteQuarky
2 months ago#3
3-c-i. Enemy Threats
AI units will choose the tile which is threatened by the fewest player units.

https://www.youtube.com/watch?v=XFKowZwvf3k

Mia’s Academy citation -
Various, e.g. https://vervefeh.github.io/FEH-AI/textguide.html#step3 part C step 2

3-c-ii. Requires Teleport
AI units will choose to teleport when possible.

https://www.youtube.com/watch?v=X7-Qb6-uISs

Mia’s Academy citation -
Various, e.g. https://vervefeh.github.io/FEH-AI/textguide.html#step3 part C step 3

3-c-iii. On the Diagonal
When the AI has no other actions to take and the shortest path to the “chase priority target” is on a “diagonal” i.e. not directly in a cardinal direction, the AI will favor tiles closer to the diagonal.

https://www.youtube.com/watch?v=MDw2-ZZ_jlo

Mia’s Academy citation -
https://vervefeh.github.io/FEH-AI/glossary.html#section3f

3-c-iv. Special Terrain
The AI prioritizes terrain in this order, Flier only > Forest > Trench > Regular, when choosing the “optimal tile” to end movement or take an action.

https://www.youtube.com/watch?v=MA8GrE_96SI

Mia’s Academy citation -
Various, e.g. https://vervefeh.github.io/FEH-AI/textguide.html#step3 part C step 4

3-d. Block Breaking
If there is a block closer to the “chase priority target” than the “optimal tile” on which the AI will end their movement, instead the block will be broken by the AI.

https://www.youtube.com/watch?v=vJ7JuUPBkuQ

Mia’s Academy citation -
https://vervefeh.github.io/FEH-AI/glossary.html#section2c

4. Assists
AI decision making around assist use has two main phases “pre-combat” assists and “post-combat” assists. The “pre-combat” decision making occurs when any AI unit “threatens” a player unit. If the AI still has available actions to take but the AI has no unit that “threatens” a player unit, the AI uses the “post-combat” decision making tiebreakers. I will distinguish explicitly if it matters in the context of the below discussion. Detailed rules for user assist eligibility and target of assist eligibility can be found here: https://vervefeh.github.io/FEH-AI/charts.html#. Interestingly, specials and counter-attacks are not factored in when determining damage thresholds for “pre-combat assist user eligibility". This is important later when discussing the skill vantage.

4-a. Movement Assists
Generally, the AI uses movement based assists (repo, swap, etc.) to move the “target unit” out of a danger zone. Movement assists have the lowest priority for use out of all assists and some of the subtlest actions fall under “movement assists” but we’re keeping it simple here.

https://www.youtube.com/watch?v=IYpGYoMfDIM

Mia’s Academy citation -
Pre-combat: https://vervefeh.github.io/FEH-AI/textguide.html#step4 parts G, L, M
Post-combat: https://vervefeh.github.io/FEH-AI/textguide.html#step6 parts G, K, L
We're all just quark soup.
(edited 2 months ago)

User Info: QuiteQuarky

QuiteQuarky
2 months ago#4
4-b. Rallies
Rallies are used on AI allies that “threaten” at least one player unit when the rallier has no combat where they deal >5 dmg.

https://www.youtube.com/watch?v=lRVsF3vDNLE

If the AI “threatens” no player units and therefore is in the “post-combat assist” regime, being “threatened by” a player unit is sufficient for AI unit to be eligible to be rallied by available ralliers. This behavior is commonly seen in Arena and Arena Assault as the unmoving rally cube.

https://www.youtube.com/watch?v=LUxdvkhjnqU&list=PLanNzxXz1nkNzxbzXFInaVwQqGihLlRwH&index=13&t=0s

Mia’s Academy citation -
Pre-combat: https://vervefeh.github.io/FEH-AI/textguide.html#step4 parts F, I, M
Post-combat: https://vervefeh.github.io/FEH-AI/textguide.html#step6 parts F, H, L

4-b-i. Rally Up
When using rally up assists, the AI assign two target groups. First, the “intended target” is the target intended to receive the buff and must satisfy the usual rally conditions. Next, “other eligible targets” are the targets where the rally up will affect the “intended target” and need not satisfy the usual rally conditions. Rally Up is used on any these targets where the largest number of allied AI units will be buffed which must include the “intended target”.

https://www.youtube.com/watch?v=xSfvZn5IPCI

Mia’s Academy citation -
Pre-combat: https://vervefeh.github.io/FEH-AI/textguide.html#step4 part J
Post-combat: https://vervefeh.github.io/FEH-AI/textguide.html#step6 part I</quote

4-c. Staves
Staves have higher priority than rallies but lower priority than refreshes. Assists like “reciprocal aid” and “sacrifice” follow staff rules (with some extra nuances) instead of other assist type rules. Restore staves are treated slightly differently than normal staves. However, in the effective absence of debuffed targets, a restore staff unit’s decision making is reduced to that of a normal staff unit’s decision making.

4-c-i. Healing
“Pre-combat”, the AI will only use their assist to heal an ally when that ally has at least 10 points of damage for 99% of all situations, see HP thresholds citation below. “Post-combat” the AI will heal regardless of HP thresholds. If the AI instead has a combat that results in a win, the AI will engage in that combat instead of healing. Healing takes precedence over combat that results in a draw or a loss.

https://www.youtube.com/watch?v=egmn8ONUtBU

Mia’s Academy citation -
Pre-combat: https://vervefeh.github.io/FEH-AI/textguide.html#step4 parts F, (H), I, M
Post-combat: https://vervefeh.github.io/FEH-AI/textguide.html#step6 parts F, H, L
HP Thresholds: https://vervefeh.github.io/FEH-AI/charts.html#chartF

4-c-ii. Restore
If only restoring debuffs, target selection is entirely based on “slot index number”. Units with a “higher slot index number” (i.e. further to the right in the team menu) will preferentially be targeted by Restore staff users.

https://www.youtube.com/watch?v=twwdg6iuhmo

Mia’s Academy citation -
Pre-combat: https://vervefeh.github.io/FEH-AI/textguide.html#step4 part K
Post-combat: https://vervefeh.github.io/FEH-AI/textguide.html#step6 part J
We're all just quark soup.
(edited 2 months ago)

User Info: QuiteQuarky

QuiteQuarky
2 months ago#5
4-d. Refreshing
Refreshers have the highest assist priority and will always refresh before other ally actions when the refresh action is available. Refreshers will begin combat instead of refresh if they deal >5 dmg.

https://www.youtube.com/watch?v=St95SJ46Fd8

Mia’s Academy citation -
Pre-combat: https://vervefeh.github.io/FEH-AI/textguide.html#step4 parts F, I, M
Post-combat: https://vervefeh.github.io/FEH-AI/textguide.html#step6 parts F, H, M

5. Combat
Now that we have gone through some basics about how the AI moves pre- and post-combat, let’s start talking about combat decisions the AI has to make. After all the pre-combat assists have been performed, the AI starts looking to engage in the “optimal combat” from the “optimal tile". We’ve built up some knowledge about what the AI thinks the “optimal tiles” are given a board state so let’s start talking about what the AI thinks are “optimal combats” and the order in which the AI will engage in these combats.

In this section I’ll bring up a couple practical examples of AI manipulation as well as simply demonstrating some of the tiebreaking decisions the AI makes. These examples will utilize at least a couple AI tiebreaks.

5-a. Initiator Selection
When multiple AI units threaten a player unit, the AI must make decisions about which unit initiates on the player unit first. There are a few important tiebreaks to consider.

5-a-i. Win > Draw > Loss
An initiator that wins has priority over one that draws has priority over one that loses.

https://www.youtube.com/watch?v=-3fOzr36Ukg

Mia’s Academy citation -
https://vervefeh.github.io/FEH-AI/textguide.html#step5 part E step 1

5-a-ii. Debuff/Afflictor Priority
An initiator that can debuff def/res has priority over an afflictor has priority over other AI units when combat results are equal.

https://www.youtube.com/watch?v=A8ulewPEsHs

Mia’s Academy citation -
https://vervefeh.github.io/FEH-AI/textguide.html#step5 part E steps 2, 3
Debuffer Skills: https://vervefeh.github.io/FEH-AI/charts.html#chartG
Afflictor Skills: https://vervefeh.github.io/FEH-AI/charts.html#chartH

5-a-iii. Massive Damage
Combats where the AI deals more points of damage and takes fewer points of damage are more optimal.

https://www.youtube.com/watch?v=8UWA76FAfuA

Mia’s Academy citation -
https://vervefeh.github.io/FEH-AI/textguide.html#step5 part E step 4

5-a-iv. Movement Range Priority
Combats where the AI unit has a larger movement range are more optimal.

https://www.youtube.com/watch?v=gEOnSIuGDwQ

Mia’s Academy citation -
https://vervefeh.github.io/FEH-AI/textguide.html#step5 part E step 5

5-b. Target Selection
When a single AI unit “threatens” multiple player units, the AI will attack the target with the most optimal combat result.

5-b-i. Win > Draw > Loss
Targets where the AI unit has a combat resulting in a win are selected preferentially over draws are selected preferentially over losses.

https://www.youtube.com/watch?v=1BpV8Ksupcs

Mia’s Academy citation -
https://vervefeh.github.io/FEH-AI/textguide.html#step5 part D step 1
We're all just quark soup.
(edited 2 months ago)

User Info: QuiteQuarky

QuiteQuarky
2 months ago#6
5-b-ii. Debuff Priority
Targets where the AI can inflict debuffs are more optimal than targets where the AI cannot inflict debuffs.

https://www.youtube.com/watch?v=KJVspl_iKM0

Mia’s Academy citation -
https://vervefeh.github.io/FEH-AI/textguide.html#step5 part D step 2

5-b-iii. Massive Damage
The AI will choose to attack the player unit that will take the most damage and deal the least.

https://www.youtube.com/watch?v=vTLBlo1d_4w

Mia’s Academy citation -
https://vervefeh.github.io/FEH-AI/textguide.html#step5 part D step 3

5-b-iii. Double Baiting Example
The AI does not store “combined combat” results. That is, the AI does not consider scenarios where “if unit A attacks first, then unit B will win” and so “double baiting” can be used to break some overlapping range scenarios by manipulating individual combat results to your advantage.

https://www.youtube.com/watch?v=8oIm_tK0UjU

5-c. Vantage Nuances
Vantage does not operate as would be intuitively expected in every instance. In some cases it ignores damage that would be dealt (specials) and in some cases it considers damage that will not have been dealt (assists) if vantage activates.

5-c-i. Special Activation
Vantage combats ignore damage from specials when determining “damage dealt” tiebreaks (such as the massive damage tiebreak) for the purposes of determining combat order. This is most pronounced with “area of effect” (AoE) specials like Blazing Wind but also applies to Glimmer and Moonbow etc.

https://www.youtube.com/watch?v=rN0trwu6FOU

5-c-ii. Assist “Bypass”
Vantage is not considered when determining whether an AI unit will use their assist or will instead engage in combat. The damage threshold applies for combat vs. assist use eligibility even if the assister will lose the combat before dealing any damage due to a vantage KO.

https://www.youtube.com/watch?v=r_iaDr_h0Y0
We're all just quark soup.
(edited 2 months ago)

User Info: QuiteQuarky

QuiteQuarky
2 months ago#7
5-d. Rally Trap Examples
I want to touch on a basic AI structure in AR defense teams that specifically combines “rallies” and “refreshes” to add a touch of unpredictability to the defense. Of course we know better since the AI decision making is deterministic but these traps are complex structures and force the player to figure out lots of “if-then” scenarios to determine the final order of actions the AI will take given some arbitrary board state making rally traps “effectively unpredictable”. Well, unless you’re willing to drill-down the possibilities.

In one sense, my examples below are the same example: a unit being baited is rallied then the rallier is refreshed. That scenario can be setup in many ways and I’ve included two of them below to demonstrate that there’s not just one rally trap structure.

5-d-i. Rally Trap A
This is a simple rally trap that requires only two units to work. You need a unit that has a rally and a weapon equipped as well as a unit with a refresh assist and a weapon equipped. The idea is that the rallier and the refresher have overlapping attack ranges so that when baiting the rallier, they will rally the refresher instead of attack outright in order to be refreshed first. This is particularly potent on bladetome ralliers to clear panic before attacking and obtain buffs from the refresher.

https://www.youtube.com/watch?v=0ZkwrMmD8f8

5-d-ii. Rally Trap B
This is a more complex rally trap that requires a minimum of three units and can incorporate elements of rally trap A. You need a rallier with a weapon, you need a refresher with or without a weapon and you need a bait unit with a weapon. The idea is that offense team will bait the bait unit so that the rallier changes location to rally the bait unit, the refresher now has a target to refresh and does so, then the bait and rally units now have overlapping ranges. At this point, the AI starts drilling down into deciding “which combat is more optimal” and will attack with the unit whose combat result is more optimal (usually massive damage decides). Generally, the rallier will always be built to have more optimal combat results than the bait unit.

https://www.youtube.com/watch?v=mIS3ZxoCcsM

6. Closing Remarks
I covered what I believe to be about 95% of the most relevant AI decision making that you’ll encounter. Mia’s Academy covers everything from top-to-bottom left-to-right but may be a bit opaque or dense in text form. My intention is that by providing some recorded video examples of gameplay you can have a solid foundation in FEH AI manipulation at the very least and hopefully provide you with enough knowledge to springboard you into using Mia’s Academy in full.

Just briefly, auto-battle AI uses this decision making and is always in “engaging the player” mode. It’s a tried and true method for practicing your AI prediction skills and it’s worth bringing up as a reminder.

Please feel free to reach out to me with AI decision making questions. @ me in this thread or send me a PM and I’ll do my best to hash out what I think is/isn’t happening in your example.

Thanks for reading!
~Quarky
We're all just quark soup.
(edited 2 months ago)

User Info: QuiteQuarky

QuiteQuarky
2 months ago#8
shameless bump
We're all just quark soup.

User Info: Steamroll

Steamroll
2 months ago#9
We should probably request sticky for this.

I'll take a read of this later thaks TC for the effort put into it.
(edited 2 months ago)

User Info: Crusher063

Crusher063
2 months ago#10
Wow. Well done QQ. I need to read through this while thing when I have the time.
FEH ID: 8279160200
Eighteen 5*+10 units and counting...
  1. Boards
  2. Fire Emblem Heroes
  3. Practical AI Prediction
  • Post New Message