Skip to main content

mutationNN creates a Neural Network and allows you to mutate it.

How to use:

from mutationNN import NN

  1. Create a NN

neural_network = NN(

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(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(

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(must_mutate=True) to the network afterwards.

5. Save your NN:

neural_network.save_NN(path="Here your Path", name="NN")

# NN is the Default Name. It is a .json file.

6. Load your NN:

neural_network3 = NN(

INPUT_SIZE = 0,

OUTPUT_SIZE = 0

)

neural_network3.load_NN(path="Here your Path", name="NN")

# INPUT_SIZE/OUTPUT_SIZE and MUTATION_CHANCE don't matter since all Information of the Initial

NN will be overwritten by the loaded NN.

# NN is the Default Name.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mutationnn-0.0.7.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mutationnn-0.0.7-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file mutationnn-0.0.7.tar.gz.

File metadata

  • Download URL: mutationnn-0.0.7.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for mutationnn-0.0.7.tar.gz
Algorithm Hash digest
SHA256 e5136d1eaaf6fade4ea14526359987db6a13969d5e4204709b29eafaeb03a696
MD5 2c818a9ae6af05a4be52eb0c1c632efd
BLAKE2b-256 226e64d3bec039b76942d554b04b39fa0e0fd6d02c4ddb5ab7d604ccc4ee76dc

See more details on using hashes here.

File details

Details for the file mutationnn-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: mutationnn-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for mutationnn-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1c52222a241a7c4be6386125ce5a28b6cffdbe444417849b94f0a2a5fe1fae02
MD5 7fde061d91bea37e694a369834858d9c
BLAKE2b-256 5be07fa4c8b50765082941aec6696a3467c4c2fcbfe6b61c90a352cdc528e194

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page