Last updated: August 27, 2025
This guide helps you run the Entropy Engine MVP/PoC demo quickly and confidently. It covers one‑command launch, manual options, visualization controls, and troubleshooting. It also clarifies what the 3D Arrow means so you can evaluate usefulness.
- Starts a sample telemetry generator (TCP) or replays a CSV.
- Runs the Entropy Engine MVP viewer that computes entropy level and derivatives and renders a 3D Arrow.
- Opens a local web UI in your browser.
Components
run-demo.ps1(Windows) /run-demo.sh(macOS/Linux): one‑command launchertest_stream_gen.py: sample TCP generatoree_mvp.py: MVP viewer & 3D visualization
Privacy & Safety
- No telemetry is uploaded anywhere. Everything runs locally.
- TTL/health checks exist in the MVP; stale or malformed inputs are safely ignored.
# Full demo: auto-create venv, install deps, start generator + UI, open browser
./run-demo.ps1 -AutoBumpPorts `
-VizArrowMode cone -VizTail -VizArrowGain 1.4 -VizYG 2 -VizZG 4 -VizAspect "1,1,1.6"# Assuming Python is installed and run-demo.sh is executable
./run-demo.sh --auto-bump-ports \
--viz_arrow_mode cone --viz_tail --viz_arrow_gain 1.4 \
--viz_y_gain 2 --viz_z_gain 4 --viz_aspect 1,1,1.6Tip: If ports are in use, use the auto‑bump options (see below) or choose custom ports.
| Source | Format | How to run | Notes |
|---|---|---|---|
| TCP | plain (one number per line) | Generator (test_stream_gen.py --mode tcp --fmt plain) → Viewer (ee_mvp.py --source tcp) |
Supported today. |
| TCP | JSON | Generator can emit JSON (--fmt json) |
Not yet supported by viewer; use plain for TCP. |
| File | CSV | ee_mvp.py --source csv --path telemetry.csv |
CSV must contain a value column or a single first column of values. |
CSV schema
- Preferred header:
value. If missing, the first column will be used. - Values are parsed as floats if possible; otherwise a stable string‑to‑numeric mapping is applied.
run-demo.ps1 spins up everything for you:
- Ensures a Python virtual environment exists
- Installs/validates required packages
- Starts the generator (TCP) and the MVP viewer (web UI)
- Opens your browser to the UI
./run-demo.ps1 \
[-GenPort <int>] # generator TCP port (default: 9009) \
[-BindHost <string>] # generator bind host (default: 127.0.0.1) \
[-UiPort <int>] # UI web port (default: 8050) \
[-UiHost <string>] # UI host interface (default: 127.0.0.1) \
[-AutoBumpPorts] # if port busy, auto-increment to next free \
[-NoBrowser] # start UI but don’t auto-open browser \
[-Stop] # stop processes previously launched by the script
# Visualization tuning (passed through to ee_mvp.py)
[-VizArrowMode <quiver|cone>] # 3D arrow style (default: cone) \
[-VizTail] # draw trajectory tail \
[-VizArrowGain <float>] # arrow length scale (default: 1.0) \
[-VizYG <float>] # Y (slope) visual gain (default: 1.0) \
[-VizZG <float>] # Z (curvature) visual gain (default: 1.0) \
[-VizAspect "<x,y,z>"] # axis aspect ratio, e.g. "1,1,1.6"
# Generator tuning (for test_stream_gen.py)
[-DataType <123|abc|sym|mix>] # symbol alphabet (default: 123) \
[-Clock <float>] # seconds per tick (default: 1.0) \
[-RunTime <int>] # seconds to run (0 = infinite) \
[-UF <float>] # uncertainty factor 0..1 (default: 0.2) \
[-Seed <int>] # RNG seed (optional)# Vanilla demo (ports 9009 & 8050)
./run-demo.ps1
# Auto-bump if ports busy; stronger Z perspective
./run-demo.ps1 -AutoBumpPorts -VizArrowMode cone -VizTail -VizArrowGain 1.4 -VizYG 2 -VizZG 4 -VizAspect "1,1,1.6"
# Use different ports (e.g., restricted workspace)
./run-demo.ps1 -GenPort 9109 -UiPort 8060 -AutoBumpPorts
# Stop everything started by the script
./run-demo.ps1 -StopAuto‑bump behavior
- The launcher attempts the next available port(s) when the requested port is in use.
- The MVP UI also auto‑tries up to 5 consecutive ports internally.
Stop semantics
-Stopterminates processes launched by the most recent run of the script (tracked by PID).- If you started components manually, close those shells/windows or stop by port.
Security note (bind host)
- Prefer
127.0.0.1for-BindHost/-UiHoston untrusted networks. - Use
0.0.0.0only when you intentionally need remote access on your LAN.
Emit a predictable but configurable one value per tick stream over TCP for the viewer.
# Windows venv invocation shown; adapt `python` path for macOS/Linux
./venv/Scripts/python.exe ./test_stream_gen.py \
--mode tcp \
--datatype {123|abc|sym|mix} \
--clock <seconds> \
--runtime <seconds> # 0 = run forever \
--uf <0..1> # randomness injection \
--seed <int> # RNG seed (optional) \
--host <bind-host> # default 127.0.0.1 \
--port <bind-port> # default 9009 \
--fmt {plain|json} # default plain--datatype— token alphabet123: numeric tokens (baseline for continuous distributions)abc: alphabetic tokenssym: symbolic charset (non‑alnum)mix: mixed alphabet (highest combinatorial richness)
--clock— seconds per output sample (e.g.,0.25= 4 Hz)--runtime— total run time in seconds (0= until stopped)--uf— Uncertainty Factor (entropy nudge)0.0…1.00.0= fully predictable;1.0= highly random
--fmt— useplainfor compatibility with the viewer’s TCP source today
# Numeric tokens, 4 Hz, infinite, moderate uncertainty
./venv/Scripts/python.exe ./test_stream_gen.py --mode tcp --datatype 123 --clock 0.25 --runtime 0 --uf 0.2 --seed 42 --host 127.0.0.1 --port 9009 --fmt plain
# Mixed alphabet, slower tick, finite run on a different port
./venv/Scripts/python.exe ./test_stream_gen.py --mode tcp --datatype mix --clock 1.0 --runtime 300 --uf 0.35 --port 9109 --fmt plainIngest the stream → compute H̃ (level), dH/dt (slope), d²H/dt² (curvature) → render a rotatable 3D Arrow with optional tail.
python ee_mvp.py \
--source {tcp|csv} \
# TCP source:
--tcp_host <host> --tcp_port <port> \
# CSV source:
--path <telemetry.csv> \
# Clock/analysis
--dt <seconds-per-tick> # e.g., 0.25 (also CSV replay step) \
--bins <int> # histogram bins (e.g., 24) \
--window <seconds> # entropy window length (e.g., 180) \
--alpha <0..1> # EWMA smoothing for H̃ (optional; default 0.2) \
--Tstar <float> # reserved/experimental (note: may become --tstar) \
# Web UI
--ui_host <host> # default 127.0.0.1 \
--ui_port <port> # default 8050 \
# Visualization
--viz_arrow_mode {quiver|cone} # default cone \
--viz_tail \
--viz_arrow_gain <float> # arrow length scale \
--viz_y_gain <float> # Y (slope) visual gain \
--viz_z_gain <float> # Z (curvature) visual gain \
--viz_aspect x,y,z # axis ratio, e.g., 1,1,1.6# Read from running TCP generator on 127.0.0.1:9009
python ee_mvp.py --source tcp --tcp_host 127.0.0.1 --tcp_port 9009 \
--dt 0.25 --bins 24 --window 180 --alpha 0.2 --Tstar 0 \
--ui_host 127.0.0.1 --ui_port 8050 \
--viz_arrow_mode cone --viz_tail --viz_arrow_gain 1.4 --viz_y_gain 2 --viz_z_gain 4 --viz_aspect 1,1,1.6
# From a CSV file instead of TCP
python ee_mvp.py --source csv --path ./telemetry.csv \
--dt 0.5 --bins 32 --window 240 --viz_arrow_mode coneNote on --Tstar
- The current flag in code is
--Tstar. In a future release we may rename to--tstarto align with lowercase flag style.
- X = H̃(X) ∈ [0,1] after normalization
- Y = dH/dt, Z = d²H/dt² can be larger in magnitude → the plot can look flat along X
Make it pop
- Increase
--viz_y_gain(slope) and--viz_z_gain(curvature) - Increase
--viz_arrow_gainfor overall vector length - Use
--viz_aspect 1,1,1.6to deepen the Z perspective
Distance (optional interpretation)
- The instantaneous intensity can be summarized as
|v| = sqrt(X² + Y² + Z²)and mapped to color.
# 1) Start generator on an alternate port
./venv/Scripts/python.exe ./test_stream_gen.py --mode tcp --datatype 123 --clock 0.25 --uf 0.2 --port 9109 --fmt plain
# 2) Start MVP pointing at that port
python ee_mvp.py --source tcp --tcp_host 127.0.0.1 --tcp_port 9109 \
--dt 0.25 --bins 24 --window 180 --ui_port 8060 \
--viz_arrow_mode cone --viz_tail --viz_arrow_gain 1.4 --viz_y_gain 2 --viz_z_gain 4 --viz_aspect 1,1,1.6- Browser didn’t open
- Open manually:
http://127.0.0.1:<UiPort>(default 8050) - Add
-NoBrowserto the demo script if you prefer manual navigation
- Open manually:
- Port in use (TCP or UI)
- Use
-AutoBumpPorts(launcher) or try unused ports:-GenPort 9109 -UiPort 8060 - Check listeners:
netstat -ano -p tcp | findstr :<port>(Windows) orlsof -i :<port>(mac/Linux)
- Use
- PermissionError: [WinError 10013] on generator bind
- Try
--host 0.0.0.0only on trusted networks, or switch to another port - Ensure antivirus/firewall allows Python on that port
- Try
- Missing Python packages
- Install:
python -m pip install -r requirements.txt - Sanity check:
python -c "import importlib.util as u;mods=['numpy','plotly','dash'];print('OK' if all(u.find_spec(m) for m in mods) else 'MISSING')"
- Install:
- Looks too flat
- Try
--viz_y_gain 2 --viz_z_gain 4 --viz_arrow_gain 1.4 --viz_aspect 1,1,1.6
- Try
- Stop everything
- If you used the demo script:
./run-demo.ps1 -Stop - Otherwise: close the app shells or kill by port
- If you used the demo script:
| PowerShell flag | Viewer flag (ee_mvp.py) | Meaning |
|---|---|---|
-VizArrowMode |
--viz_arrow_mode |
Arrow style (cone recommended) |
-VizTail |
--viz_tail |
Draw trajectory tail |
-VizArrowGain |
--viz_arrow_gain |
Overall vector length scale |
-VizYG |
--viz_y_gain |
Slope (Y) visual gain |
-VizZG |
--viz_z_gain |
Curvature (Z) visual gain |
-VizAspect |
--viz_aspect |
Axis aspect ratios x,y,z |
- Generator:
127.0.0.1:9009 - Web UI:
127.0.0.1:8050 - Analysis:
--dt 0.25,--bins 24,--window 180,--alpha 0.2 - Viz:
--viz_arrow_mode cone,--viz_y_gain 1.0,--viz_z_gain 1.0,--viz_arrow_gain 1.0
That’s it. You should get a crisp 3D Arrow that reflects H̃ (level), slope, and curvature over time. If your plot feels flat, tweak the gains; if it stutters, reduce FPS or switch to CSV replay. For issues, open a GitHub Discussion in Install‑Help or file a bug with your OS, steps, and a screenshot.