Announcement

Collapse

Forum Rules

  • No flaming or derogatory remarks, directly or through insinuation.
  • No discussion, sharing or referencing illegal software such as hacks, keygen, cracks and pirated software.
  • No offensive contents, including but not limited to, racism, gore or pornography.
  • No excessive spam/meme, i.e. copious one liners in a short period of time, typing with all caps or posting meme responses (text/image).
  • No trolling, including but not limited to, flame incitation, user provocation or false information distribution.
  • No link spamming or signature advertisements for content not specific to Dota 2.
  • No Dota 2 key requests, sell, trade etc.
  • You may not create multiple accounts for any purpose, including ban evasion, unless expressly permitted by a moderator.

  • Please search before posting. One thread per issue. Do not create another thread if there is an existing one already.
  • Before posting anything, make sure you check out all sticky threads (e.g., this). Do not create new threads about closed ones.
  • It is extremely important that you post in correct forum section.

  • Balance discussion only in Misc.
  • All art related (such as hero model) feedbacks go to Art Feedback Forum.
  • All matchmaking feedback should go here: Matchmaking Feedback
  • All report/low priority issues should go here: Commend/Report/Ban Feedback
  • No specific workshop item feedback. These should go to workshop page of that item.
  • When posting in non-bugs section (such as this), use [Bugs], [Discussion] or [Suggestion] prefix in your thread name.



In case you object some action by a moderator, please contact him directly through PM and explain your concerns politely. If you are still unable to resolve the issue, contact an administrator. Do not drag these issues in public.



All rules are meant to augment common sense, please use them when not conflicted with aforementioned policies.
See more
See less

WC3 PRNG wasn't optimal. Here is a suggested solution. [math etc]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Thanks for the support.
    As far as "every x hit" changes, that has little to do with PRNG and doesn't belong here. This topic is about the PRNG formula/method being used in Dota2. Not whether you like RNG or not. But as I've shown, it can still be "random" but have some expected and reasonable.

    Originally posted by ranaki View Post
    meh, let's try prng first, i mean it's improved a lot since wc3
    This method that I posted is PRNG. It's just that there are so many different ways you can do PRNG.
    I really, really disliked Blizzard's method and think the one I posted originally is far far better, as it basically makes it work how a child would expect it to, it seems very fair and even.
    We don't know how Valve is doing it in Dota2 until a dev tells us. If it's the same or similar to Blizzard's, I'd really like a PRNG similar to what I posted as an "intended fix".

    Originally posted by Wiener View Post
    I'm fairly sure Valve designed their own PRNG.
    It probably is different than WC3's, but I don't think "____ through obfuscation" is a good thing. I'd like to know their actual method/formula. If a dev could post it, that'd be great.
    Blizzard had released tables similar to what I did here to give an idea on how things proc with their PRNG.

    I did test it out, and the PRNG seems to work okay. It's definitely not the same method I laid out, though, as I've gone more than 4 hits without proccing with a 25% bash.
    Last edited by innociv; 11-29-2012, 02:46 PM.

    Comment


    • #17
      I approve of this.

      The basic formula can have conditions added to prevent any unwanted corner cases (if any), and some initial sample generated to prevent the 'starting trash percentages' Soiree pointed out. But this alternative PRNG concept is sound and falls closely in line for how I think random events should work in-game. I do not agree with using RNG or wc3-style PRNG.
      Always read and follow the forum rules. If you need help from a moderator, use the report button ()
      Before posting new bugs:
      -Check the Known Bugs List and search the forum for an existing report.
      -Make sure its a bug (test in WC3 Dota, visit playdota guides and adv. mech, etc). If you're still not sure, post in Mechanics and Gameplay Bug Brainstorming instead.
      -Read the Bug Posting Guidelines on how to report a bug properly.

      Comment


      • #18
        Originally posted by Soiree View Post
        I actually like this a lot. It seems a great alternative to RNG and WC3 PRNG, and actually is laid out pretty well.

        However, the issue with "chance for double/triple proc greatly increasing with sample size" should be resolved. Basically as it stands, if you buy a Daedalus, you would have to use it for some time/certain number of hits before it becomes a really good item, because after your first crit it'll throw trash percentages out due to the sample size being small. When you level a skill or buy an item it should be immediately useful - maybe have it generate up to a certain sample size before it starts throwing out percentages.
        I'm definitely open to suggestions and can try to improve it.

        However, I figure you are very rarely going to attack someone 20 times, let alone 50. This would reset when you attack something else, I forgot if I mentioned.
        The method actually keeps the actual number of procs near the average no matter the number of attacks, as getting lucky lowers the chance. It just gets less consistent distancing near the end. You can change "for( hits; hits < 50; hits++ ){" on both parts to do a different sample size. Even with a 500 sample size, there are far less sprees of procs, and far less gaps of never proccing, it's just not quite the same as a sane sample size has. But I mean, that seems like a good thing to me, since you only attack someone so many times before they die or you change targets.
        There is also that I wanted to make this as light as possible, as it's calculated every hit. That's why I ended up not fixing negative% sort of numbers, as it works the same as 0% even if it reads funny, and correcting it to 0% is just a waste.

        One idea would be the drastically decrease the % chance when you proc twice in a row, or go half the average without proccing, with a short "memory", that usually keeps the chance at the stated chance except when edge cases occur. I may work on an implementation of that.
        Last edited by innociv; 11-29-2012, 03:31 PM.

        Comment


        • #19
          Hi. I just tested your code and It is not consistent enough. I'm not debunking your suggestion, I'm just saying that Valve has created a SOLID PRNG than yours

          I just finished analyzing valve's current PRNG and they had made a rock solid one.
          I compared your suggested code is not consistent and has a higher max miss and bash

          Here's your algorithm result on my analysis
          Total: 30000
          Hits: 7573
          Percentage: 25.2433%
          Max streak miss: 32
          Max streak stun: 8


          Miss distribution:



          Frequency test:



          ---------------------------------------------------------------------------------------------------
          This is VALVe's result on their new PRNG

          Total: 32050
          Hits: 8013
          Percentage: 25.0015601%
          Max streak miss: 13
          Max streak stun: 4


          Miss Distribution



          Frequency test

          I hate people that put their Rig specs in the signature. This is not overclock.net!
          CPU: AMD Trainwrecker AM5+ 12150 hexacontatetra-core 1.65 Thz | RAM: Corsair Revenge 4TB DDR6 (0.24-0.24-0.36) | GPU: Sapphire 9990 128GB GDDR9 Hexa-Fired (0.65/0.95/1.1Thz) | Resolution: @ 20480x12800
          Connection: - Telus: (70MB/10MB)
          All Specs shown in the signature are fictitious, any resemblance to real hardware, current or obsolete, is purely coincidental

          Comment


          • #20
            Originally posted by innociv View Post
            That's basically what my method does, with still having a chance to proc sooner. If you look at the link, you'll see the frequency of proccing vs not proccing is much more even than on the completely random side.
            This is how it looked for me on the complete random site

            9 procs hit out of 50 attempts. Average is 12.5

            hit #1 25 % chance, Procced!
            hit #2 25 % chance, Procced!
            hit #3 25 % chance, Procced!
            hit #4 25 % chance, Procced!
            hit #5 25 % chance, Procced!
            hit #6 25 % chance, no proc.
            hit #7 25 % chance, no proc.
            hit #8 25 % chance, no proc.
            hit #9 25 % chance, no proc.
            hit #10 25 % chance, no proc.
            hit #11 25 % chance, no proc.
            hit #12 25 % chance, no proc.
            hit #13 25 % chance, no proc.
            hit #14 25 % chance, no proc.
            hit #15 25 % chance, no proc.
            hit #16 25 % chance, no proc.
            hit #17 25 % chance, no proc.
            hit #18 25 % chance, no proc.
            hit #19 25 % chance, no proc.
            hit #20 25 % chance, no proc.
            hit #21 25 % chance, no proc.
            hit #22 25 % chance, no proc.
            hit #23 25 % chance, no proc.
            hit #24 25 % chance, Procced!
            hit #25 25 % chance, no proc.
            hit #26 25 % chance, no proc.
            hit #27 25 % chance, no proc.
            hit #28 25 % chance, no proc.
            hit #29 25 % chance, no proc.
            hit #30 25 % chance, no proc.
            hit #31 25 % chance, no proc.
            hit #32 25 % chance, no proc.
            hit #33 25 % chance, no proc.
            hit #34 25 % chance, Procced!

            It shows clearly why we need PRD

            Comment


            • #21
              MDuh, I might have forgotten to state in my original post that it'd reset when you attack a new target. It's more consistent with a smaller sample size(IE, the maximum number of times you'd actually attack one target).
              I did put it in the codes comment, and a reply here, though.

              I was thinking of another method though, that would stay more consistent over any sample size(but, what I have in my head so far I actually don't think it's as good as what I originally posted as long as you reset every attack). Just been too busy gaming to do it.

              A 13 miss streak on 25% chance isn't that great.

              Comment


              • #22
                Who cares about optimal, the game needs the same PRNG as War3 because it's a port of War3 Dota, derp derp. Close thread plz.

                Comment


                • #23
                  ^ This.

                  Comment


                  • #24
                    Originally posted by Enai Siaion View Post
                    Who cares about optimal, the game needs the same PRNG as War3 because it's a port of War3 Dota, derp derp. Close thread plz.
                    0/10

                    Comment


                    • #25
                      Hold on hold on. Does anybody actually have proof that the current test prng is the same as wc3 prng? Or have any idea how it works at all?

                      Edit: Never mind, doesn't matter - Mduh's post should end this thread.

                      Comment


                      • #26
                        Originally posted by Catma View Post
                        Edit: Never mind, doesn't matter - Mduh's post should end this thread.
                        Ya, he is a good poster. I wonder why he isn't banned yet :O

                        Originally posted by innociv View Post
                        A 13 miss streak on 25% chance isn't that great.
                        I get that frequently on 40% chance

                        Comment


                        • #27
                          Originally posted by innociv View Post
                          A 13 miss streak on 25% chance isn't that great.
                          On a 32K sample it is pretty neat that it went only to a 13 miss streak.

                          Comment


                          • #28
                            I'll upload the excel for you guys. My image host is down for some reason.

                            btw: 13 streak miss only happened ONCE in 32k samples, same as 12 miss streak, only happened once

                            check the graph data in 2nd,3rd worksheet. If you have doubts in the calculation. Force a global recalculation in excel by pressing CTRL+ALT+F9

                            VALVE STAT: http://www.mediafire.com/?k75rmku2blg6ml5

                            OP algorithm: http://www.mediafire.com/?o3d3h0rz8kf85os
                            Last edited by MDuh; 12-02-2012, 12:59 PM.
                            I hate people that put their Rig specs in the signature. This is not overclock.net!
                            CPU: AMD Trainwrecker AM5+ 12150 hexacontatetra-core 1.65 Thz | RAM: Corsair Revenge 4TB DDR6 (0.24-0.24-0.36) | GPU: Sapphire 9990 128GB GDDR9 Hexa-Fired (0.65/0.95/1.1Thz) | Resolution: @ 20480x12800
                            Connection: - Telus: (70MB/10MB)
                            All Specs shown in the signature are fictitious, any resemblance to real hardware, current or obsolete, is purely coincidental

                            Comment

                            Working...
                            X