-
-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Battle: calculate which stack is the best for current battle #7945
Comments
Another example: Before the battle centaurs could divede by 2 stacks, so they would deal maximum damage and kill 1 archimage or my centaurs. If they are divided by 5 stacks, they deal 0 damage (in dead units). divide.cent.mp4PS - may be, this "before battle calculations" should be done only for hard/expert difficulty. version 1.09 |
Hi @idshibanov , I believe we need to add an extra value for killing monsters that are going to make their move during current turn, while calculating an outcome for an AI monster attack. |
Battle formations of neutral armies (as well as object guardians) are fixed and never depend on who they are fighting, but only on the tile on which they are located. This is how it works in the original game. It is unlikely that this will change. |
In heroes3 monsters can divide to deal maximum damage, so in heroes 2 it looks like not working as it should. |
In HoMM IV, the fog of war does not work the same way as in HoMM2 or HoMM3, but this does not mean that in HoMM2/3 it "doesn't work as it should".
What do you mean by "fix"?
What do you mean by "easily achievable"? |
If AI in HOMM IV or HOMM V would be stronger then in heroes 2/3 then we could borrow the logic from it to create stronger AI. The "impossible" level should be "impossible" not caused by difference in resources, but caused by lack of skill by human player.
I mean, all the issues with adventure map, like #7774 #7775 #7773 when computer calculates the objects, but not calculating will the visiting object bring him win faster or it is useless for win.
I mean, in my opinion, make computer stronger in battle is more easy, then rework the logic in adventure map for stronger AI. |
These are just general words about nothing.
To have an opinion, you need to have an understanding of how exactly AI works now, and why it works the way it does. Then, when specific idea appear, it will be possible for you to offer a working proof-of-concept, on the basis of which it is possible to demonstrate some new approach, as well as what advantages it brings, and give an opportunity to evaluate its disadvantages. For now, general words about "fix" and "easily achievable" are nothing but just words. |
Said this because of #7773 where computer could defeat me in 1 turn, but used to walk around, do nothing and don't defeat me (computer had much stronger army)
Yes, I don't know the code at the moment, but soon will learn a bit more C++ and hope could help the project. |
Preliminary checks
Describe the problem requiring a solution
I am red player and I attack the purple hero.
I have 12 green dragons, but in situation where all dragons are in 1 stack I win:
win.with.1.stack.mp4
And in situation where dragons are in equal stack, I lose:
5.stacks.mp4
Well that is just the mechanics of the game, but if we give control to computer, before attacking that purple player, will he do equal stacks or in 1 stack? Can not try it by my own, but I am sure, that computer does not calculate variations of stacks.
Describe the possible solution
Before attacking the orher hero, AI should calculate which combination is the best for the current battle.
For example, to get a starting point, calculate 2 situations:
Additional info
version 1.09
save:
1 stack or 5.zip
The text was updated successfully, but these errors were encountered: