Comments (6)
Isn't fighting till the last breath and inflicting maximum damage would help your teammates? :)
Also, surrendered hero could be hired by opposite side, so surrendering into nowhere could be controvertial step.
from fheroes2.
I've been thinking about this one lately myself and came to the same conclusion of this issue.
I'm trying to approach it as if the AI were a human player
- If you're on a team and the rest of your team is still alive, then surrender is the best choice to help your team by avoiding to give artifacts and XP bonus etc to your common enemy after your defeat. But if your defeat in battle will trigger the end of the scenario (capture castle or hero), then don't surrender.
- We will have AI vs AI battles in free-for-all maps, and there's no reason for the AI to surrender in its final stand in an AI vs AI battle because it won't have any teammates that their surrendering would help.
from fheroes2.
Isn't fighting till the last breath and inflicting maximum damage would help your teammates? :)
Sure but right now the retreating and surrendering works by looking at army strength difference, and this means the AI doesn't have much maximum damage left to give at the moment it decides to surrender. So we're talking about either giving 500 XP plus your artifacts, or not giving those things but some insignificant amount of gold to the common enemy.
Also, surrendered hero could be hired by opposite side, so surrendering into nowhere could be controvertial step.
Defeated hero can also be hired by opposing side just as easily so this doesn't change.
from fheroes2.
If you're on a team and the rest of your team is still alive, then surrender is the best choice to help your team by avoiding to give artifacts and XP bonus etc to your common enemy after your defeat.
Yes, that's why I allowed the last hero in last castle to surrender at the time.
But if your defeat in battle will trigger the end of the scenario (capture castle or hero), then don't surrender.
If your defeat will trigger the end of the scenario, then it doesn't matter whether you surrender or not. You will be defeated anyway and the end of scenario will be triggered anyway, no matter what you do.
In any case, I believe that unnecessary logic for checking various cases is redundant here. Less logic means simpler code, fewer tests, easier support in the future.
from fheroes2.
If your defeat will trigger the end of the scenario, then it doesn't matter whether you surrender or not.
Yes, in other words there is no point in surrendering at that point.
In any case, I believe that unnecessary logic for checking various cases is redundant here. Less logic means simpler code, fewer tests, easier support in the future.
Sure. I did highlight this potential concern people could get in my original issue, and I still feel that it doesn't really matter which way we go. This "last stand" behavior is a matter of personal opinion, rather than optimal AI choices.
@Branikolog does have a point in that it seems inconsistent/weird that the AI will try to make a last stand in cases for retreat, but not for surrender in castles.
from fheroes2.
@Branikolog does have a point in that it seems inconsistent/weird that the AI will try to make a last stand in cases for retreat, but not for surrender in castles
We can let it retreat in similar cases, why not.
from fheroes2.
Related Issues (20)
- Capitulation logic HOT 2
- Battle: Improve attack strategy to loose less troops HOT 1
- Battle: computer is rushing and loosing units HOT 1
- Battle: if we definetely loose, then try to kill as much units, as we can
- I suggest new feature - rating of the map HOT 1
- Castle screen, scroll bar becomes too tiny for a sizeable trade
- High scores screen, the default name can be too long to fit the list HOT 4
- Castle info field is too large and shifted HOT 1
- Show creature info for the editor dialog
- Combat, AI behavior, AI shooters tend to spread their shots over different troops (1.1.0 8733)
- [Scenario Editor] Graveyard is in the wrong category HOT 2
- AI doesn't take into an account Troll's regenerative abilities
- Adventure map, sometimes the hero's movement animation is stopped when he enters the stone liths HOT 1
- Combat screen, giant's sprite is displayed on top of the crusader troop's creature count indicator
- Adventure map, optimize the hero's path, taking into account the destination reached on the next turn
- Adventure map, optimize AI behavior of heroes during movement (1.1.0 8733)
- Combat screen, cyclops corpse sprite is displayed on top of the crusader troop's creature count indicator
- Combat screen, Ballista info window, take into account the captain/hero's attack for the displayed attack value of archers
- Combat screen, Ballista info window, the movement penalty for troops in the moat is not currently active
- Game crash during AI turn on failed assertion on _pathStart HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fheroes2.