Skip to content

Commit 329188b

Browse files
Update docs and setup.py to reflect current implementation.
1 parent dde7656 commit 329188b

File tree

7 files changed

+75
-35
lines changed

7 files changed

+75
-35
lines changed

docs/conf.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242
'sphinx.ext.inheritance_diagram',
4343
]
4444

45-
extlinks = {'pytypes': ('https://docs.python.org/3.5/library/stdtypes.html#%s',
45+
extlinks = {'pytypes': ('https://docs.python.org/3/library/stdtypes.html#%s',
4646
None),
47-
'pygloss': ('https://docs.python.org/3.5/glossary.html#term-%s',
47+
'pygloss': ('https://docs.python.org/3/glossary.html#term-%s',
4848
None),
49-
'datamodel': ('https://docs.python.org/3.5/reference/datamodel.html#%s',
49+
'datamodel': ('https://docs.python.org/3/reference/datamodel.html#%s',
5050
None),
51-
'pylib': ('https://docs.python.org/3.5/library/%s',
51+
'pylib': ('https://docs.python.org/3/library/%s',
5252
None)}
5353

5454
# Add any paths that contain templates here, relative to this directory.
@@ -67,17 +67,17 @@
6767

6868
# General information about the project.
6969
project = u'NEAT-Python'
70-
copyright = u'2015-2019, CodeReclaimers, LLC'
70+
copyright = u'2015-2025, CodeReclaimers, LLC'
7171
author = u'CodeReclaimers, LLC'
7272

7373
# The version info for the project you're documenting, acts as replacement for
7474
# |version| and |release|, also used in various other places throughout the
7575
# built documents.
7676
#
7777
# The short X.Y version.
78-
version = '0.92'
78+
version = '1.0.0'
7979
# The full version, including alpha/beta/rc tags.
80-
release = '0.92'
80+
release = '1.0.0'
8181

8282
if version != release:
8383
tags.add('draft')
@@ -129,8 +129,8 @@
129129
else:
130130
todo_include_todos = False
131131

132-
# Provide links to python3.5 documentation
133-
intersphinx_mapping = {'python': ('https://docs.python.org/3.5', None)}
132+
# Provide links to python3 documentation
133+
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
134134

135135
# -- Options for HTML output ----------------------------------------------
136136

docs/glossary.rst

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ Glossary
2323
Also known as a neuron (as in a *neural* network). They are of three types:
2424
:term:`input <input node>`, :term:`hidden <hidden node>`, and :term:`output <output node>`. Nodes have one or more :term:`attributes`, such
2525
as an :term:`activation function`; all are determined by their :term:`gene`. Classes of node genes include :py:class:`genes.DefaultNodeGene` and
26-
:py:class:`iznn.IZNodeGene`. (They should not be confused with :term:`compute nodes <compute node>`, host machines on which :py:mod:`distributed`
27-
evaluations of :term:`genomes <genome>` are performed.)
26+
:py:class:`iznn.IZNodeGene`.
2827

2928
input node
3029
These are the :term:`nodes <node>` through which the network receives inputs. They cannot be deleted (although :term:`connections <connection>`
@@ -140,20 +139,4 @@ Glossary
140139
check if a/the termination criterion is satisfied; if not, repeat. (The ordering in the :py:mod:`population` module is somewhat different.)
141140
Generations are numbered, and a limit on the number of generations is one type of termination criterion.
142141

143-
compute node
144-
Using the :py:mod:`distributed` module, genomes can be evaluated on multiple machines (including virtual machines) at once. Each such
145-
machine/host is called a ``compute node``. These are of two types, :term:`primary nodes <primary node>` and
146-
:term:`secondary nodes <secondary node>`.
147-
148-
primary node
149-
primary compute node
150-
If using the :py:mod:`distributed` module, you will need one primary :term:`compute node` and at least one :term:`secondary node`. The primary node
151-
creates and mutates genomes, then distributes them to the secondary nodes for evaluation. (It does not do any evaluations itself; thus, at least
152-
one secondary node is required.)
153-
154-
secondary node
155-
secondary compute node
156-
If using the :py:mod:`distributed` module, you will need at least one secondary :term:`compute node`, as well as a :term:`primary node`. The secondary
157-
nodes evaluate genomes, distributed to them by the primary node.
158-
159142
:ref:`Table of Contents <toc-label>`

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Welcome to NEAT-Python's documentation!
44
:abbr:`NEAT (NeuroEvolution of Augmenting Topologies)` is a method developed by Kenneth O. Stanley for evolving arbitrary neural
55
networks. NEAT-Python is a pure Python implementation of NEAT, with no dependencies other than the Python standard library.
66

7-
Currently this library supports Python versions 3.6 through 3.11, as well as PyPy 3.
7+
Currently this library supports Python versions 3.8 through 3.14, as well as PyPy 3.
88

99
Many thanks to the original authors of this implementation, Cesar Gomes Miguel, Carolina Feher da Silva, and Marcio Lobo Netto!
1010

docs/installation.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ two methods outlined below:
1111

1212
Install neat-python from PyPI using pip
1313
---------------------------------------
14-
To install the most recent release (version 0.92) from PyPI, you should run the command (as root or using `sudo`
14+
To install the most recent release (version 1.0.0) from PyPI, you should run the command (as root or using `sudo`
1515
as necessary)::
1616

1717
pip install neat-python
1818

1919
Note that the examples are not included with the package installed from PyPI, so you should download the `source archive
20-
for release 0.92
21-
<https://github.com/CodeReclaimers/neat-python/releases/tag/v0.92>`_ and use the example code contained in it.
20+
for release 1.0.0
21+
<https://github.com/CodeReclaimers/neat-python/releases/tag/v1.0.0>`_ and use the example code contained in it.
2222

23-
You may also just get the 0.92 release source, and install it directly using `setup.py` (as shown below)
23+
You may also just get the 1.0.0 release source, and install it directly using `setup.py` (as shown below)
2424
instead of `pip`.
2525

2626
Install neat-python from source using setup.py
@@ -29,8 +29,8 @@ Obtain the source code by either cloning the source repository::
2929

3030
git clone https://github.com/CodeReclaimers/neat-python.git
3131

32-
or downloading the `source archive for release 0.92
33-
<https://github.com/CodeReclaimers/neat-python/releases/tag/v0.92>`_.
32+
or downloading the `source archive for release 1.0.0
33+
<https://github.com/CodeReclaimers/neat-python/releases/tag/v1.0.0>`_.
3434

3535
Note that the most current code in the repository may not always be in the most polished state, but I do make sure the
3636
tests pass and that most of the examples run. If you encounter any problems, please open an `issue on GitHub

docs/module_summaries.rst

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,6 +1447,60 @@ See http://www.izhikevich.org/publications/spikes.pdf.
14471447
.. versionchanged:: 0.92
14481448
``__gene_attributes__`` changed to ``_gene_attributes``, since it is not a Python internal variable.
14491449

1450+
.. py:module:: innovation
1451+
:synopsis: Tracks innovation numbers for structural mutations in NEAT.
1452+
1453+
innovation
1454+
----------
1455+
Tracks innovation numbers for structural mutations in NEAT, as described in Stanley & Miikkulainen (2002).
1456+
1457+
.. index:: ! innovation number
1458+
.. index:: structural mutation
1459+
1460+
.. py:class:: InnovationTracker(start_number=0)
1461+
1462+
Tracks innovation numbers for structural mutations in NEAT. This class maintains a global counter that increments
1463+
across all generations and a generation-specific dictionary for deduplication of identical mutations within the
1464+
same generation.
1465+
1466+
Innovation numbers are assigned when:
1467+
1468+
- A new connection is added between two nodes
1469+
- A connection is split by adding a node (creates two new connections)
1470+
- Initial connections are created in the starting population
1471+
1472+
The tracker ensures that if multiple genomes independently make the same structural mutation in one generation,
1473+
they receive the same innovation number. This enables proper gene alignment during :term:`crossover`.
1474+
1475+
:param int start_number: The initial value for the global counter (default: 0). The first innovation will be start_number + 1.
1476+
1477+
.. versionadded:: 1.0
1478+
1479+
.. py:method:: get_innovation_number(input_node, output_node, mutation_type='add_connection')
1480+
1481+
Get or assign an innovation number for a structural mutation. If this exact mutation (same nodes and type)
1482+
has already occurred in the current generation, returns the existing innovation number. Otherwise, increments
1483+
the global counter and assigns a new innovation number.
1484+
1485+
:param int input_node: The input node ID for the connection
1486+
:param int output_node: The output node ID for the connection
1487+
:param str mutation_type: Type of mutation: ``'add_connection'`` (new connection), ``'add_node_in'`` (connection from original input to new node), ``'add_node_out'`` (connection from new node to original output), or ``'initial_connection'`` (connection in initial population)
1488+
:return: The innovation number for this structural mutation
1489+
:rtype: :pytypes:`int <typesnumeric>`
1490+
1491+
.. py:method:: reset_generation()
1492+
1493+
Clear generation-specific tracking at the start of a new generation. This method should be called at the
1494+
beginning of each generation's reproduction phase. It clears the generation_innovations dictionary but preserves
1495+
the global_counter so innovation numbers never repeat.
1496+
1497+
.. py:method:: get_current_innovation_number()
1498+
1499+
Get the current (most recently assigned) innovation number.
1500+
1501+
:return: The current value of the global counter
1502+
:rtype: :pytypes:`int <typesnumeric>`
1503+
14501504
.. py:module:: math_util
14511505
:synopsis: Contains some mathematical functions not found in the Python2 standard library, plus a mechanism for looking up some commonly used functions (such as for the species_fitness_func) by name.
14521506

docs/network_export.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Network Export
22
==============
33

4-
.. versionadded:: 1.0.1
4+
.. versionadded:: 1.0
55

66
NEAT-Python provides the ability to export trained neural networks to a framework-agnostic JSON format. This allows you to:
77

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
'Programming Language :: Python :: 3.9',
2929
'Programming Language :: Python :: 3.10',
3030
'Programming Language :: Python :: 3.11',
31+
'Programming Language :: Python :: 3.12',
32+
'Programming Language :: Python :: 3.13',
33+
'Programming Language :: Python :: 3.14',
3134
'Programming Language :: Python :: Implementation :: PyPy',
3235
'Topic :: Scientific/Engineering'
3336
]

0 commit comments

Comments
 (0)