Closed MarkZH closed 9 months ago
double Noise_Gene::score_board(const Board&, const Piece_Color, size_t) const noexcept
{
const auto norm = priority(Game_Stage::OPENING) + priority(Game_Stage::ENDGAME);
return Random::random_number<double>(-1, 1)/norm;
}
The division should prevent mutations from making the priority zero. If the priorities get too small, then the division is likely to blow up, making the player make crazy move and lose.
The Noise Gene doesn't even have to be a gene. Just an extra call to Random::gaussian()
inside Genome::evaluate()
.
The enable/disable/probability (#140) Gene modifications should handle this better.
If a random noise is added to scores, then maybe important genes will have to attain their "correct" values more quickly to overcome the noise (boost the signal-to-noise ratio).
This shouldn't be a gene since it will evolve to a near zero score. Maybe it should be an environmental factor that slowly decreases to allow for fine-grained optimizing.
Maybe this should be used early in games to diversify the openings used.