Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: What is wrong with RNG?
Thread: What is wrong with RNG? This thread is 2 pages long: 1 2 · NEXT»
phoenix4ever
phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted November 11, 2015 10:45 AM

What is wrong with RNG?

I had my suspicions about the RNG, but after some testing it became clear to me that something is wrong with RNG.

I made the tests in HotA and with HD mod, but I don't think any of those have anything to do with it, I'm just writing how I tested it.

I made 3 tests with Windmills and 3 tests with Refugee Camps and these are supposed to generate some random ressource and some random creatures each week, so this is how it went:
(I visited the same Windmill and the same Refugee Camp every week)

Test 1 - Windmills Test 1 - Refugee Camps
Week 1 - 6 Mercury        Week 1 - 4 Stormbirds (HotA creature)  
Week 2 - 5 Gem            Week 2 - 8 Rogues  
Week 3 - 5 Gem            Week 3 - 8 Rogues
Week 4 - 5 Crystal        Week 4 - 4 Satyr (HotA creature)
Week 5 - 5 Crystal        Week 5 - 4 Satyr (HotA creature)
Week 6 - 5 Crystal        Week 6 - 4 Satyr (HotA creature)
Week 7 - 5 Gem            Week 7 - 8 Rogues
Week 8 - 5 Gem            Week 8 - 8 Rogues

Test 2 - Windmills Test 2 - Refugee Camps
Week 1 - 5 Ore            Week 1 - 4 Vampires  
Week 2 - 5 Gem            Week 2 - 8 Rogues  
Week 3 - 5 Gem            Week 3 - 8 Rogues
Week 4 - 5 Gem            Week 4 - 8 Rogues
Week 5 - 5 Gem            Week 5 - 8 Rogues
Week 6 - 5 Gem            Week 6 - 8 Rogues
Week 7 - 5 Gem            Week 7 - 8 Rogues

Test 3 - Windmills Test 3 - Refugee Camps
Week 1 - 5 Sulfur         Week 1 - 8 Gogs  
Week 2 - 5 Gem            Week 2 - 8 Rogues  
Week 3 - 4 Crystal        Week 3 - 12 Gnoll Marauders
Week 4 - 4 Crystal        Week 4 - 12 Gnoll Marauders
Week 5 - 4 Crystal        Week 5 - 12 Gnoll Marauders
Week 6 - 4 Crystal        Week 6 - 12 Gnoll Marauders
Week 7 - 4 Crystal        Week 7 - 12 Gnoll Marauders

So what can we conclude from the tests above:
Well seems like the weeks really like to repeat themselves and that they are somehow connected to each other, take test 2 from week 2-7 all I got was 5 gems and 8 rogues, that cannot be random.

So what is wrong? Is the RNG "stuck" or what causes this?
It kinda ruins Windmills and Refugee Camps (and other things that should be random) for me, but I guess there is no way to fix this?
 

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
OhforfSake
OhforfSake


Promising
Legendary Hero
Initiate
posted November 11, 2015 02:59 PM

Typically RNG is just a humongous string of numbers that doesn't follow any particular function.. but I find one major issue is often that it is forgotten to not start at the same points for different events in the list of numbers, or it becomes very predictable.
____________
Living time backwards

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted November 11, 2015 03:06 PM
Edited by phoenix4ever at 15:08, 11 Nov 2015.

Well it is supposed to be random every week, can't really say that it is. Something is wrong somewhere.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
hippox89
hippox89


Famous Hero
posted November 11, 2015 04:49 PM
Edited by hippox89 at 16:50, 11 Nov 2015.

I tested Windmills and Mercenary Camps on a custom map and found nothing obvious wrong with the RNG on the latest build of HotA + HD mod (HD+, 4.0 RC20). Your own results is very strange and possibly due to a rare bug or simply as a result of the way you tested it. Your installation could also be messed up.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted November 11, 2015 04:58 PM

Hmm that's weird. These are the results I got today and I've noticed it before, so something is wrong somewhere, but maybe it's just my game?
You think it would help if I reinstalled HotA and/or HD mod?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
P4R4D0X0N
P4R4D0X0N


Famous Hero
posted November 11, 2015 06:25 PM

Dunno if RNG is used in HoMM3 anyways, maybe it's just a percentage. Anyways: I noticed same behaviour for moral in HotA. Meaning: Same unit gets the same moralbuff (after reloading) always at the same time in same battle.

Maybe anyone can confirm this in a test with castle units, I dunno if it's the same for you.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted November 11, 2015 06:40 PM

Yes I've noticed this as well, unless you do a different move, then it changes. But that I've gone used to.
But I don't remember Windmills and Refugee Camps making the same results week after week.  

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RerryR
RerryR


Promising
Supreme Hero
Researching Magic
posted November 11, 2015 06:54 PM

i sometimes have the same problem. windmill and refugee camps spawn the same every week.
i have neither HD Mod nor HotA.
I always suspected some mod which uses the same Vars as random generator.

A H3 restart often fixes the problem.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted November 11, 2015 07:09 PM

Okay, so you have the same problem it seems. I guess the problem is with Roe-SoD since you don't play HotA or HD mod.
But reloading the game helps?
Maybe I'll do a little more testing at some time...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Hippox89
Hippox89


Famous Hero
posted November 11, 2015 10:36 PM
Edited by Hippox89 at 22:48, 11 Nov 2015.

P4R4D0X0N said:
Anyways: I noticed same behaviour for moral in HotA. Meaning: Same unit gets the same moralbuff (after reloading) always at the same time in same battle.

Maybe anyone can confirm this in a test with castle units, I dunno if it's the same for you.


What you're describing is a HD mod feature. For example, imagine a player disconnecting during a battle against another player. Now they will have to replay the battle by memory after loading the save. That's why it's convenient to have the battle play out exactly the same way.

Also, if using replayable combat with quick combat enabled then the combat result should by sound logic be the same when choosing to play it manually. That is, of course, until a different move is made and another 'seed' is generated.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted November 11, 2015 11:36 PM

Is it HD mod that's causing it? I seem to remember it was always like that, guess I remember wrong.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
DagothGares
DagothGares


Responsible
Undefeatable Hero
No gods or kings
posted November 12, 2015 12:40 AM

OhforfSake said:
Typically RNG is just a humongous string of numbers that doesn't follow any particular function.. but I find one major issue is often that it is forgotten to not start at the same points for different events in the list of numbers, or it becomes very predictable.
Another way of doing it is starting from a time seed and then doing redistribution based on chance. There is no "true" random like rolling a die, the computer follows a system.

So if you checked it on the exact same day, every week, then maybe the seed that was used couldn't be deviated enough from.
Maybe it's a bug that causes the seed to reinitialise from the same value every time. It's a common programming mistake to initialise a random number and ask for the next value from that random number (from a huge number list, maybe or a probabilty distribution) every time you need a random number rather than reinitialising the random number every time. The second method tends to get as close to truly random as we can get with computers, the first method is usually plagued by repeat values.

The resources one is somewhat plausible to be random though (though 6 in a row is a bit of a freak occurence). You can roll a 5 three times in a row, a 2 two times in a row and then again 5 twice. Randomness tends to have a lot more repetition than humans give it credit. When we ask humans to cite a random list of numbers, they actually try to avoid saying the same number at all times, while in a truly random system that could totes legit happen.

The creatures example is a lot more problematic, because I assume there's a pool of 100+ creatures.
Could also be map specific, maybe it's tied to the months or some other variable not accounted for (like how many towns you have, highest hero level or how developped the enemy is etc.)
____________
If you have any more questions, go to Dagoth Cares.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
P4R4D0X0N
P4R4D0X0N


Famous Hero
posted November 12, 2015 12:59 AM

phoenix4ever said:
Yes I've noticed this as well, unless you do a different move, then it changes. But that I've gone used to.
But I don't remember Windmills and Refugee Camps making the same results week after week.  


Nah even if the move is different (different hex-grid)... only option to prevent your own units from getting moral is not to move them, wait or defend but thats kinda useless imho.

Hippox89 said:

What you're describing is a HD mod feature. For example, imagine a player disconnecting during a battle against another player. Now they will have to replay the battle by memory after loading the save. That's why it's convenient to have the battle play out exactly the same way.

Also, if using replayable combat with quick combat enabled then the combat result should by sound logic be the same when choosing to play it manually. That is, of course, until a different move is made and another 'seed' is generated.


Why would anyone replay a battle? But good to know it's HD Mod.

For the rest... now that u mentaion it... had the same problem in WoG, with some other nasty problems like always the same heros in tavern (don't switch at all in the end of the week). For HotA with HD-Mod I tested it but now I have a similar problem with tavern heroes after reloading a save from day7 of a week. The hero constellations are always the same. Atm only Melody-Clancy, Uland-Drakon, Clancy-Bron, that are all possible combinations atm. no other heroes are available.

Also a common bug in all games is the full inventory bug, meaning when you got a full backpack on a hero and retrade it with other heros sometimes items simply vanish from the backpack, it make take some time but it will happen after a while.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
OhforfSake
OhforfSake


Promising
Legendary Hero
Initiate
posted November 12, 2015 09:34 AM

P4R4D0X0N said:
Dunno if RNG is used in HoMM3 anyways, maybe it's just a percentage. Anyways: I noticed same behaviour for moral in HotA. Meaning: Same unit gets the same moralbuff (after reloading) always at the same time in same battle.

Maybe anyone can confirm this in a test with castle units, I dunno if it's the same for you.


Pretty std. knowledge by now actually, but only ~5 years ago I believe it wasn't.

IIRC, the RNG doesn't reset by loading a save.. I believe quitting the game (or was it rs the comp?) will do it. Alternatively it might also be enough to simply shuffle your army.

Also notice stuff like the battle ground.

amazing belgian said:
There is no "true" random like rolling a die, the computer follows a system.


I guess since many games anyway seems to require an internet connection that the computer could look up some website that gives truly random numbers from quantum system measurements.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
DagothGares
DagothGares


Responsible
Undefeatable Hero
No gods or kings
posted November 12, 2015 12:47 PM

Well, it's taking it from somewhere! Usually the clock or at least my low level programs use the clock to generate a random seed. Point was that messy programming or a bug could be the result because the formula keeps taking from the same seed or whatever. You smart trousers you
____________
If you have any more questions, go to Dagoth Cares.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Warmonger
Warmonger


Promising
Legendary Hero
fallen artist
posted November 12, 2015 01:39 PM

The issue that I see is not a random seed (stored in davegame by game design). The issue is the range of output variables (only few) and their conjunction. There is not much point in RMG if it gives you same resources and creatures every time
____________
The future of Heroes 3 is here!

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
P4R4D0X0N
P4R4D0X0N


Famous Hero
posted November 12, 2015 08:21 PM

OhforfSake said:


Pretty std. knowledge by now actually, but only ~5 years ago I believe it wasn't.

IIRC, the RNG doesn't reset by loading a save.. I believe quitting the game (or was it rs the comp?) will do it. Alternatively it might also be enough to simply shuffle your army.

Also notice stuff like the battle ground.


Nah it doesn't change anything even when I play vs Sprites for example splitted in 2 stacks. A Shooter of my army got first strike, kills first stack of Sprites, Sprite's turn is next... it got the moralbuff anyways, doesn't count what sprite I just killed. Maybe it's moral by turn calculated and splitted in turns for each side. Just found it wierd it's not guaranteed for one stack explicit but for the entire army.

Warmonger said:
The issue that I see is not a random seed (stored in davegame by game design). The issue is the range of output variables (only few) and their conjunction. There is not much point in RMG if it gives you same resources and creatures every time


True...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Maurice
Maurice

Hero of Order
Part of the furniture
posted November 12, 2015 10:40 PM

P4R4D0X0N said:
it got the moralbuff anyways, doesn't count what sprite I just killed. Maybe it's moral by turn calculated and splitted in turns for each side. Just found it wierd it's not guaranteed for one stack explicit but for the entire army.


I guess it just uses the same seed to see what the Morale chance is. It's then compared against whichever stack has its turn and if it's above a certain threshold, it will trigger. In this way, it doesn't matter which stack you kill, since each Sprite stack will have the same Morale height and therefore, if the "random" calculation triggers against one, it will trigger against any of those stacks.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Blighthorn
Blighthorn

Tavern Dweller
posted October 17, 2019 01:38 PM

This behavior (not-so random weekly events) is a bug in HD mod.
Bug seems to appear, when on map the Graal is located.
Digging up the Graal fixes randomness.
To reproduce this bug - simply create map with at least one obelisk.
It breaks weekly events in SoD, and many people reports that it is also present when you run HotA too.
Examples of weekly events that are impacted:
- Refugee Camps tends to give the same creature every week
- Mystic Ponds tends to give same amount of resource every week
- Tavern's rumors tends to be the same every week
- Tavern's heroes tends to be the same every week name of week tends to be the same every week
- Mystical Gardens tends to give the same type of reward every week
etc.

It was noted that lack of randomization is most likely to occur when enemy do not take too many actions. This can be mostly observed in singleplayer pre-made maps where enemy heroes are set to wait for player.

Some severity qualification examples:
Refugee camps can roll high level creature and this creature would be available to recruit in the camp every week allowing to accumulate weekly, breaking balance on map.
Map creator intentions to tell player something by tavern's rumors are not met.

As first (and only?) report here of this bug is form 2015 it seems that this bug may be in HD mod almost from beginning. Hard to say - I don't have old versions.
And yes - it seems this bug is related to HD mod feature to ensure same random events occuring after reload after crash - multiplayer purpose. Unfortunately, option cannot be turned off in single player mode.

This bug was already (about month ago) reported to HD mod creator - Baratorch - and he confirmed that this is a bug and will be fixed.
However I have no information about when this will happen.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted October 17, 2019 03:50 PM

It's a pretty old thread, unfortunately I still have the same problem with HD mod and HotA.
And yes it mostly seems to apply to singleplayer.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 2 pages long: 1 2 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0579 seconds