Skip to main content

Overview

For local development and testing, you can run both the CL1 neural interface and training server on the same machine. This setup is ideal for:
  • Testing code changes without hardware
  • Debugging training pipelines
  • Developing with the SDK
  • Validating configurations before remote deployment
Local mode uses localhost (127.0.0.1) for all network communication. The CL1 neural interface must be started before the training server.

Quick Start

1

Start CL1 Neural Interface

Run the CL1 interface first using the convenience script:
This executes:
What this does:
  • Connects to training server at 127.0.0.1 (localhost)
  • Saves recordings to ./recordings directory
  • Runs neural loop at 10 Hz to avoid overstimulation
2

Start Training Server

After the CL1 interface is running, launch the training server:
This executes:
What this does:
  • Runs in training mode with PPO reinforcement learning
  • Uses CPU device (change to cuda if GPU available)
  • Connects to CL1 interface at 127.0.0.1
  • Trains for up to 1000 episodes
3

Monitor Training (Optional)

Open visualisation.html in a web browser. Update the image source to point to your training server:
This provides a real-time MJPEG stream of the DOOM game state.

Manual Setup

If you need custom configuration, run the commands manually:

Common Options

Example with Custom Recording Path

Network Ports

Local setup uses the following UDP ports on 127.0.0.1:
  • 12345 - Stimulation commands (training → CL1)
  • 12346 - Spike data (CL1 → training)
  • 12347 - Event metadata (training → CL1)
  • 12348 - Feedback commands (training → CL1)
  • 12349 - MJPEG stream (training → browser)
These ports must be available. Check with netstat -an | grep 1234 before starting.

Output Files

After training, you’ll find: Training Server outputs:
CL1 Interface outputs:

Stopping Training

Press Ctrl+C in either terminal to gracefully shutdown:
  1. Training server sends completion signal
  2. CL1 interface saves recording and exits
  3. Both processes cleanup UDP sockets
Always stop gracefully with Ctrl+C to ensure recordings and checkpoints are saved properly.

Next Steps