Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UpdatePermanence somehow does not work #1018

Open
HolotypeRobotics opened this issue Aug 4, 2024 · 0 comments
Open

UpdatePermanence somehow does not work #1018

HolotypeRobotics opened this issue Aug 4, 2024 · 0 comments

Comments

@HolotypeRobotics
Copy link

HolotypeRobotics commented Aug 4, 2024

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.

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

No branches or pull requests

1 participant