Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 2, 2026

Adds channelBitMask (uint8_t, default 0xFF) to MemoryDescription and MemoryGenomeDescription to control which signal channels can be modified by the MemoryProcessor. Bit N corresponds to channel[N].

Data Structures

  • Added channelBitMask to MemoryDescription, MemoryGenomeDescription, and GPU equivalents (Memory, MemoryTO, MemoryGenome, MemoryGenomeTO)

MemoryProcessor Logic

  • All modes (SignalDelay, SignalRecorder, SignalStorage, SignalIntegrator) now respect the bitmask when writing to cell->signal.channels[k]:
if (channelBitMask & (1 << k)) {
    cell->signal.channels[k] = output.channels[k];
}

Data Pipeline

  • DescriptionConverterService: TO ↔ Description conversion
  • ObjectFactory: Node/Cell creation from TO and genome
  • DataAccessKernels: GPU TO creation
  • SerializerService: Save/load support
  • GenomeDescriptionHash: Hash computation

UI

  • Added 8 checkboxes in NodeEditorWidget for Memory cell type to edit each bit independently
Original prompt

Add a new member channelBitMask to MemoryDescription (uint8_t, default 0b11111111) and MemoryGenomeDescription. Adapt TO.cuh, Object.cuh, DescriptionConverterService, ObjectFactory, DataAccessKernel, SerializerService, GenomeDescriptionHash, DescriptionTestDataFactory, GenomeDescriptionValidationService, etc.
The following logic for channelBitMask should be implemented:

  • The lowest bit (i.e. bit pos 0) should correspond to channel[0], the highest bit to channel[MAX_CHANNELS - 1] (MAX_CHANNELS is currently 8).
  • In MemoryProcessor: in all modes only, the channels of the cell's signal can be modified if the corresponding bit in the bit mask is 1. otherwise the corresponding channel should be left unchanged
    In NodeEditorWidget: For each bit in the mask there should be a AlienGui::Checkbox to edit it.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add channelBitMask to MemoryDescription and related components Add channelBitMask to MemoryDescription for selective channel modification Jan 2, 2026
Copilot AI requested a review from chrxh January 2, 2026 09:27
Copilot AI and others added 2 commits January 3, 2026 10:21
…ption

Co-authored-by: chrxh <73127001+chrxh@users.noreply.github.com>
@chrxh chrxh force-pushed the copilot/add-channel-bit-mask-member branch from f709403 to acc488f Compare January 3, 2026 09:21
@chrxh
Copy link
Owner

chrxh commented Jan 3, 2026

@copilot branch has been rebased. check again

Copy link
Contributor Author

Copilot AI commented Jan 3, 2026

@copilot branch has been rebased. check again

Verified after rebase - build succeeds and all tests pass (EngineInterfaceTests: 145 tests, NetworkTests: 4 tests, PersisterTests: 57 tests). The channelBitMask changes are intact and working correctly.

@chrxh chrxh marked this pull request as ready for review January 5, 2026 16:03
@chrxh chrxh merged commit b429f34 into develop Jan 5, 2026
1 check failed
@chrxh chrxh deleted the copilot/add-channel-bit-mask-member branch January 5, 2026 16:03
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.

2 participants