A Monte Carlo simulation of getting all possible outcomes of loot boxes opening

Overview

lootboxes_monte_carlo

A monte-carlo simulation of the number of "lootboxes" to open to get at least one of each possible outcome

I wondered how many lootboxes I needed to open in order to get all possible outcomes at least one (assuming it is possible to get the same one multiple times and all the outcomes have the same probability.

The actual problem I was solving is the following:

  • A French brand sells food, and in each box there is a magnet representing one small part of the map of the country
  • There are 95 different magnets
  • How many boxes should I expect to buy in order to get the complete map of the country ?

As I was starting to learn rust, I took this as an exercise and wrote this program that generates a video of the resulting curve of the simulations as function of the number of simulations

You might also like...
AMCOS - A high-peformance parallel monte-carlo simulation for estimating the fair value of options in finance

antoons-monte-carlo-options-sim A high-peformance parallel monte-carlo simulation for estimating the fair value of options in finance. Written in Rust

A few demos showing how to estimate projects using Monte Carlo simulations.

Agile Monte Carlo Simulations Demos This is the repository which accompanies the blog post "How to replace estimations and guesses with a Monte Carlo

Implementation of Monte Carlo PI approximation algorithm in Rust Python bindings

rusty_pi Implementation of Monte Carlo PI approximation algorithm in Rust Python bindings. Time of 100M iterations approximation on Core i7 10th gen:

Sealed boxes implementation for Rust/WebAssembly.

Sealed boxes for Rust/WebAssembly This Rust crate provides libsodium sealed boxes for WebAssembly. Usage: // Recipient: create a new key pair let reci

Converts a MO loadorder to loot rules for manual loadorders

lootifier Converts a Mod Organizer loadorders to loot rules for manual loadorders Long Description This tool is meant for people who want to share mod

Rust low-level minimalist APNG writer and PNG reader with just a few dependencies with all possible formats coverage (including HDR).

project Wiki https://github.com/js29a/micro_png/wiki at glance use micro_png::*; fn main() { // load an image let image = read_png("tmp/test.

A small utility for tracking the change in opening and closing of issues in a GitHub repo

A small utility for tracking the change in opening and closing of issues in a GitHub repo. This tool can be used to build visualizations for issue triage over time with the hope of motivating closing more issues than are opened.

Lightning Optimizing Opening Server

Lightning Optimizing Opening Server (loptoš ~ naughty boy/brat/hooligan/..., not to be confused with lopta == ball) WARNING: ULTRA-EXPERIMENTAL SOFTWA

Opening explorer for lichess.org

lila-openingexplorer3 Personal opening explorer under development. Usage EXPLORER_LOG=lila_openingexplorer3=debug cargo run --release -- --lila https:

Opening randomizer for Chess
Opening randomizer for Chess

chess-randomizer chess-randomizer is a simple opening randomizer written in Rust using WASM and the Lichess API. To build the project, you need Rust a

Proof-of-concept of getting OpenXR rendering support for Bevy game engine using gfx-rs abstractions
Proof-of-concept of getting OpenXR rendering support for Bevy game engine using gfx-rs abstractions

Introduction Proof-of-concept of getting OpenXR rendering support for Bevy game engine using gfx-rs abstractions. (hand interaction with boxes missing

📜 A pci.ids-compliant library for getting information about available PCI devices.

aparato A pci.ids-compliant library for getting information about available PCI devices. Usage Add the following to your project's Cargo.toml file: ap

Coult, is crate to getting from hashicorp vault

Coult Rust vault secret retriever Example use coult::{Config, Vault}; use serde::Deserialize; #[derive(Debug, Deserialize)] struct Secret { passwo

An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous and blocking clients respectively.

eithers_rust An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous a

A CLI tool for getting screenshots of URLs using headless chrome

rustywitness 🦀 🌐 📸 Web screenshot utility A CLI tool for getting screenshots of URLs using headless chrome Built with ❤︎ by swanandx and contributo

Getting the token's holder info and pushing to a web server.

Purpose of this program I've made this web scraper so you can use it to get the holder's amount from BSCscan and it will upload for you in JSON format

MollySocket allows getting signal notifications via UnifiedPush.

MollySocket This software is still in alpha. MollySocket allows getting signal notifications via UnifiedPush. It works like a linked device, which doe

Reading Getting Friendly With CPU Caches
Reading Getting Friendly With CPU Caches

Getting Friendly With CPU Caches Reading Getting Friendly With CPU Caches, by Miki Tebeka and William Kennedy, inspired me to look at some Rust equiva

Cross-platform GameMaker extension for getting system information and resource usage
Cross-platform GameMaker extension for getting system information and resource usage

GM Sysinfo Cross-platform GameMaker extension for getting system information and resource usage Table of Contents Table of Contents Examples Display m

Owner
Adssx
Adssx
An abstraction build on top of discord-rich-presence that makes possible to use it in a more declarative way

Declarative Discord Rich Presence This library is an abstraction build on top of discord-rich-presence crate that allows you to use it in a more decla

null 2 Sep 7, 2022
🛠️ | System tool for all my lovers

<<<<<<< HEAD ?? love-fetch Original code ferris-fetch ?? ??️ System tool for all my lovers ?? How to install it ?? cargo install love-fetch License ??

Fabio Grimaldi 11 Jun 13, 2021
Autorebase automatically rebases all of your feature branches onto master.

Autorebase automatically rebases all of your feature branches onto master. If conflicts are found it will rebase to the last commit that doesn't cause conflicts. By default, branches with an upstream are excluded. You don't need to switch to any branch, the only limitation is that a branch that is checked out and not clean will not be rebased (though I may add that in future).

Tim 66 Nov 26, 2022
One-Stop Solution for all boilerplate needs!

One Stop Solution for all boilerplate needs! Consider leaving a ⭐ if you found the project helpful. Templa-rs Templa-rs is a one-of-a-kind TUI tool wr

IEEE VIT Student Chapter 27 Aug 28, 2022
🦴🤖 // A Discord bot about collecting all the Borpa

?? ?? Borpa Bot Borpa Bot is a Discord bot about collecting all the Borpa possible. If you dont know what a Borpa is you can find it here Crate Descri

mellowmarshe 1 Dec 19, 2021
`fugit` provides a comprehensive library of `Duration` and `Instant` for the handling of time in embedded systems, doing all it can at compile time.

fugit fugit provides a comprehensive library of Duration and Instant for the handling of time in embedded systems, doing all it can at compile time. T

Emil Fresk 40 Oct 2, 2022
A project for managing all Pop!_OS sources

Pop!_OS Pop!_OS is designed for people who use their computer to create; whether it’s complicated, professional grade software and products, sophistic

Pop!_OS 2k Jan 6, 2023
A repo to store all my 6-Month Rust learning steps

RustLearn A repo to store all my 6-Month Rust learning steps. (free time only!) at the end of the 6-month course, the repo will be a rust package for

Muasya 2 May 16, 2022
Fetch all your fetches, but in rust

fetchfetch, but in rust Fetch all of your fetches. written in go rust. Installation You can either download the latest release or build from source (r

null 4 May 7, 2023
Scan all IP nodes of CloudFlare to find the fastest IP node.

中文版 | English ?? Introduction Scan all IP nodes of CloudFlare to find the fastest IP node. ⚡️ Get Started ??️ Build git clone https://github.com/golan

golangboy 47 Mar 19, 2024