|
pulsatrix
|
A small, fixed-topology (2 input -> 2 hidden -> 1 output, both layers sigmoid) MLP whose weights are a flat parameter vector, plus a plain analytic fitness function scoring it against the four XOR patterns – the "fixed-topology network" and "plain analytic fitness function" this campaign's Evolution Strategies mission needs, deliberately using the same XOR benchmark and the same fitness convention (4.0 minus sum of squared error) as Mission 2's NEAT proof, for a direct same-problem cross-check between the two techniques. More...
#include <array>#include <cmath>#include <stdexcept>#include <vector>
Go to the source code of this file.
Namespaces | |
| namespace | pulsatrix |
| namespace | pulsatrix::detail |
Functions | |
| double | pulsatrix::detail::Sigmoid (double x) |
| double | pulsatrix::FixedTopologyXORForward (const std::vector< double > &theta, const std::array< double, 2 > &inputs) |
Forward pass: theta layout is [w1_00, w1_01, b1_0, w1_10, w1_11, b1_1, w2_0, w2_1, b2] – h_j = sigmoid(w1_j0*x0 + w1_j1*x1 + b1_j) for j in {0,1}, y = sigmoid(w2_0*h0 + w2_1*h1 + b2). | |
| double | pulsatrix::FixedTopologyXORFitness (const std::vector< double > &theta) |
| Scores theta against all four XOR patterns as 4.0 minus the sum of squared errors – identical convention to XORFitness (neat_xor_fitness.hpp), so an all-zero theta scores exactly 3.0 (every pattern outputs sigmoid(0)=0.5), the same fixed point NEAT's own fresh, all-zero-weight genome scores. | |
Variables | |
| constexpr size_t | pulsatrix::kFixedTopologyXORNumParams = 9 |
| Total flat-parameter count: 2*2 (input->hidden weights) + 2 (hidden biases) + 2 (hidden->output weights) + 1 (output bias) = 9. | |
A small, fixed-topology (2 input -> 2 hidden -> 1 output, both layers sigmoid) MLP whose weights are a flat parameter vector, plus a plain analytic fitness function scoring it against the four XOR patterns – the "fixed-topology network" and "plain analytic fitness function" this campaign's Evolution Strategies mission needs, deliberately using the same XOR benchmark and the same fitness convention (4.0 minus sum of squared error) as Mission 2's NEAT proof, for a direct same-problem cross-check between the two techniques.