Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 4, 2025

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original issue description:

In ObjectTO.h the data type CreatureTO should be splitted into (ignore the code comments about what belongs to the genome)

struct CreatureTO
{
    uint64_t id;
    uint64_t ancestorId;
    uint32_t mutationId;
    float genomeComplexity;

    GenomeTO genome;

    // Temporary data
    uint64_t creatureIndexOnGpu;
};

and

struct GenomeTO
{
    int numGenes;
    uint64_t geneArrayIndex;

    float frontAngle;
};

The new CreatureTO should remain in ObjectTO.h while the new GenomeTO should be in GenomeTO.h.

Similarly, Creature from Object.cuh should be splitted into

struct Creature
{
    uint64_t id;
    uint64_t ancestorId;

    uint32_t mutationId;
    float genomeComplexity;

    Genome genome;

    // Temporary data
    uint64_t creatureIndex;
    static auto constexpr CreatureIndex_NotSet = 0xffffffffffffffff;
};

and

struct Genome
{
    int numGenes;
    Gene* genes;

    float frontAngle;
};

while Genome should be put to Genome.cuh.

All usages of the former creature structures should be adapted.

IMPORTANT:
This issue must be fixed on the v5.0_dev and not on develop branch.

Fixes #126.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI requested a review from chrxh July 4, 2025 06:42
@chrxh chrxh closed this Jul 13, 2025
@chrxh chrxh deleted the copilot/fix-126 branch July 13, 2025 21:22
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 this pull request may close these issues.

Refactoring: Encapsulate genome properties in an own structure.

2 participants