Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Idea]: expand support for additional pseudorandom number generators #5

Open
kgryte opened this issue Jan 11, 2023 · 1 comment
Open
Labels
difficulty: 4 Likely to be challenging with ambitious goals. idea Potential GSoC project idea. priority: normal Normal priority. tech: javascript Involves programming in JavaScript. tech: nodejs Requires developing with Node.js.

Comments

@kgryte
Copy link
Member

kgryte commented Jan 11, 2023

Idea

The goal of this idea is to implement a variety of PRNGs for use within stdlib to generate pseudorandom numbers. The project currently uses Mersenne Twister as its default PRNG; however, this PRNG, while common, is not ideal given its comparatively large internal state. Would be great to have a collection of PRNGs, such as PCG, Philox, Xorshift, and more.

Expected Outcomes

stdlib users will have a wide selection of PRNGs from which to choose from based on their individual needs and considerations. Having a large selection of PRNGs will useful when replicating the results of numerical simulations which may use a PRNG which is not one of the currently supported stdlib PRNGs. Additionally, a desired outcome would be if we could replace MT19937 with a new default PRNG.

Involved Software

No other software should be necessary. We may be a bit constrained based on 32-bit limitations in JS. This would not, however, stop us from implementing in C for use in generating arrays of random numbers.

Prerequisite Knowledge

JavaScript, Node.js. Familiarity with C/C++/Fortran would help.

Difficulty

Intermediate/Hard. Depends. Some PRNGs may be straightforward to implement. Others, not so much.

Project Length

175/350 hours. This idea can be adjusted according to needs and availability.

Potential Mentors

@kgryte @Planeshifter @Pranavchiku

@kgryte kgryte added idea Potential GSoC project idea. priority: normal Normal priority. tech: javascript Involves programming in JavaScript. tech: nodejs Requires developing with Node.js. difficulty: 4 Likely to be challenging with ambitious goals. labels Jan 11, 2023
@stdlib-js stdlib-js locked and limited conversation to collaborators Jan 11, 2023
@kgryte
Copy link
Member Author

kgryte commented Feb 15, 2025

If you are interested in working on this idea, you should spend some time researching and reading the source code of PRNGs both in stdlib and outside of stdlib. Some PRNGs are not readily doable in JS, and you should ensure that the PRNGs you propose can be realistically added in a timely manner.

Be also mindful of any licensing limitations. We CANNOT accept any PRNG which is GPL licensed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
difficulty: 4 Likely to be challenging with ambitious goals. idea Potential GSoC project idea. priority: normal Normal priority. tech: javascript Involves programming in JavaScript. tech: nodejs Requires developing with Node.js.
Projects
None yet
Development

No branches or pull requests

1 participant