Skip to content

Commit 5565f7e

Browse files
Update documentation to include legacy initial_connection options.
1 parent fd657f1 commit 5565f7e

File tree

5 files changed

+26
-8
lines changed

5 files changed

+26
-8
lines changed

docs/config_essentials.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,14 @@ Let's walk through the XOR example config with explanations:
186186
# Set to False if you need memory/temporal processing
187187
feed_forward = True
188188
189-
# Start with all inputs connected to all outputs
190-
# Options: full, partial, none
191-
initial_connection = full
189+
# Start with all inputs connected to all outputs.
190+
# Common options:
191+
# unconnected - no initial connections
192+
# full_direct - all inputs connected to all outputs (and hidden nodes, if any)
193+
# partial_direct # - random subset of full_direct connections (0.0–1.0)
194+
# Legacy values ``full`` and ``partial`` are accepted for backward compatibility but
195+
# are deprecated; prefer the explicit variants above.
196+
initial_connection = full_direct
192197
193198
# Activation function for neurons
194199
# sigmoid: outputs in range (0, 1) - good for most problems

docs/config_file.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ required for your particular implementation.
402402

403403
* *initial_connection*
404404
Specifies the initial connectivity of newly-created genomes. (Note the effects on settings other than ``unconnected`` of the
405-
:ref:`enabled_default <enabled-default-label>` parameter.) There are seven allowed values:
405+
:ref:`enabled_default <enabled-default-label>` parameter.) There are seven primary values:
406406

407407
* ``unconnected`` - No :term:`connections <connection>` are initially present. **This is the default.**
408408
* ``fs_neat_nohidden`` - One randomly-chosen :term:`input node` has one connection to each :term:`output node`. (This is one version of the
@@ -418,9 +418,20 @@ required for your particular implementation.
418418
have :term:`recurrent` (loopback, in this case) connections from each hidden or output node to itself.
419419
* ``partial_nodirect #`` - As for ``full_nodirect``, but each connection has a probability of being present determined by the number
420420
(valid values are in [0.0, 1.0]).
421-
* ``partial_direct #`` - as for ``full_direct``, but each connection has a probability of being present determined by the number
421+
* ``partial_direct #`` - As for ``full_direct``, but each connection has a probability of being present determined by the number
422422
(valid values are in [0.0, 1.0]).
423423

424+
Older versions of the documentation sometimes referred to this setting as ``none`` when no initial connections are present; the correct
425+
configuration value is ``unconnected``. The string ``none`` is **not** a valid value for ``initial_connection``.
426+
427+
In addition, the following legacy aliases are accepted for backward compatibility but are **deprecated** and will be removed in a future
428+
version:
429+
430+
* ``fs_neat`` - Behaves like ``fs_neat_nohidden``; when hidden nodes are present it emits a warning and connects only inputs to outputs.
431+
* ``full`` - Behaves like ``full_nodirect``; when hidden nodes are present it emits a warning and creates no direct input-output connections.
432+
* ``partial`` - Behaves like ``partial_nodirect`` (typically used as ``partial <fraction>``); when hidden nodes are present it emits a warning
433+
and creates no direct input-output connections.
434+
424435
.. versionchanged:: 0.92
425436
fs_neat split into fs_neat_nohidden and fs_neat_hidden; full, partial split into full_nodirect, full_direct, partial_nodirect, partial_direct
426437

docs/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ First, create a configuration file named ``config-xor``:
6363
enabled_rate_to_false_add = 0.0
6464
6565
feed_forward = True
66-
initial_connection = full
66+
initial_connection = full_direct
6767
6868
node_add_prob = 0.2
6969
node_delete_prob = 0.2

examples/openai-lander/config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ no_fitness_termination = False
1212
num_inputs = 8
1313
num_hidden = 0
1414
num_outputs = 4
15-
initial_connection = partial 0.5
15+
# Random subset of all possible connections (0.0–1.0 fraction).
16+
initial_connection = partial_direct 0.5
1617
feed_forward = True
1718
compatibility_disjoint_coefficient = 1.0
1819
compatibility_weight_coefficient = 1.0

examples/xor/config-feedforward

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ enabled_default = True
4343
enabled_mutate_rate = 0.01
4444

4545
feed_forward = True
46-
initial_connection = full
46+
# Start with all inputs connected to all outputs.
47+
initial_connection = full_direct
4748

4849
# node add/remove rates
4950
node_add_prob = 0.2

0 commit comments

Comments
 (0)