Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try probabilistic mode of disabling genes #140

Closed
MarkZH opened this issue Jan 27, 2024 · 2 comments · Fixed by #141
Closed

Try probabilistic mode of disabling genes #140

MarkZH opened this issue Jan 27, 2024 · 2 comments · Fixed by #141

Comments

@MarkZH
Copy link
Owner

MarkZH commented Jan 27, 2024

Instead of a binary on/off switch, each gene has a probability of being used for any given turn.

  1. Create a double member field probability of use that is clamped to the range [0, 1].
  2. At the beginning of a turn, generate a random number threshold in the range [0, 1].
  3. Instead of checking active() for gene methods, check that probability >= threshold before running the method.

This will require rescaling the pawn score for thinking output each move (and quickly). Maybe save the score for each gene after initializing and rescaling for disabled genes on each turn.

@MarkZH
Copy link
Owner Author

MarkZH commented Jan 27, 2024

The probability field should be an Interpolated_Gene_Value.

@MarkZH
Copy link
Owner Author

MarkZH commented Feb 4, 2024

Different idea: two components (activation_start and activation_end) that define an interval in the range [0, 1] during which the gene is active.

bool active(double game_progress) const noexcept
{
    return activation_start <= game_progress && game_progress <= activation_end;
}

Mutation restriction: -0.5 <= activation_start <= activation_end <= 1.05 (0.05 margins to allow for being on since the first move and on until the last move. If a mutation puts start and end in wrong order, change the non-mutated value to accommodate the restrictions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant