gdstats provides common statistical distributions in Godot 3.0

gdstats

gdstats currently provides a small set of common distributions all implemented in fast forms usually via inversion techniques:

Image of Example Project

Discrete (integers)

  • randi_bernoulli(p), return 1 or 0 based on probability p

    example: Whether a specific die value was rolled or not

  • randi_binomial(p, n), return the number of 1s on n many Bernoulli Trials probability p.

    example: Number of times a specific value is rolled on a die in n many trials

  • randi_geometric(p), return the number of Bernoulli Trials with probability p until a result of 1.

    example: The number of rolls on a die until a specific value shows.

  • randi_poisson(lambda), a binomial where p->0 and n->inf but n*p = lambda.

    example: Number of phone calls in a given amount of time. p is very low and n is very large.

  • randv_histogram(values, probabilities), provide a list of return values and probabilities and return a value fitting the distribution.

    example: Use for distributions of own choosing such as marbles in a bag.

  • 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.

    example: Use to determine the number of attacks until the next critical occurs.

Table of Nominal Probabilities to c Values

The following table gives values of c to approximate a given event's probability of occuring.

Nominal Probability c Nominal Probability c
5% 0.00380 45% 0.20155
10% 0.01475 50% 0.24931
15% 0.03222 55% 0.36040
20% 0.05570 60% 0.42265
25% 0.08474 65% 0.48113
30% 0.11895 70% 0.57143
40% 0.15798

Continuous (floats)

  • randf_uniform(a, b), return a uniformly random value in range a to b

    example: Same as rand_range

  • randf_exponential(lambda), return a value fitting the exponential distribution

    example: Time between independant events which occur at a constant average rate. Memoryless

  • randf_erlang(k, lambda), Sum of k many exponentials of 1/lambda.

    example: The distribution of time between k many incoming telephone calls modelled by a poisson process. k = 1 is the exponential.

  • randf_gaussian()/randf_normal(), return a value from the normal distribution.

    example: Useful in modeling realistic scenarious which use the distribution, i.e. Harmonic Oscilator ground state, position of a diffused particle.

Similar Resources

Common case conversions covering common initialisms.

kace go get "github.com/codemodus/kace" Package kace provides common case conversion functions which take into consideration common initialisms. Usag

Sep 27, 2022

Turbine-common - This package contains the common interfaces for Turbine that are shared with other software

turbine-common This package contains the common interfaces for Turbine that are

Feb 12, 2022

Kakoune syntax highlighting for the Godot Engine / Godot Scripting Language gdscript

Kakoune syntax highlighting for the Godot Engine / Godot Scripting Language gdscript

gdscript-kak Kakoune syntax highlighting for the Godot Engine / Godot Scripting Language gdscript. Adds basic syntax highlighting to your .gd files fo

Mar 2, 2021

Kivik provides a common interface to CouchDB or CouchDB-like databases for Go and GopherJS.

Kivik Package kivik provides a common interface to CouchDB or CouchDB-like databases. The kivik package must be used in conjunction with a database dr

Dec 29, 2022

Package damsel provides html outlining via css-selectors and common template functionality.

Damsel Markup language featuring html outlining via css-selectors, extensible via pkg html/template and others. Library This package expects to exist

Oct 23, 2022

log4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web servicelog4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web service

log4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web servicelog4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web service

log4jScanner Goals This tool provides you with the ability to scan internal (only) subnets for vulnerable log4j web services. It will attempt to send

Jan 5, 2023

Executes jobs in separate GO routines. Provides Timeout, StartTime controls. Provides Cancel all running job before new job is run.

jobExecutor Library to execute jobs in GO routines. Provides for Job Timeout/Deadline (MaxDuration()) Job Start WallClock control (When()) Add a job b

Jan 10, 2022

Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.

Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.

#1 Golang live reload and task runner Content - ⭐ī¸ Top Features - 💃đŸģ Get started - 📄 Config sample - 📚 Commands List - 🛠 Support and Suggestions

Jan 6, 2023

Levenshtein distance and similarity metrics with customizable edit costs and Winkler-like bonus for common prefix.

A Go package for calculating the Levenshtein distance between two strings This package implements distance and similarity metrics for strings, based o

Dec 15, 2022

Common juju errors and functions to annotate errors. Based on juju/errgo

errors import "github.com/juju/errors" The juju/errors provides an easy way to annotate errors without losing the original error context. The exporte

Dec 30, 2022

A Go package for handling common HTTP JSON responses.

go-respond A Go package for handling common HTTP JSON responses. Installation go get github.com/nicklaw5/go-respond Usage The goal of go-respond is to

Sep 26, 2022

A collection of packages to augment the go testing package and support common patterns.

gotest.tools A collection of packages to augment testing and support common patterns. Usage With Go modules enabled (go1.11+) $ go get gotest.tools/v3

Jan 4, 2023

A toolkit with common assertions and mocks that plays nicely with the standard library

Testify - Thou Shalt Write Tests ℹī¸ We are working on testify v2 and would love to hear what you'd like to see in it, have your say here: https://cutt

Dec 30, 2022

đŸĢ A collection of common regular expressions for Go

CommonRegex A collection of often used regular expressions for Go Inspired by CommonRegex This is a collection of often used regular expressions. It p

Dec 31, 2022

A tiny http middleware for Golang with added handlers for common needs.

rye A simple library to support http services. Currently, rye provides a middleware handler which can be used to chain http handlers together while pr

Jan 4, 2023

Supporting your devops by shortening your strings using common abbreviations and clever guesswork

abbreviate Shorten your strings using common abbreviations. Supported by Tidelift Motivation This tool comes out of a frustration of the name of resou

Dec 14, 2022

Benchmarks of common basic operations for the Go language.

gocostmodel This package was inspired by Brian W. Kernighan and Rob Pike's book "The Practice of Programming" (Addison-Wesley, 1999). In Chapter 7 on

Dec 23, 2022

sigurls is a reconnaissance tool, it fetches URLs from AlienVault's OTX, Common Crawl, URLScan, Github and the Wayback Machine.

sigurls is a reconnaissance tool, it fetches URLs from AlienVault's OTX, Common Crawl, URLScan, Github and the Wayback Machine. DiSCLAIMER: fe

May 22, 2021
Seelog is a native Go logging library that provides flexible asynchronous dispatching, filtering, and formatting.

Seelog Seelog is a powerful and easy-to-learn logging framework that provides functionality for flexible dispatching, filtering, and formatting log me

Jan 3, 2023
FactorLog is a logging infrastructure for Go that provides numerous logging functions for whatever your style may be
FactorLog is a logging infrastructure for Go that provides numerous logging functions for whatever your style may be

FactorLog FactorLog is a fast logging infrastructure for Go that provides numerous logging functions for whatever your style may be. It could easily b

Aug 3, 2022
Package zaperations provides a Google Cloud operations suite (formerly Stackdriver) compatible config for the uber-go/zap logger.

Package zaperations provides a Google Cloud Operations (formerly Stackdriver) compatible config for the excellent uber-go/zap logger. Example This exa

Nov 6, 2021
Sig - Statistics in Go - CLI tool for quick statistical analysis of data streams

Statistics in Go - CLI tool for quick statistical analysis of data streams

May 16, 2022
Probability distributions and associated methods in Go

godist godist provides some Go implementations of useful continuous and discrete probability distributions, as well as some handy methods for working

Sep 27, 2022
Utilities for working with discrete probability distributions and other tools useful for doing NLP work

GNLP A few structures for doing NLP analysis / experiments. Basics counter.Counter A map-like data structure for representing discrete probability dis

Nov 28, 2022
Dec 28, 2022
Random is a package written in Go that implements pseudo-random number generators for various distributions.

Random This package implements pseudo-random number generators for various distributions. For integers, there is a function for random selection from

Jul 11, 2022
Apko: Build images for apk-based distributions declaratively

apko Build images for apk-based distributions declaratively! Why When maintainin

Jan 4, 2023
RancherOS v2 is an immutable Linux distribution built to run Rancher and it's corresponding Kubernetes distributions RKE2 and k3s

RancherOS v2 is an immutable Linux distribution built to run Rancher and it's corresponding Kubernetes distributions RKE2 and k3s. It is built using the cOS-toolkit and based on openSUSE

Dec 27, 2022