You should be familiar with basic programming environments to get these visualizations running properly. There are several pieces to this, and 3 different repositories involved.
System Requirements
- Python 2.7
- Node 6.10+
Dependencies
Warnings
These codebases are experimental. That means two things:
- They may not work for you.
- Issues may not be fixed immediately.
- These visualizations are best viewed at least 2500px wide).
- I cannot count.
I typically develop this codebase against NuPIC tip of master. It may not work with earlier versions.
Bugs / Contributions
Please create issues and pull requests on individual repos. If I can validate they work on my local system I will generally merge them.
Three Parts
- HTM Server: https://github.com/htm-community/nupic-history-server
- HTM 3D Animation: https://github.com/numenta/cell-viz/
- HTM Visualization Client: https://github.com/htm-community/htm-school-viz
The HTM Server is an HTTP server that runs an HTM system. It exposes REST endpoints for clients to create models, send data, receive results, and query for HTM cellular state. This is currently implemented by the NuPIC History Server, but could be another HTM implementation that matches the HTTP interface.
The HTM 3D Animation is used in later episodes. It is a THREE.JS project called cell-viz that is called to create specific canned HTM animation scenes.
The HTM Visualization Client is a web server that displays a web interface for user interaction. It contains code to interface with the HTM Server and display results to the user using the HTM 3D Animation if necessary. All of the episode-specific code is here.
Step One: Checkout the code
Checkout or download the codebases and above and set environment variables to the absolute paths to their locations on your system.
export HTM_SERVER=<location of https://github.com/htm-community/nupic-history-server checkout>
export CELL_VIZ=<location of https://github.com/numenta/cell-viz/ checkout>
export HTM_VIZ=<location of https://github.com/htm-community/htm-school-viz checkout>
Step Two: Start the HTM Server
REMEMBER! You must have NuPIC installed properly for this to work.
cd $HTM_SERVER
python webserver.py 8080
This should start the HTM server on http://localhost:8080/. There is no web interface for this server, so if you hit it with your web browser, youāll just get back NuPIC History Server
in the HTTP response.
Step Three: Setup the HTM 3D Animation Web Package
Build the bundle
The cell-viz project needs to build a web bundle for the Visualization Client, so we need to package it up first.
cd $CELL_VIZ
webpack
You should see some output to the console and a compressed JavaScript file at out/dyson.js
.
Link the Bundle
The Visualization Client expects this bundle to be in its file structure, so run this command to link it.
ln -s $CELL_VIZ/out/dyson.js $HTM_VIZ/static/js/third/dyson-bundle.js
Step Three: Run the HTM Visualization Client
cd $HTM_VIZ
npm start
The user interface should be running on http://localhost:8001/. This server will interface with both the user and the HTM Server running on http://localhost:8080/.
Notes:
In the 3D animations, use the WASD keys to turn, arrow keys to go forward, backward, or strafe.