Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrxh committed Apr 5, 2024
2 parents 511ca68 + 1f2ee30 commit bb32bc9
Show file tree
Hide file tree
Showing 30 changed files with 713 additions and 390 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Further information and artwork:
An Nvidia graphics card with compute capability 6.0 or higher is needed. Please check [https://en.wikipedia.org/wiki/CUDA#GPUs_supported](https://en.wikipedia.org/wiki/CUDA#GPUs_supported).

# 💽 Installer
Installer for Windows: [alien-installer.msi](https://alien-project.org/media/files/alien-installer.msi) (Updated: 2024-01-06)
Installer for Windows: [alien-installer.msi](https://alien-project.org/media/files/alien-installer.msi) (Updated: 2024-03-16)

In the case that the program crashes for an unknown reason, please refer to the troubleshooting section in [alien-project.org/downloads.html](https://alien-project.org/downloads.html).

Expand Down
9 changes: 9 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Release notes

## [4.8.2] - 2024-04-05
### Changed
- engine, genome editor: multiple construction flag is replaced by number of constructions
- engine: if construction process failed, destruction is initiated (via dying cell state)
- engine: gap in the completeness check for multiple constructions closed by taking the number of constructions into account

### Fixed
- serialization: current position in the genome for constructors was not loaded correctly

## [4.8.1] - 2024-03-16
### Changed
- engine: the dying state of cells can spread to cells under construction even if they belong to other an other creature
Expand Down
2 changes: 1 addition & 1 deletion external/ImFileDialog/ImFileDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace ifd {
class FileTreeNode {
public:
FileTreeNode(const std::string& path) {
Path = std::filesystem::u8path(path);
Path = std::filesystem::path(path);
Read = false;
}

Expand Down
738 changes: 514 additions & 224 deletions resources/autosave.settings.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion resources/autosave.statistics.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Time step, Cells (color 0), Cells (color 1), Cells (color 2), Cells (color 3), Cells (color 4), Cells (color 5), Cells (color 6), Cells (accumulated), Self-replicators (color 0), Self-replicators (color 1), Self-replicators (color 2), Self-replicators (color 3), Self-replicators (color 4), Self-replicators (color 5), Self-replicators (color 6), Self-replicators (accumulated), Viruses (color 0), Viruses (color 1), Viruses (color 2), Viruses (color 3), Viruses (color 4), Viruses (color 5), Viruses (color 6), Viruses (accumulated), Cell connections (color 0), Cell connections (color 1), Cell connections (color 2), Cell connections (color 3), Cell connections (color 4), Cell connections (color 5), Cell connections (color 6), Cell connections (accumulated), Energy particles (color 0), Energy particles (color 1), Energy particles (color 2), Energy particles (color 3), Energy particles (color 4), Energy particles (color 5), Energy particles (color 6), Energy particles (accumulated), Average genome cells (color 0), Average genome cells (color 1), Average genome cells (color 2), Average genome cells (color 3), Average genome cells (color 4), Average genome cells (color 5), Average genome cells (color 6), Average genome cells (accumulated), Total energy (color 0), Total energy (color 1), Total energy (color 2), Total energy (color 3), Total energy (color 4), Total energy (color 5), Total energy (color 6), Total energy (accumulated), Created cells (color 0), Created cells (color 1), Created cells (color 2), Created cells (color 3), Created cells (color 4), Created cells (color 5), Created cells (color 6), Created cells (accumulated), Attacks (color 0), Attacks (color 1), Attacks (color 2), Attacks (color 3), Attacks (color 4), Attacks (color 5), Attacks (color 6), Attacks (accumulated), Muscle activities (color 0), Muscle activities (color 1), Muscle activities (color 2), Muscle activities (color 3), Muscle activities (color 4), Muscle activities (color 5), Muscle activities (color 6), Muscle activities (accumulated), Transmitter activities (color 0), Transmitter activities (color 1), Transmitter activities (color 2), Transmitter activities (color 3), Transmitter activities (color 4), Transmitter activities (color 5), Transmitter activities (color 6), Transmitter activities (accumulated), Defender activities (color 0), Defender activities (color 1), Defender activities (color 2), Defender activities (color 3), Defender activities (color 4), Defender activities (color 5), Defender activities (color 6), Defender activities (accumulated), Injection activities (color 0), Injection activities (color 1), Injection activities (color 2), Injection activities (color 3), Injection activities (color 4), Injection activities (color 5), Injection activities (color 6), Injection activities (accumulated), Completed injections (color 0), Completed injections (color 1), Completed injections (color 2), Completed injections (color 3), Completed injections (color 4), Completed injections (color 5), Completed injections (color 6), Completed injections (accumulated), Nerve pulses (color 0), Nerve pulses (color 1), Nerve pulses (color 2), Nerve pulses (color 3), Nerve pulses (color 4), Nerve pulses (color 5), Nerve pulses (color 6), Nerve pulses (accumulated), Neuron activities (color 0), Neuron activities (color 1), Neuron activities (color 2), Neuron activities (color 3), Neuron activities (color 4), Neuron activities (color 5), Neuron activities (color 6), Neuron activities (accumulated), Sensor activities (color 0), Sensor activities (color 1), Sensor activities (color 2), Sensor activities (color 3), Sensor activities (color 4), Sensor activities (color 5), Sensor activities (color 6), Sensor activities (accumulated), Sensor matches (color 0), Sensor matches (color 1), Sensor matches (color 2), Sensor matches (color 3), Sensor matches (color 4), Sensor matches (color 5), Sensor matches (color 6), Sensor matches (accumulated), Reconnector creations (color 0), Reconnector creations (color 1), Reconnector creations (color 2), Reconnector creations (color 3), Reconnector creations (color 4), Reconnector creations (color 5), Reconnector creations (color 6), Reconnector creations (accumulated), Reconnector deletions (color 0), Reconnector deletions (color 1), Reconnector deletions (color 2), Reconnector deletions (color 3), Reconnector deletions (color 4), Reconnector deletions (color 5), Reconnector deletions (color 6), Reconnector deletions (accumulated), Detonations (color 0), Detonations (color 1), Detonations (color 2), Detonations (color 3), Detonations (color 4), Detonations (color 5), Detonations (color 6), Detonations (accumulated)
0.000000000,11655.000000000,20641.000000000,57811.000000000,7556.000000000,3508.000000000,0.000000000,0.000000000,101171.000000000,1467.000000000,1043.000000000,3606.000000000,0.000000000,0.000000000,0.000000000,0.000000000,6116.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,16917.000000000,38353.000000000,51978.000000000,8126.000000000,4775.000000000,0.000000000,0.000000000,120149.000000000,2939.000000000,8374.000000000,23402.000000000,2919.000000000,1425.000000000,0.000000000,0.000000000,39059.000000000,133.693933197,13.286673058,133.345535219,0.000000000,0.000000000,0.000000000,0.000000000,112.954708960,2048700.250000000,2464868.000000000,6648960.000000000,733101.937500000,430252.406250000,0.000000000,0.000000000,12325882.593750000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000
1 change: 1 addition & 0 deletions source/Base/Definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <optional>
#include <memory>
#include <initializer_list>
#include <cstdint>

#include "Exceptions.h"
#include "Vector2D.h"
Expand Down
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.8.1";
std::string const ProgramVersion = "4.8.2";
std::string const DiscordLink = "https://discord.gg/7bjyZdXXQ2";

std::string const BasePath = "resources/";
Expand Down
2 changes: 2 additions & 0 deletions source/Base/StringHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include <string>

#include "Base/Definitions.h"

class StringHelper
{
public:
Expand Down
23 changes: 10 additions & 13 deletions source/EngineGpuKernels/ConstructorProcessor.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ __inline__ __device__ void ConstructorProcessor::completenessCheck(SimulationDat
return;
}

if (constructor.numInheritedGenomeNodes == 0 || constructor.isConstructionBuilt() || !GenomeDecoder::containsSelfReplication(constructor)) {
if (constructor.numInheritedGenomeNodes == 0 || GenomeDecoder::isFinished(constructor) || !GenomeDecoder::containsSelfReplication(constructor)) {
constructor.isComplete = true;
return;
}
Expand Down Expand Up @@ -141,7 +141,6 @@ __inline__ __device__ void ConstructorProcessor::completenessCheck(SimulationDat
break;
}
} while (true);

constructor.isComplete = (actualCells >= constructor.numInheritedGenomeNodes);
}

Expand All @@ -167,13 +166,12 @@ __inline__ __device__ void ConstructorProcessor::processCell(SimulationData& dat
if (!constructionData.genomeHeader.hasInfiniteRepetitions()) {
++constructor.genomeCurrentRepetition;
if (constructor.genomeCurrentRepetition == constructionData.genomeHeader.numRepetitions) {
constructor.setConstructionBuilt(true);
constructor.genomeCurrentRepetition = 0;
if (!constructionData.genomeHeader.separateConstruction) {
++constructor.currentBranch;
}
}
}
else {
constructor.setConstructionBuilt(true);
}
} else {
++constructor.genomeCurrentNodeIndex;
}
Expand All @@ -188,7 +186,6 @@ __inline__ __device__ ConstructorProcessor::ConstructionData ConstructorProcesso
{
auto& constructor = cell->cellFunctionData.constructor;


ConstructionData result;
result.genomeHeader = GenomeDecoder::readGenomeHeader(constructor);
result.hasInfiniteRepetitions = GenomeDecoder::hasInfiniteRepetitions(constructor);
Expand Down Expand Up @@ -373,7 +370,6 @@ ConstructorProcessor::startNewConstruction(SimulationData& data, SimulationStati

if (!constructionData.isLastNodeOfLastRepetition || !constructionData.genomeHeader.separateConstruction) {
auto distance = constructionData.isLastNodeOfLastRepetition && !constructionData.genomeHeader.separateConstruction
&& constructionData.genomeHeader.singleConstruction
? 1.0f
: cudaSimulationParameters.cellFunctionConstructorOffspringDistance[hostCell->color];
if(!CellConnectionProcessor::tryAddConnections(data, hostCell, newCell, anglesForNewConnection.referenceAngle, 0, distance)) {
Expand Down Expand Up @@ -505,7 +501,7 @@ __inline__ __device__ bool ConstructorProcessor::continueConstruction(
CellConnectionProcessor::deleteConnections(hostCell, constructionData.lastConstructionCell);
}

//connect newCell to underConstructionCell
//connect newCell to lastConstructionCell
auto angleFromPreviousForNewCell = 180.0f - constructionData.angle;
if (!CellConnectionProcessor::tryAddConnections(
data,
Expand All @@ -516,6 +512,7 @@ __inline__ __device__ bool ConstructorProcessor::continueConstruction(
desiredDistance)) {
adaptReferenceAngle = false;
CellConnectionProcessor::scheduleDeleteCell(data, cellPointerIndex);
hostCell->livingState = LivingState_Dying;
}

Math::normalize(posDelta);
Expand Down Expand Up @@ -665,9 +662,9 @@ ConstructorProcessor::constructCellIntern(
newConstructor.activationMode = GenomeDecoder::readByte(constructor, genomeCurrentBytePosition);
newConstructor.constructionActivationTime = GenomeDecoder::readWord(constructor, genomeCurrentBytePosition);
newConstructor.lastConstructedCellId = 0;
newConstructor.currentBranch = 0;
newConstructor.genomeCurrentNodeIndex = 0;
newConstructor.genomeCurrentRepetition = 0;
newConstructor.stateFlags = 0;
newConstructor.constructionAngle1 = GenomeDecoder::readAngle(constructor, genomeCurrentBytePosition);
newConstructor.constructionAngle2 = GenomeDecoder::readAngle(constructor, genomeCurrentBytePosition);
GenomeDecoder::copyGenome(data, constructor, genomeCurrentBytePosition, newConstructor);
Expand Down Expand Up @@ -782,11 +779,11 @@ __inline__ __device__ int ConstructorProcessor::calcGenomeComplexity(int color,

auto genomeComplexityRamificationFactor =
cudaSimulationParameters.features.genomeComplexityMeasurement ? cudaSimulationParameters.genomeComplexityRamificationFactor[color] : 0.0f;
auto genomeComplexitySizeFactor =
auto sizeFactor =
cudaSimulationParameters.features.genomeComplexityMeasurement ? cudaSimulationParameters.genomeComplexitySizeFactor[color] : 1.0f;
GenomeDecoder::executeForEachNodeRecursively(genome, toInt(genomeSize), false, [&](int depth, int nodeAddress, int repetitions) {
float multiplier = depth > lastDepth ? genomeComplexityRamificationFactor * toFloat(repetitions) * toFloat(acceleration) : 0.0f;
result += powf(2.0f, toFloat(depth)) * (multiplier + genomeComplexitySizeFactor);
float ramificationFactor = depth > lastDepth ? genomeComplexityRamificationFactor * toFloat(acceleration) : 0.0f;
result += powf(2.0f, toFloat(depth)) * toFloat(repetitions) * (ramificationFactor + sizeFactor);
lastDepth = depth;
++acceleration;
});
Expand Down
2 changes: 1 addition & 1 deletion source/EngineGpuKernels/DataAccessKernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ namespace
cellTO.cellFunctionData.constructor.lastConstructedCellId = cell->cellFunctionData.constructor.lastConstructedCellId;
cellTO.cellFunctionData.constructor.genomeCurrentNodeIndex = cell->cellFunctionData.constructor.genomeCurrentNodeIndex;
cellTO.cellFunctionData.constructor.genomeCurrentRepetition = cell->cellFunctionData.constructor.genomeCurrentRepetition;
cellTO.cellFunctionData.constructor.stateFlags = cell->cellFunctionData.constructor.stateFlags;
cellTO.cellFunctionData.constructor.currentBranch = cell->cellFunctionData.constructor.currentBranch;
cellTO.cellFunctionData.constructor.offspringCreatureId = cell->cellFunctionData.constructor.offspringCreatureId;
cellTO.cellFunctionData.constructor.offspringMutationId = cell->cellFunctionData.constructor.offspringMutationId;
cellTO.cellFunctionData.constructor.genomeGeneration = cell->cellFunctionData.constructor.genomeGeneration;
Expand Down
Loading

0 comments on commit bb32bc9

Please sign in to comment.