
Security News
pnpm 10.12 Introduces Global Virtual Store and Expanded Version Catalogs
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
github.com/they4kman/experimentation/machine-learning/genetic-algorithms
Execute python genetic_expr_ui.py
to get a graphical interface.
Description: a number is randomly chosen, and the aim of the program is to drum up a simple arithmetic equation using only addition, subtraction, multiplication, and division of a number of components less than 10. For instance, for the number 184, a solution might be 6*7*4+1-5+8+7+5
.
To find its solutions, the program begins with a population of 30 "chromosomes", each consisting of 30 "genes" representing digits or operators. At each step, two chromosomes are chosen at random-ish. We roll a die to see if we should crossover them, which is to swap their bits around a random bit
The program defines a simple language with characters defined as 4-bit nibbles:
Index | Binary | Character |
---|---|---|
0 | 0000 | 0 |
1 | 0001 | 1 |
2 | 0010 | 2 |
3 | 0011 | 3 |
4 | 0100 | 4 |
5 | 0101 | 5 |
6 | 0110 | 6 |
7 | 0111 | 7 |
8 | 1000 | 8 |
9 | 1001 | 9 |
10 | 1010 | + |
11 | 1011 | - |
12 | 1100 | * |
13 | 1101 | / |
14 | 1110 | Invalid |
15 | 1111 | Invalid |
These are called genes. A chromosome is a list of genes. In the demonstration, we use chromosomes with 30 genes.
TODO
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.