Wow, I'll try it now.
Added 22 minutes later
Excellent! You helped me out again. Thank you very much. It seems to be working as expected:
a) Hero 0 tiles away from the town: The AI hid him in the garrison, and he's working as a defender.
b) Hero 1 tile away from the town: The AI completely ignores him. Everything worked perfectly.
Added 21 minutes later
Maybe someone can tell me more about the AI behavior types?
warrior - warrior? Obviously, aggressively runs towards the player.
builder - builder. Probably builds a castle and gathers resources.
explorer - scout, explorer? Runs around the map the whole game?
hunter - hunter? Kills low-level heroes?!
victim - ???
Auto-translated