{"id":13525579,"url":"https://github.com/droxpopuli/gdstats","last_synced_at":"2025-04-01T05:31:52.270Z","repository":{"id":215915245,"uuid":"141350940","full_name":"droxpopuli/gdstats","owner":"droxpopuli","description":"gdstats provides common statistical distributions in Godot 3.0","archived":false,"fork":false,"pushed_at":"2018-07-19T03:50:16.000Z","size":16,"stargazers_count":36,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-02T06:17:41.222Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"GDScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/droxpopuli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-07-17T22:15:07.000Z","updated_at":"2023-12-01T13:05:15.000Z","dependencies_parsed_at":"2024-01-13T22:22:03.748Z","dependency_job_id":null,"html_url":"https://github.com/droxpopuli/gdstats","commit_stats":null,"previous_names":["droxpopuli/gdstats"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droxpopuli%2Fgdstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droxpopuli%2Fgdstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droxpopuli%2Fgdstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droxpopuli%2Fgdstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/droxpopuli","download_url":"https://codeload.github.com/droxpopuli/gdstats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222703648,"owners_count":17025835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:20.094Z","updated_at":"2024-11-02T10:30:38.009Z","avatar_url":"https://github.com/droxpopuli.png","language":"GDScript","readme":"# gdstats\n\ngdstats currently provides a small set of common distributions all implemented in fast forms usually via inversion techniques:\n\n![Image of Example Project](https://i.imgur.com/39pPFmh.png)\n\nDiscrete (integers)\n--------\n\n- `randi_bernoulli(p)`, return 1 or 0 based on probability p\n\n\t`example: Whether a specific die value was rolled or not`\n\n- `randi_binomial(p, n)`, return the number of 1s on n many Bernoulli Trials probability p.\n\n\t`example: Number of times a specific value is rolled on a die in n many trials`\n\n- `randi_geometric(p)`, return the number of Bernoulli Trials with probability p until a result of 1.\n\n\t`example: The number of rolls on a die until a specific value shows.`\n\n- `randi_poisson(lambda)`, a binomial where p-\u003e0 and n-\u003einf but n*p = lambda.\n\n\t`example: Number of phone calls in a given amount of time. p is very low and n is very large.`\n\n- `randv_histogram(values, probabilities)`, provide a list of return values and probabilities and return a value fitting the distribution.\n\n\t`example: Use for distributions of own choosing such as marbles in a bag.`\n\n- `randi_pseudo(c)`, mimics the Warcraft3/Dota style of \"fair\" number generators. Gives the number of actions until an event occurs where upon a failure, the probability increases by c.\n\n\t`example: Use to determine the number of attacks until the next critical occurs.`\n\t\n**Table of Nominal Probabilities to c Values**\n\nThe following table gives values of c to approximate a given event's probability of occuring.\n\n| Nominal Probability |    c    | Nominal Probability |    c    |\n|---------------------|:-------:|---------------------|:-------:|\n|          5%         | 0.00380 |         45%         | 0.20155 |\n|         10%         | 0.01475 |         50%         | 0.24931 |\n|         15%         | 0.03222 |         55%         | 0.36040 |\n|         20%         | 0.05570 |         60%         | 0.42265 |\n|         25%         | 0.08474 |         65%         | 0.48113 |\n|         30%         | 0.11895 |         70%         | 0.57143 |\n|         40%         | 0.15798 |                     |         |\n\n\nContinuous (floats)\n----------\n\n- `randf_uniform(a, b)`, return a uniformly random value in range a to b\n\n\t`example: Same as rand_range`\n\n- `randf_exponential(lambda)`, return a value fitting the exponential distribution\n\n\t`example: Time between independant events which occur at a constant average rate. Memoryless`\n\n- `randf_erlang(k, lambda)`, Sum of k many exponentials of 1/lambda.\n\n\t`example: The distribution of time between k many incoming telephone calls modelled by a poisson process. k = 1 is the exponential.`\n\n- `randf_gaussian()/randf_normal()`, return a value from the normal distribution.\n\n\t`example: Useful in modeling realistic scenarious which use the distribution, i.e. Harmonic Oscilator ground state, position of a diffused particle.`\n","funding_links":[],"categories":["Plugins and scripts"],"sub_categories":["3D"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroxpopuli%2Fgdstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdroxpopuli%2Fgdstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroxpopuli%2Fgdstats/lists"}