Skip to main content

A sample Python project

Reason this release was yanked:

Unavailable

Project description

gacha-expectation

This package is built up to serve players with information to gacha and the amount of resource needed to reach the expectation.

Function

  • Class step is designed to describe the parameter of pool of gacha, where the probability to get items in the rarest level will increased when you have not got the item with lots of trials.

Initiate

The Object in step should be created with following parameters:

step(p,p_up,ups,thres,most,mg)

p means the probablity to get items which are in the rarest level.
p_up means the proportion of the probability getting the item(s) which is up to the p mentioned above, and if there are more than one item in up, they share the probability evenly.
ups means the number of the item(s) in up.
thres means most means the maximum trails number of not getting the rarest items continuously.
mg means the number of non-up.

Method

The Class step has methods calc or smlt, and they should be used in following ways:
Object(step).calc(n,e,t=0,rel_exp=6) or Object(step).calc(n,e,t=0,times=100000)

n means the total trials in the gacha pool.
e means the ideal result of gacha.
t means the previous trials spent continuously with no rarest item got.
rel_exp means the branch whose possibility is smaller than the maxinum possiblity in branches which can reach the ideal result will be ignored to reduce the complexity of calculating time.
times means the repeat times of simulation.

These methods will return the possibility with 4 decimals accuracy.

Version

1.0.0

Only provided step class and calc, smlt method.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gacha_exp_calc-1.0.0a1.tar.gz (3.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page