Skip to content

Commit

Permalink
fixed insertion mutation error that led to undesirably high repetitio…
Browse files Browse the repository at this point in the history
…ns and made this mutation type more or less useless
  • Loading branch information
chrxh committed Nov 28, 2023
1 parent f3fddfe commit 7cfee7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/Base/Resources.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Const
{
std::string const ProgramVersion = "4.4.2";
std::string const ProgramVersion = "4.4.3";
std::string const DiscordLink = "https://discord.gg/7bjyZdXXQ2";

std::string const BasePath = "resources/";
Expand Down
4 changes: 4 additions & 0 deletions source/EngineGpuKernels/GenomeDecoder.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ __inline__ __device__ void GenomeDecoder::setRandomCellFunctionData(
if (cellFunction == CellFunction_Constructor || cellFunction == CellFunction_Injector) {
auto cellFunctionFixedBytes = cellFunction == CellFunction_Constructor ? Const::ConstructorFixedBytes : Const::InjectorFixedBytes;
genome[nodeAddress + cellFunctionFixedBytes] = makeSelfCopy ? 1 : 0;

auto subGenomeRelPos = getCellFunctionDataSize(cellFunction, makeSelfCopy, 0);
genome[nodeAddress + subGenomeRelPos + Const::GenomeHeaderNumRepetitionsPos] = 1;

if (!makeSelfCopy) {
writeWord(genome, nodeAddress + cellFunctionFixedBytes + 1, subGenomeSize);
}
Expand Down

0 comments on commit 7cfee7f

Please sign in to comment.