mutationNN creates a Neural Network and allows you to mutate it.
How to use:
from mutationNN import NN
- Create a NN
neural_network = NN(
ID = 0,
INPUT_SIZE = 3,
OUTPUT_SIZE = 1,
MUTATION_CHANCE = 0.25, #0.25 is the default setting.
FULLY_CONNECTED = True #False is the default setting.
)
2.1. The Output of the NN will Change the next Input:
p_I = [1, 2, 3]
output = neural_network.process_Input(p_I) #Gives you a List with the Size OUTPUT_SIZE
2.2. The Output won't Change the next Input:
p_S_I = [
[1, 2, 3],
[2, 3, 4],
[3, 4, 5]
]
output = neural_network.process_Static_Input(p_S_I))
3. Mutate the NN:
neural_network.mutate_Network(must_mutate=False)
# must_mutate has False as default but can be set to true in order to ensure at least 1 mutation will happen.
4. Take another NN as template:
neural_network2 = NN(
ID = 0,
INPUT_SIZE = 3,
OUTPUT_SIZE = 1,
MUTATION_CHANCE = 0.25, #0.25 is the default setting.
FULLY_CONNECTED = True #False is the default setting.
)
neural_network.copy_NN(neural_network2)
# Will copy the Neurons and Weights of agent_2 and apply mutate_Network(must_mutate=True) to the network afterwards.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mutationnn-0.0.5.tar.gz.
File metadata
- Download URL: mutationnn-0.0.5.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b87b56a4e4ee4e46d25bcbf45a1b0b4722acb1611e6be55f2bd32f94faa39205
|
|
| MD5 |
9e6a475020cc210fe49bb08c7026a4d1
|
|
| BLAKE2b-256 |
f3c7bc3d95259644dbf5da47d81adfd524bd82020c747821e30e5518d3b126c6
|
File details
Details for the file mutationnn-0.0.5-py3-none-any.whl.
File metadata
- Download URL: mutationnn-0.0.5-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99a60a7713bbae149717190b570d8932acccaebe1dd1bc1a15786bf58c84c7c8
|
|
| MD5 |
05f45e87f47710b525a13cee93c4af4e
|
|
| BLAKE2b-256 |
3d864c614bc534c159938dfc2360fc9775261c0bcd62ab707e19cb5252dd3854
|