Reply to Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 30

Thread: random loot

  1. #11
    Ruler of the Land
    Join Date
    Apr 2013
    Posts
    1,210
    World
    Newfoundland
    Quote Originally Posted by Dorotheus View Post
    And your missing the point, it's not just you flipping coins.
    And you assume every roll is unique for each and every result..
    Just take a look at how geo's are working nowadays.. There you may get results within seconds from removing to finding at same spot - conclussion, result from that search did not come from an unique roll.
    Last edited by SmurfAsH; 09.08.16 at 21:19.
    25/11-14 , 23/02-16 .. The end is coming and it will look like this .

  2. #12
    Ruler of the Land
    Join Date
    Apr 2013
    Posts
    1,210
    World
    Newfoundland
    Quote Originally Posted by vigabrand View Post
    lol I don't even know what to say to xibors post, except maybe I don't understand it. so let's put the maths aside...

    would it be a good idea to increment the drop rate if you don't have any luck with buildings etc?
    My suggestion about this.
    Spoiler
    So, adventure loot still need to be adjusted, but BB devs are way lost to make it happen. Though it wouldn't be that hard to "get the framework right"..

    Start with..
    • Introduce a new non-tradeable adventure currency, eg Skulls, usable to increase drop chance of special loot.
    • Let every adventure have a "special loot slot" containing either something "special" (a buff, building or follow-up adventure) or some (amount depending on adventure difficulty) Skulls.
    That way a rubbish drop chance" doesn't have to be that rubbish every time (but I don't think it should be possible to gain a 100% special drop chance this way - more likely 30%-ish at most).

    Let's say every drop chance boost would have a Skull cost equally to adventure difficulty and, to get maximum boost, needed to be spent that many times equally to adventure difficulty.
    That would ATM (still need some tweakings) make..
    VLT having a Skull drop of 8, a drop chance boost cost at 8 Skulls per tier and a total cost at 64 Skulls (8 Skulls x 8 tiers);
    ..while..
    WotS would get a Skull drop of 3, a drop chance boost cost at 3 Skulls per tier and a total cost at 9 Skulls (3 Skulls x 3 tiers).
    25/11-14 , 23/02-16 .. The end is coming and it will look like this .

  3. #13
    Ruler of the Land
    Join Date
    Jun 2012
    Location
    Milky Way
    Posts
    2,158
    World
    Sandycove
    Quote Originally Posted by SmurfAsH View Post
    And you assume every roll is unique for each and every result..
    Just take a look at how geo's are working nowadays.. There you may get results within seconds from removing to finding at same spot - conclussion, result from that search did not come from an unique roll.
    Pity the evidence shows otherwise, If they worked the way you say they do then you would find your guildmates and yourself would be getting exactly the same loot drops for every adventure you shared lootspots with. The simple fact is even way back 35 years ago computers were generating 50-60 random numbers a second, todays systems with multi cores running 1000's of times faster have no problem generating a new roll every time a players gameplay calls for one.
    When it comes to Gene pools and shallow ends they can be found at the bar drinking pina colada's

  4. #14
    Ruler of the Land
    Join Date
    Apr 2013
    Posts
    1,210
    World
    Newfoundland
    Quote Originally Posted by Dorotheus View Post
    Pity the evidence shows otherwise, If they worked the way you say they do then you would find your guildmates and yourself would be getting exactly the same loot drops for every adventure you shared lootspots with.
    Pity your knowledge flaws again. Final outcome depends on the formula and random generated numbers are seldom the only variables there. If you'd paid some (more) attention to how geo's are working nowadays (compared to just a year ago) you'd see how predictable some outcome could be (depending on timeframe et c).

    The simple fact is even way back 35 years ago computers were generating 50-60 random numbers a second, todays systems with multi cores running 1000's of times faster have no problem generating a new roll every time a players gameplay calls for one.
    Still, it's much faster to use pregenerated numbers instead of calling for a new one for each and every.
    Last edited by SmurfAsH; 10.08.16 at 01:17.
    25/11-14 , 23/02-16 .. The end is coming and it will look like this .

  5. #15
    Ruler of the Land Xibor's Avatar
    Join Date
    Sep 2014
    Location
    New Zealand
    Posts
    1,714
    World
    Sandycove

    ...

    Sorry, but I've slept since then...

  6. #16
    Wordsmith Durin_d's Avatar
    Join Date
    Mar 2012
    Location
    FIN
    Posts
    597
    World
    Northisle
    Geologist finding a deposit has nothing to do with chance. They will find a deposit if they can. The geologists skills are another thing.

    With a little help of network monitoring with Chrome developer tools we can find out that the game servers use Java as a programming language (at least in the web interface) and with my limited knowledge of Java I could presume that the server code uses the standard (and easiest) java.util.Random class to provide all the random number that are needed for the game. Of course this class doesn't provide "pure" random numbers but it is used to generate a stream of pseudorandom numbers using a 48-bit seed.
    My knowledge of pseudo random number generator is very limited so I can't say if that generator is good or not and also it depends how it's used and that we can't tell without seeing the source code of the servers.

    When you are talking about the chance of getting a certain amount of successful loot from a specific amount of trials (10 heads from 15 toss) you are talking about Binomial distribution. It calculates the probability of drawing a certain number of successes (or a maximum number of successes) in a certain number of tries, given a population of a certain size containing a certain number of successes, with replacement of draws (Google sheets function is BINOMDIST(num_successes; num_trials; prob_success; cumulative))
    Last edited by Durin_d; 10.08.16 at 08:55.

  7. #17
    Wordsmith Durin_d's Avatar
    Join Date
    Mar 2012
    Location
    FIN
    Posts
    597
    World
    Northisle
    I did some testing. This is not to show how loots are generated but to show how the java.util.Random works. The two codes use java.util.Random to provide a double value between 0.0 and 1.0. The random number generator is created for each number separately to more accurately simulate the usage in distributed environment.

    The first code uses the default constructor Random() that sets the seed of the random number generator to a value very likely to be distinct from any other invocation of this constructor. the other code uses the system time millis (the current system time in milliseconds) as a seed.

    Testing with these the first code (with Random()) I get less than 0.03 from the prng in 1-200 tries but with the other code that uses the system time millis the code it takes 1-500000 (and more) tries. The problem with the second one is that the code is run so fast that the prng is given the same seed making it to repeat the same numbers it generates.

    This shows that with bad design the random number generator(s) can be made to generate non-random numbers.

    This is how to run the code (you need Java SDK) to find how many tries it take to get random number between 0.0 (inclusive) and 1.0 (exclusive) that is less than 0.03 (so to get 3 or less from 100)
    Code:
    javac Random_test.java
    java Random_test 0.03
    Code:
    import java.util.Random;
    
    
    public class Random_test {
    
        public static void main(String[] args){
        
        int loop=0;
        
        double search = Double.parseDouble(args[0]);
     
        boolean not_found = true;
        while (not_found){
            
            Random prng = new Random();
            
            double num = prng.nextDouble();
            System.out.println(num);
            loop++;
            if (num<search)
                not_found = false;
            }
     
        System.out.println(loop+" iterations");
        }
    }
    Code:
    import java.util.Random;
    
    
    public class Random_test {
    
        public static void main(String[] args){
        
        int loop=0;
        
        double search = Double.parseDouble(args[0]);
     
        boolean not_found = true;
        while (not_found){
            
            long millis = java.lang.System.currentTimeMillis();
            System.out.println(millis);
            Random prng = new Random(millis);
            
            double num = prng.nextDouble();
            System.out.println(num);
            loop++;
            if (num<search)
                not_found = false;
            }
     
        System.out.println(loop+" iterations");
        }
    }

  8. #18
    Ruler of the Land Xibor's Avatar
    Join Date
    Sep 2014
    Location
    New Zealand
    Posts
    1,714
    World
    Sandycove
    I won't quote the entire post Durin_d but nice work - you write nice looking code. On the second one yes - that would happen on a fast processor, but I'm surprised the milliseconds don't change for 50,000+ loops. That's a really fast processor.

    At any rate, I never reset the seed before each request. I usually coded so that it was done periodically - in this game I would suggest when the player logs in, or perhaps at 00:00 +- a random variable perhaps in case they are the type that stay logged in all the time. Regardless, you are correct that there is no way to know what code base they are using and while it's java / java script for the browser interface the actually code running on the server could be just about anything. I suspect C# or C++, but that's just a guess.

    Cheers for the research - I find probability theory and game mechanics interesting if anyone hadn't noticed
    Sorry, but I've slept since then...

  9. #19
    Wordsmith Durin_d's Avatar
    Join Date
    Mar 2012
    Location
    FIN
    Posts
    597
    World
    Northisle
    Quote Originally Posted by Xibor View Post
    in this game I would suggest when the player logs in
    If the login time is used to seed the prng it could lead to a situation where the player logs in at the same time every day and the same seed is used every time and the same numbers would be generated. Ofc this would depend on how accurate time is used for the seed.

    My guess is that the prng is created separately every time it's needed i.e. when the loot is generated, or specialist skills are used.

    I was surprised that the basic Random() constructor worked as well as it did. The OpenJDK that I used has implemented a good way to generate the seed value.
    Last edited by Durin_d; 11.08.16 at 10:11.

  10. #20
    Ruler of the Land Xibor's Avatar
    Join Date
    Sep 2014
    Location
    New Zealand
    Posts
    1,714
    World
    Sandycove
    Quote Originally Posted by Durin_d View Post
    If the login time is used to seed the prng it could lead to a situation where the player logs in at the same time every day and the same seed is used every time and the same numbers would be generated. Ofc this would depend on how accurate time is used for the seed.
    Agreed but I would assume at least milliseconds would be used (kind of standard) and the odds (pun intended) of hitting that same number each day are astronomical. If they use something like minutes then that could indeed produce a pattern for you. But then to see the same results you would have to do the exact same things (that would use random events) each day in the exact same order which I also think is very unlikely.
    Sorry, but I've slept since then...

Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Ubisoft uses cookies to ensure that you get the best experience on our websites. By continuing to use this site you agree to accept these cookies. More info on our privacy.