How to Run HTM School Visualizations

Episode 10 (Doesn’t work):
As I click “Episode 10: Topology Topology” the terminal output does not change at all.

Episode 11 (works fine, stating here for comparison. Only a few minor issues listed):

For your ready info, when I clicked “Episode 11: Temporal Memory Part 1 Sequencer”, I get following text, and visualisation works fine:

{u’boostStrength’: 1,
u’columnDimensions’: [1024],
u’dutyCyclePeriod’: 1000,
u’globalInhibition’: True,
u’inputDimensions’: [100],
u’localAreaDensity’: 0,
u’minPctOverlapDutyCycle’: 0.001,
u’numActiveColumnsPerInhArea’: 20,
u’potentialPct’: 0.85,
u’potentialRadius’: 100,
u’stimulusThreshold’: 1,
u’synPermActiveInc’: 0.05,
u’synPermConnected’: 0.1,
u’synPermInactiveDec’: 0.008,
u’wrapAround’: True}
_conjureActiveColumns: 6.79492950439e-05 seconds
_conjurePotentialPools: 0.0749340057373 seconds
_conjureConnectedSynapses: 0.00297904014587 seconds
_conjurePermanences: 0.00664615631104 seconds
Saving SP db350db1 to memory…
127.0.0.1:46026 - - [05/Feb/2018 23:16:35] “HTTP/1.1 POST /_sp/” - 200 OK
{u’activationThreshold’: 10,
u’cellsPerColumn’: 16,
u’columnDimensions’: [1024],
u’connectedPermanence’: 0.5,
u’initialPermanence’: 0.21,
u’maxNewSynapseCount’: 20,
u’maxSegmentsPerCell’: 255,
u’maxSynapsesPerSegment’: 255,
u’minThreshold’: 10,
u’permanenceDecrement’: 0.02,
u’permanenceIncrement’: 0.1,
u’predictedSegmentDecrement’: 0}
Created TM db350db1
_conjureActiveCells: 8.10623168945e-06 seconds
127.0.0.1:46028 - - [05/Feb/2018 23:16:35] “HTTP/1.1 POST /_tm/” - 200 OK

Visualisation is not as neat as your video though, also not the controls. Transparency level of the cell gets very high, as soon as I click the play button. Screenshot attached.

As for the 3d controls, do you use any keys other than WASDQE? How do you pitch and yaw?

PS: I am presenting HTM theory in the morning to my colleagues, I am preparing the notes and visualisations therefore. :slight_smile: Kindly help!

Not the terminal output, the browser console output.

Use the arrow keys, too. I use a combination of both (arrows for strafe).

The page is blank with only the text: Ep10/Choose Gif

Do I need to download these images from somewhere first?

Chrome screenshot below:

No, but I need to see what errors are occurring in your browser. Look up what browser you have and how to show the “web console” logs.

I use google chrome. I opened DevTools/console using ctrl+shift+J as per: Chrome DevTools - Chrome for Developers
I see the following:

Tone.min.js:7 [Deprecation] GainNode.gain.value setter smoothing is deprecated and will be removed in M64, around January 2018. Please use setTargetAtTime() instead if smoothing is needed. See Chrome Platform Status for more details.
(anonymous) @ Tone.min.js:7
s._initAudioContext @ Tone.min.js:7
(anonymous) @ Tone.min.js:7
t @ Tone.min.js:1
(anonymous) @ Tone.min.js:7
(anonymous) @ Tone.min.js:1
(anonymous) @ Tone.min.js:1
Tone.min.js:7 * Tone.js r9 *

Kindly let me know how do I generate the log by which you can best help me out. (My apologies, but I have never done java script/web debugging, so I am not sure how do I proceed next.)

That’s strange. I don’t see any errors. But I also don’t see anything loaded. What does this URL show you?

http://localhost:8001/client/ep10/topology.html?load=bird

I get the following:

Tone.min.js:7 [Deprecation] GainNode.gain.value setter smoothing is deprecated and will be removed in M64, around January 2018. Please use setTargetAtTime() instead if smoothing is needed. See Chrome Platform Status for more details.
(anonymous) @ Tone.min.js:7
Tone.min.js:7 * Tone.js r9 *
cell-viz-1.1.2.bundle.js:20388 THREE.WebGLRenderer 81

As I click somewhere, I additionally get:

clicked: 6, 6, 1 == column 78
topology.js:254 Uncaught TypeError: Cannot read property ‘78’ of undefined
at updateCellRepresentations (topology.js:254)
at spClicked (topology.js:407)
at cellClicked (topology.js:412)
at HTMLCanvasElement.onDocumentMouseDown (topology.js:433)
at HTMLCanvasElement.dispatch (jquery.min.js:5)
at HTMLCanvasElement.y.handle (jquery.min.js:5)

I can’t replicate this, so in order to help you out, you’re going to have to help me debug.

Go to http://localhost:8001/client/ep10/choose-gif.html and open up your web console again. Go to the “sources” tab and find the source file at client/ep10/choose-gif.js, then put a breakpoint here:

Then refresh the page and inspect the resp object. Does it contain stuff like this?

I do not see client/ep10/choose-gif.js.

localhost:8001 expansion looks like this:

That highlighted js folder contains it.

I don’t see it.
Entire structure for your ready info, perhaps you see some missing files that I need to generate or something?

Click on your “Elements” tab, does it not look like this? It should link /static/js/ep10/choose-gif.js:

Yes, I do have that line under ‘Elements’.

However, I do not see /static/js/lib/grid-cells/* ( = 3 js files) + dat.gui.min.js + d3is.org/d3.v4.min.js

Screenshot below

You should not see those grid cell files. Keep looking for the choose-gif.js in your source tab. It has to be there, or else there will be an error somewhere.

Ok, I navigated using the line and I now see that js file. :slight_smile:

I added the breakpoint, but Resp Object looks empty?

Screenshot:

So when you hit http://localhost:8001/_gifList in your browser, are there any errors from the NodeJS terminal window?

I get a page with only the following text. Nothing in the console tab (ctrl+shift+J):

{“gifs”:}

The gif data should be loaded from here: https://github.com/htm-community/htm-school-viz/tree/master/static/data/gifData

In your local environment, you should look to make sure this path leads to something:

:boom: I know the problem. You’re in Windows. :smiley:

Change the gifData folder to gifdata lower case d. That should fix it.

I’ll submit a fix today.