Skip to content

Probabilistic Modeling of Black Desert Online's Enhancement System. A proof of concept predicting outcomes to derive optimal profitability strategies.

License

Notifications You must be signed in to change notification settings

casinca/bdo-enhancing-model

Repository files navigation

Probabilistic Modeling of Black Desert Online's Enhancement System

Enhancing for profit in BDO is regarded as the n°1 source of income. However, without careful preparation, it is worth as much as gambling and potentially leading to significant losses.

This repo was a proof of concept for various approaches to accurately calculate enhancement probabilities when using Cron stones based on game mechanics as of ~Q2 2024.

The enhancement system with crons was static prior to late 2023 and became dynamic after that (see More details section below). Consequently I had to adapt both the model and the calculations to reflect the changes and see their effects.

_mc_img

Process

To make these changes, I opted for the following approach:

  • built a Monte Carlo simulation of time inhomogeneous Markov chains and estimated the probability distribution of the underlying stochastic process.
    The hypothesis was that, with a large enough sample, the estimated distribution would converge to the true distribution.

The resulting probability distribution from the MC simulation was, as a sanity check, compared with:

  • the old model:
    • simulation
    • calculation from transition matrix exponentiation (computing n-step transition probabilities $P^n$)
  • new model:
    • calculation from recursion, based on the Chapman-Kolmogorov equation (simplified with the Markov property)

Test/comparison can be found in this notebook

 

Goals

The goal of the model wasn't only to obtain probabilities for cron enhancing sessions but also to deduce multiple aspects from the distribution, such as the frequency of states/ranks.

Giving more granularity to answer questions such as:

  • Stat examples:

    • Average number of crons or bases needed for enhancing an accessory, from rank i to j, with various failstack combinations.
    • Average total cost for enhancing an accessory with various failstack combinations (potentially including failstacks cost).
    • ...
  • In-game examples:

    • Estimating the profitability of enhancing a given accessory vs live market price (directly buying? selling up to a specific rank? or selling all bases instead? etc)
    • Comparing the profitability of cron enhancing vs raw enhancing vs hammer of precision enhancing
    • Estimating the best failstack combination: for every state/rank of enhancement
    • ...

 

Examples

A few examples, using Deboreka accessories as baseline, can be found in the notebooks directory.

 

More details:

  • What changed?

    In late 2023, Pearl Abyss revamped the enhancement system with crons. Previously, enhancing with crons did not influence a player's failstack for failure, but now gives 1 additional failstack every time a player fails.

  • How did it affect the enhancement system with crons for calculating probabilities?

    This change seems abysmal on paper, but from a math pov, it complicates how to correctly calculate probabilities with crons and multiple intermediate states, eg: proba of getting an accessory to "PEN" from "PRI" with 10 bases.

    • Before the change, we could consider all enhancing ranks/states ("BASE", "PRI", ..., up to "PEN") represented as a homogeneous Markov chain with a static transition matrix (since moving from states to states was not sensitive to time/steps.)

    • Now, we're dealing with non-homogeneous Markov chains, meaning the transition probabilities change with each step, as failures increment the failstack bonus and boost the odds of success.

  • Additional technical considerations:

    • In the case of BDO enhancing we're not interested in knowing the probability of getting a success with "exactly" $n$ bases but the probability of first hit, ie the proba of getting a success "with $n$ bases or fewer".

    • The "PEN" state/rank in BDO is absorbing, ie once we reach PEN we will stay there and never downgrade. Thus the n-step transition formula $P^n$ doesn't represent (for PEN) the proba for getting a PEN with exactly $n$ bases but the cumulative proba (CDF) with $n$ or fewer bases, which is what we want.

    • The transition matrix used with the n-transition formula will not work as expected if the final state isn't "PEN" because other intermediate states aren't considered absorbing states.
      For example, let's say we want to know the proba from "DUO" to "TRI" with 3 bases:

      • A valid path could be DUO->PRI->DUO->TRI or DUO->DUO->DUO->TRI
      • But it will also "mistakenly" count as a valid path DUO->TRI->TET->TRI because TRI isn't absorbing, while it's theoretically a valid path, remember we want first hit.

      However, it works as intended (even with non-absorbing intermediate states) with the simulation, I have checks in place for this scenario.

    • While I commented the code thoroughly for future reference, it remains a personal project, proof of concept, with curated examples.
      It's also meant to be used with game knowledge, ie not using negative failstacks or steps, understanding the enhancement mechanism, etc...

About

Probabilistic Modeling of Black Desert Online's Enhancement System. A proof of concept predicting outcomes to derive optimal profitability strategies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published