Skip to content

UpdatePermanence somehow does not work #1018

@HolotypeRobotics

Description

@HolotypeRobotics

Code in question:

for cell in cells:
    segments = tm.connections.segmentsForCell(cell)
    for segment in segments:
        synapses = tm.connections.synapsesForSegment(segment)
        for synapse in synapses:
            current_permanence = tm.connections.permanenceForSynapse(synapse)
            print(f"Synapse {synapse}: {current_permanence}")
            tm.connections.updateSynapsePermanence(synapse, 1)
            permanence = tm.connections.permanenceForSynapse(synapse)
            print(f"permanence change: {current_permanence} -> {permanence}")

Output:

Synapse 9: 0.10000000149011612
Updating Synapse 9: Current Permanence: 0.1 New Permanence: 1
permanence change: 0.10000000149011612 -> 0.10000000149011612

Expected behavior:
The permanence for each synapse should = 1 after updateSynapsePermanence(synapse, 1) is called.

Actual behavior:
The permanence = initialPermanence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions