Distributed compute worker for Ants at Work colony
Project description
Ants Worker
Join the colony. Share your compute.
pip install ants-worker
ants-worker join
That's it. You're now part of the swarm.
How It Works
┌─────────────────────────────────────────────────────────────────────────┐
│ YOUR MACHINE │
│ │
│ $ ants-worker join │
│ │
│ ┌──────────────┐ │
│ │ ants-worker │──────┐ │
│ │ │ │ 1. Register → get token │
│ │ Kangaroo │ │ 2. Sense cold regions │
│ │ Algorithm │ │ 3. Compute distinguished points │
│ │ │ │ 4. Deposit results │
│ │ (CPU/GPU) │ │ 5. Check for collision │
│ └──────────────┘ │ 6. Repeat │
│ ▼ │
└─────────────────────────┼────────────────────────────────────────────────┘
│
│ HTTPS + Bearer Token
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ api.ants-at-work.com │
│ (Cloudflare Edge + D1) │
│ │
│ Collision detection happens here. When tame and wild kangaroos │
│ land on the same point → private key found. │
└─────────────────────────────────────────────────────────────────────────┘
No manual configuration. No copying tokens. Just join.
Commands
ants-worker join # Register and start working
ants-worker join -t wild # Run as wild kangaroo (default: tame)
ants-worker status # Check connection and worker ID
ants-worker leave # Unregister (delete ~/.ants/config.json)
ants-worker info # System/GPU info
ants-worker benchmark # Test performance
Hardware Acceleration
AMD Ryzen AI (NEU-X, Motus)
Full support for AMD Ryzen AI processors with XDNA NPU:
# Auto-detects Ryzen AI and optimizes
ants-worker join
# Check detected hardware
ants-worker info --detailed
# Force specific backend
ants-worker join -b amd_npu # Use NPU
ants-worker join -b amd_rocm # Use integrated GPU
ants-worker join -b parallel_cpu --workers 16 # Use all CPU cores
Supported processors:
- AMD Ryzen AI Max 395 (126 TOPS)
- AMD Ryzen AI Max 385 (77 TOPS)
- AMD Ryzen AI 9 HX 370 (50 TOPS)
- AMD Ryzen AI 300 series
NVIDIA GPU
# Install CUDA support
pip install ants-worker[cuda]
# Uses CUDA automatically
ants-worker join
Kangaroo Binary (Fastest)
With Kangaroo binary: ~1B ops/sec.
# Linux with NVIDIA GPU
git clone https://github.com/JeanLucPons/Kangaroo.git
cd Kangaroo && make gpu=1 && cd ..
export KANGAROO_BIN=$(pwd)/Kangaroo/kangaroo
ants-worker join
Run in Background
Screen/tmux
screen -S ants
ants-worker join
# Ctrl+A, D to detach
Systemd (Linux)
sudo tee /etc/systemd/system/ants-worker.service << 'EOF'
[Unit]
Description=Ants Worker
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/ants-worker join
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable --now ants-worker
Cloud Providers
Works on Vast.ai, Lambda Labs, RunPod, or any Linux machine:
apt update && apt install -y python3-pip
pip install ants-worker
ants-worker join
What Are We Solving?
Bitcoin Puzzle #71 - a 7.1 BTC bounty.
Target: Find the private key for address 1PWo3JeB9jrGwfHDNpdGK54CRas7fsVzXU
The key is between 2^70 and 2^71. Using Pollard's Kangaroo algorithm across many workers, we find it together.
Stigmergic Coordination
Workers coordinate through the environment (not direct messaging):
- Sense - Query cold regions (low pheromone = unexplored)
- Decide - Pick a region to explore
- Mark - Deposit "working" pheromone
- Work - Run Kangaroo algorithm
- Deposit - Leave results + exploration pheromone
- Repeat
No central coordinator. Intelligence emerges.
Architecture
┌───────────────────────────────────────┐
│ AGENTVERSE │
│ Queen ◄──► Scouts ◄──► Hunters │
│ (FET economy, agent messaging) │
└─────────────────┬─────────────────────┘
│
┌─────────────────▼─────────────────────┐
│ api.ants-at-work.com (CF + D1) │
│ Fast coordination, collision det. │
└─────────────────┬─────────────────────┘
│
┌───────────────────────┼───────────────────────┐
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Worker 1 │ │ Worker 2 │ │ Worker N │
└──────────┘ └──────────┘ └──────────┘
│
┌─────────────────▼─────────────────────┐
│ TypeDB Cloud (ants-colony) │
│ Permanent storage, patterns │
└───────────────────────────────────────┘
FAQ
Is this safe? Yes. You get a unique token that can only submit work results.
Resources? Minimal bandwidth (~KB/min). CPU/GPU usage configurable. Stop with Ctrl+C.
Where's my config?
~/.ants/config.json - contains your token and worker ID.
Tame vs Wild? Both needed. Run one of each for maximum contribution:
ants-worker join -t tame &
ants-worker join -t wild &
How do I check status?
ants-worker status
Development
git clone https://github.com/ants-at-work/ants-worker
cd ants-worker
pip install -e ".[dev]"
pytest
See docs/stigmergy-compute.md for architecture details.
Links
- Website: https://ants-at-work.com
- Gateway: https://api.ants-at-work.com/health
- Issues: https://github.com/ants-at-work/ants-worker/issues
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ants_worker-0.2.0.tar.gz.
File metadata
- Download URL: ants_worker-0.2.0.tar.gz
- Upload date:
- Size: 43.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
638bc1da385a61ce2831fab73f87b388519edc249b967a2337bbce9214aa8296
|
|
| MD5 |
c351f8fee41229fe3afb9b350f2d74e0
|
|
| BLAKE2b-256 |
a9d4927d9ffff76157100ae60669ee341faf31f6e8f55889fcefbd4ed22e128b
|
File details
Details for the file ants_worker-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ants_worker-0.2.0-py3-none-any.whl
- Upload date:
- Size: 51.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0444c9902fa5f8f73b9b6b438249e616b1df65be5d43daeeba554576385c175f
|
|
| MD5 |
a1fad67a5ec143953fcdb369c2e3615d
|
|
| BLAKE2b-256 |
1ce20f15b4a2da7cfec12c566bdfa8b3165b30c3c820eeebf386c0ee6ab716dd
|