Skip to content

Commit

Permalink
+ include repetitions in mutation check
Browse files Browse the repository at this point in the history
+ show 1 branch for self-replicators
  • Loading branch information
chrxh committed Dec 28, 2024
1 parent dcf5613 commit 72b56fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions source/EngineGpuKernels/MutationProcessor.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ __inline__ __device__ void MutationProcessor::checkMutationsForCell(SimulationDa
{
auto& constructor = cell->cellFunctionData.constructor;
if (GenomeDecoder::containsSelfReplication(constructor)) {
auto numNodes = GenomeDecoder::getNumNodesRecursively(constructor.genome, constructor.genomeSize, false, true);
auto numNonSeparatedNodes = GenomeDecoder::getNumNodesRecursively(constructor.genome, constructor.genomeSize, false, false);
auto numNodes = GenomeDecoder::getNumNodesRecursively(constructor.genome, constructor.genomeSize, true, true);
auto numNonSeparatedNodes = GenomeDecoder::getNumNodesRecursively(constructor.genome, constructor.genomeSize, true, false);
auto tooMuchSeparatedParts = numNodes > 2 * numNonSeparatedNodes;
if (tooMuchSeparatedParts) {
cell->livingState = LivingState_Dying;
Expand Down
2 changes: 1 addition & 1 deletion source/Gui/InspectorWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ void _InspectorWindow::processCellGenomeTab(Description& desc)
if (ImGui::TreeNodeEx("Properties (principal genome part)", TreeNodeFlags)) {

auto genomeDesc = GenomeDescriptionService::get().convertBytesToDescription(desc.genome);
auto numBranches= genomeDesc.header.numBranches;
auto numBranches = genomeDesc.header.getNumBranches();
AlienImGui::InputInt(
AlienImGui::InputIntParameters()
.name("Number of branches")
Expand Down

0 comments on commit 72b56fd

Please sign in to comment.