Some basic examples that show how to consume the htm.core NetworkAPI REST Interface using C# and .NET Core 3.1.
Latest build status:
For the examples to work, you will need to have the example REST server running that comes with htm.core.
To get hold of the server, you can either
- download the source and build it yourself. Once built, the server executable (rest_server) should be available in the build/Release/bin subdirectory of the htm.core project root folder.
or
- start a docker container using the htm.core jupyter docker image:
docker run -d -p 8888:8888 -p 8050:8050 --name jupyter 3rdman/htm.core-jupyter:latest
Per default, the server is listening on port 8050.
The project is divided up into two main areas/folders. Common and Examples.
This contains:
- A very basic implementation of an SDR (utilizing NumSharp), along with some related tests.
- The actual REST API client.
There are currently two examples, which are located in the [Examples] directory.
This example is inspired by the original htm.core python REST client example authored by David Keeney.
An adoption of the python script provided at the end of this blog post, showing how the Temporal Memory learns a very simple sequence.
For both examples the configuration options are located in a separate file (ExampleConfiguration.cs). So if you want to play around with your own NetworkAPI settings, or adjust the URL to the NetworkAPI REST interface (default is http://localhost:8050/network), that's where to change it.
Please have a look at this post.