Skip to content

Posts from HoMM3 HD is a mod (add-on) for the game Heroes of Might and Magic 3.

4.7 (6 ratings)
User Avatar
Auto-translated
Read this post carefully: /topic/at/671433/

(battle of an AI hero against neutrals – just like in the original for speed)

But still, it looks somewhat abnormal.

Yes, and what happened to the file extension?
Сейчас балуюсь этим https://vcmi.eu/download/
За то что нейтралы не бегают за единичкой, для меня это уже стоит того
User Avatar
Auto-translated
Something else is interesting.

I ran it on my computer. In quick battles, either 8-9 Hydras or 8-9 Hydras and 10 Cows survived. Moreover, the results changed if I completely exited the game and logged in again.

In auto-battles, many more creatures survived.
Consistently 21 Hydras, 50 Cows, 35 Basilisks.
Less often, 21 Hydras and 49 Cows (Which led me to think that the petrification of Basilisks doesn't work in quick battles, but it's not a certainty).

But if I attacked and immediately pressed Q, I mostly lost: confused: Which is very strange. (And it killed exactly 1006 Griffins).

What is the algorithm for battles using Q? Is this something new? Or is it an imitation of quick battles? Or what is it?

update: I probably won only 1 out of 70 Q battles!!! 20 Hydras survived!

I downloaded it from here, single-player.
Attachments 1
1 file attached • Total size: 224.9 KB
Сейчас балуюсь этим https://vcmi.eu/download/
За то что нейтралы не бегают за единичкой, для меня это уже стоит того
Auto-translated
By the way, there’s another thing in Quick Battles: if a battle lasts longer than 30 rounds, it’s interrupted, and instead, a battle is conducted using an AI algorithm. The armies used in this AI battle are the same as those that were at the beginning of the original battle (and the battle is essentially replayed from the start), but the mana spent and the combat units of the heroes that were killed are not restored.
User Avatar
Auto-translated
In general, a pattern has emerged:

in a battle initiated with Q, if you enable sound effects, attack creatures, and immediately press Q before the sound finishes playing, you will lose.

If you wait for the sound to finish playing, you will win! Moreover, Hydras survive with different numbers: 14, 10, 7, 2. (there may be others, varying)

If you disable sound effects and quickly press Q and start the battle, you will lose.

***

This save file continues to surprise me. The funny thing is that there's a Vistan in the tavern, and the situation is completely reversed with him. If you exchange troops and artifacts with him (I didn't take the lizards) and attack with Q without waiting for the sound effect to finish playing, you will win; if you wait, you will lose.
Сейчас балуюсь этим https://vcmi.eu/download/
За то что нейтралы не бегают за единичкой, для меня это уже стоит того
Auto-translated
Pressing the Q key ends the battle with a quick battle.

I conducted research on quick battles and auto-battles.
Different results when pressing Q at different times – this is solely due to the hero's random behavior (I verified this by making the random number generation function return the same number).
It has also been established that different obstacles are set up on the battlefield during a quick battle and during a subsequent replay – this is also due to the hero's random behavior.
That is, when generating the same number using the aforementioned function,
the results of the quick battle and the replay with pressing Q before and after the pre-battle music finishes are absolutely identical, and these results are not affected by restarts or anything else.
However, the auto-battle, despite the bug fix regarding flying creatures in the quick battle, still differs from the quick battle.
For example, in a save with Myrlan and 1,000 griffins,
in the quick battle, the first stack of griffins makes a move, while in the auto-battle, they wait.
But this does not mean that creatures do not wait in the quick battle. They do wait, but differently, i.e., different stacks wait at different times. In general, the battle is fought differently. Judging by the example with Myrlan and 1,000 griffins, it seems that Myrlan fights 'smarter' or the griffins are 'dumber' in the quick battle than in the auto-battle. But what exactly is the reason – who knows.
Maybe Sav will figure it out...
HoMM 3 HD:

последняя версия - 5.0 RC96 (19.09.2020)

последнее видео: https://www.youtube.com/watch?v=u70wC0DJ7I8

полное подробное описание
In reply to baratorch
User Avatar
Auto-translated
baratorch
Different results when pressing Q at different times are solely due to the hero’s randomness (I checked by making the random number generation function return the same number).

That is strange. I loaded it several times, not just once or twice. Maybe it was because I was playing through the Waffle executable, where troops move very quickly.
Or maybe it really was just a coincidence…

And if we go back to the topic and the original question, why did the computer lose so few troops on the griffons? Almost nothing died there – that's ridiculous.

Added 17 minutes later
baratorch
For example, in a save with Myrlan and 1k griffons:
in quick battle, the first stack of griffons makes its move, while in auto-battle, it waits.
But this doesn't mean that creatures don't wait in quick battle. They do wait, but differently, i.e., other stacks at different moments. In general, the battle proceeds differently. Judging by the example with Myrlan and 1k griffons, it seems that in quick battle, Myrlan fights 'more intelligently,' or the griffons are 'dumber' than in auto-battle. But what exactly is the reason - who knows.
Maybe Sav will figure it out...

Phew, I finally found it. Maybe this will be useful

/topic/at/399599/
/topic/at/402860/

It would be good to fix it :)
Сейчас балуюсь этим https://vcmi.eu/download/
За то что нейтралы не бегают за единичкой, для меня это уже стоит того
Auto-translated
That's strange. I've reloaded the game many times, not just once or twice. Maybe it's because I was playing through the executable file, where the troops move very quickly.
Or maybe it's just a coincidence...
It's just hero randomness – not as random as one would like.
When reloading and replaying the battle, it mostly produces the same sequences.
And if we return to the topic and the original question, why did the computer lose so few troops in the griffons? Almost nothing died there – that's absurd.
It was mentioned that in a battle between two AIs, there isn't really a battle.
The strength of the armies on both sides is calculated and compared;
the side with more strength wins. How the losses are calculated is beyond me; you should ask Sav about that.

Added 1 hour and 1 minute ago
Phew, I finally found it. Maybe this will be useful.

http://forum.heroesworld.ru/showpost...postcount=1776
http://forum.heroesworld.ru/showpost...postcount=1832
In the example of Mirlanda vs. 1k griffons, I noticed a discrepancy in the weights only for the Vivs and griffons... we'll see...
HoMM 3 HD:

последняя версия - 5.0 RC96 (19.09.2020)

последнее видео: https://www.youtube.com/watch?v=u70wC0DJ7I8

полное подробное описание
In reply to baratorch
User Avatar
Auto-translated
baratorch
it's just a heroic random – not as random as one would like. When reloading and replaying the battle, it mostly produces the same sequences.
Apparently, a simple algorithm is implemented, using a constant to initialize the randomizer. If you feed it a variable with a random value, you can make the random truly random. The simplest way is to use the system time.
In reply to Snooppy
Auto-translated
HD 3.46 stopped displaying "Movement Points" for Heroes in WOG 3.58f. Reverted to 3.45 – it displays correctly.
ProspectorRT и HeroesInfo:
Актуальная версия 2.2 (11.11.2016)
Auto-translated
Regarding the quick battle feature: I reviewed the checks for its activation, and the only significant thing I noticed that hadn't been noticed before is the flawed resurrection of phoenixes. The varying results are indeed related to the organization of randomness. Before a battle, the seed is set to a number that depends on the coordinates of the cell, so, in theory, the battle should be the same each time it's replayed. However, two random functions are used in the battle. The first one works only with the seed and is used almost everywhere. The second one is used only to determine the timing of the monsters' animations and works differently: in single-player mode, it works with the seed, but in online mode, it works with the current time (which is why, by the way, in single-player mode, you can theoretically time it to trigger morale, but you can't in online mode). In the quick battle, the second function is never called, so the battle will always proceed in the same way. In auto-battle, the second function is called, so the results of the battle will depend on its duration in real time, etc. If you press Q quickly (before any of the units have a chance to animate), the second function will not be called, so the result will also always be the same. But it will be different from the quick battle, because in the quick battle, the random number generation for selecting the music before the battle is not called, and the sequence of random numbers is shifted. If you don't press Q immediately, the second function will be called several times, and the result of the battle will depend on the number of animations that have occurred.
In reply to Sav
User Avatar
Auto-translated
So, there is a difference after all! While quickly pressing Q and starting a battle, or waiting and then starting it, makes a difference.
Sav

In quick battles, the second function is never called, so the battle will always proceed in the same way. In auto-battles, the second function is called, so the results of the battle will depend on its duration in real time, etc.

But what about this?
baratorch

In HD+, auto-battle, quick battle, and a battle between an AI hero and another AI hero are ABSOLUTELY IDENTICAL

Please provide a precise definition. What should we focus on? Is it planned to make them the same, or will they remain as they are?
I'm just curious about how it will be in the future.
Сейчас балуюсь этим https://vcmi.eu/download/
За то что нейтралы не бегают за единичкой, для меня это уже стоит того
Auto-translated
Autobattle and Quick Battle are identical, except for: 1. Quick Battle cannot last longer than 30 rounds. When the 30th round arrives, the battle ends, and the victory is determined by an AI-vs-AI algorithm. The armies used for this calculation are those that were present before the battle began, but mana spent during the battle and destroyed war machines are not restored. I don't know if this will remove the "baratorch" effect (and whether it should – it's better to let the hero achieve an impossible victory (or defeat) in a battle, rather than have the game freeze). Removing it is very easy; bringing it to a reasonable state is difficult. 2. There are a couple of bugs and minor differences in Quick Battle. One of them – the only one that is truly significant – is the bug with flying units, which has already been fixed. The others are: the resurrection of phoenixes not working (after resurrection, they are considered alive, but their quantity is 0) – it's not very difficult to fix; the setting in the hero's window that disables tactics when it's enabled not working (probably doesn't need to be fixed); the cursor shadow being disabled (it seems to have been fixed in HD); and a couple of other things that, as far as I understand, can never manifest in a real battle (i.e., in Quick Battle). I haven't noticed anything that would prevent obstacles from appearing in Quick Battle; it's possible that this was an isolated case related to point 3. 3. Random numbers in Autobattle and Quick Battle are generated differently. If you press Q, the battle up to the point of pressing Q will be identical to a normal battle, and the battle after Q will be a Quick Battle (including if you let 30 rounds pass and then press Q – the battle will be calculated using the AI-vs-AI algorithm; you need to be careful with this and only use Q to end short battles). Regarding how and where the generation of random numbers differs: 1. In Quick Battle – both online and offline – the same random numbers will be generated in the same battle, no matter how many times you replay it. 2. In Autobattle online, or in Autobattle online with the Q button pressed at any point, the same random numbers will be generated in the same battle (but these are different numbers than in Quick Battle). However, after pressing the Q button, the other differences of Quick Battle will start to take effect: the bug with the resurrection of phoenixes and the 30-round limit. The same random numbers will be in Autobattle offline if you press the Q button before any of the creatures start acting strangely. 3. In Autobattle offline, including with the Q button pressed after a certain number of strange actions, different random numbers will be generated each time you replay the battle.
In reply to Sav
User Avatar
Auto-translated
Sav
3. In offline auto-battles, including those with the Q button pressed after a certain number of iterations, different random numbers will be generated each time the battle is replayed.
In my opinion, this is obvious. You don't have to look far for examples. You can press A at different times, and the results of the battles will be different, as the outcome depends on the time, including the chance of luck/morale, the damage range, etc. But this was fixed thanks to the LM patch, which removed the dependence of random numbers on the animation of the units, and as a result, no matter how many times you replay, the battle will have the same damage range and morale in the same places. A similar process occurs in Heroes 2. The patch didn't take hold offline, but online it would be a real find in case of a disconnect in some complex final battle; it would be easy to repeat the moves. Leader1 should remember all these subtleties.
Auto-translated
In online mode, the animation doesn't affect the randomness. And battles with monsters will always have the same damage/morale values. In battles between players, the random numbers are indeed different, but this is not related to the animation; instead, the system time is intentionally used as a seed before each creature's action.
In reply to Sav
User Avatar
Auto-translated
Sav
In online mode, the animation doesn't affect the randomness. And battles with monsters will always have the same damage/morale values.
Really? Why is that? :confused:
Sav
In battles between players, the random numbers are indeed different, but this is not related to the animation, but to the fact that before each creature's action, the system time is intentionally taken as a seed.
Yes, but it only changes if no actions are taken. And because of this, problems arise when there is a disconnect in the final stage, and the battle needs to be repeated?

Statistics

Welcome our newest member: Emil