MindingTheData / Crash-Analysis

56 stars 94 forks source link

Calculation where crash point = 1 #1

Open matthewdowney opened 3 years ago

matthewdowney commented 3 years ago

Hey, thanks for this cool repository & accompanying video, very fun to follow along with!

I'm commenting on two things here: one is that Roobet seems to have changed their algorithm slightly, and the second is that I think there's a mistake in how you're calculating when to override the crash point with 1.

Change to the algo

In the video at 1:11 you can see that they're using a magic number, and then setting the crash point to 1 checking if it divides evenly into the hash:

const hs = parseInt(100 / 4); // <-- the magic number
if (divisible(hash, hs)) {
  return 1;
}

At the time of writing, that magic number is now parseInt(100 / 5), i.e. it has changed from 25 to 20. Which is interesting.

Calculation where crash point = 1

In your code, you're checking:

if (int(h, 16) % 33 == 0):
    return 1

I think that ought to have been if (int(h, 16) % 25) == 0):, and now it would be modulus 20 rather than 25 after their change to the algorithm. I.e. a 5% chance of going bust right at a multiplier of 1.

MindingTheData commented 3 years ago

Hey Matthew!

Thanks so much for watching the video and for checking out the code. At the time that I did that analysis I believe that the line was actually const hs = parseInt(100 / 3), which turned out to be 33, but I think when I recorded the clip for the video it had changed to 100 / 4.

It looks like they've now changed it to have an ever higher probability of crashing instantly so thank you for updating me! I'll post a comment to let people know this change.

Thanks for reaching out!

On Sat, Oct 31, 2020 at 3:13 PM Matthew Downey notifications@github.com wrote:

Hey, thanks for this cool repository & accompanying video, very fun to follow along with!

I'm commenting on two things here: one is that Roobet seems to have changed their algorithm slightly, and the second is that I think there's a mistake in how you're calculating when to override the crash point with 1. Change to the algo

In the video at 1:11 https://youtu.be/F1HA7e3acSI?t=71 you can see that they're using a magic number, and then setting the crash point to 1 checking if it divides evenly into the hash:

const hs = parseInt(100 / 4); // <-- the magic numberif (divisible(hash, hs)) { return 1;}

At the time of writing, that magic number is now parseInt(100 / 5), i.e. it has changed from 25 to 20. Which is interesting. Calculation where crash point = 1

In your code, you're checking:

if (int(h, 16) % 33 == 0): return 1

I think that ought to have been if (int(h, 16) % 25) == 0):, and now it would be modulus 20 rather than 25 after their change to the algorithm. I.e. a 5% chance of going bust right at a multiplier of 1.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MindingTheData/Crash-Analysis/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ5ISOO7AYMZJBPG5E53BPLSNSDXHANCNFSM4TGED25A .

matthewdowney commented 3 years ago

Ahh of course, makes sense that if they'd change it once, they'd change it again.