Skip to content

redcappp/offchat-mesh-simulator

Repository files navigation

OffChat Mesh Simulator

OffChat is an offline-first mesh-network simulator for experimenting with delay-tolerant chat delivery. It models mobile nodes, local radio range, TTL-based message expiry, duplicate suppression, ACK propagation, and semantic compression benchmarking for low-bandwidth communication.

OffChat compression comparison

Highlights

  • Interactive Tkinter mesh simulator with draggable nodes and dynamic range links.
  • Message propagation with per-node buffers, acknowledgements, history tracking, and duplicate suppression.
  • TTL expiry to model stale messages in disconnected networks.
  • Optional screen recording output through OpenCV.
  • Compression benchmark comparing raw text, entropy/Huffman estimate, zlib/LZW, and OffChat semantic token encoding.

Demo

The simulator recording is included as offchat_simulation.mp4.

Tech Stack

  • Python
  • Tkinter
  • NumPy
  • pandas
  • matplotlib
  • OpenCV
  • Pillow

Run Locally

pip install -r requirements.txt
python sim001.py

Controls:

Left click: add node
Drag: move node
Right click: select source/destination
S: send message

Compression Benchmark

python compressor.py

The raw Ubuntu dialogue CSV files are intentionally not committed because they are multi-GB datasets. Place them locally as:

dialogueText_301.csv
dialogueText_196.csv

Repository Notes

Committed files include simulator code, compression code, generated vocabulary, plot, and demo video. Large raw datasets and local caches are ignored.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages