Metadata-Version: 2.4
Name: devatrix
Version: 0.1.0
Summary: Devatrix SNN: An advanced, batched Spiking Neural Network core engine
Author-email: Devesh <devesh@example.com>
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.0
Dynamic: license-file

# Devatrix SNN Core

Devatrix SNN is a high-performance, batched, and vectorized Spiking Neural Network (SNN) engine built in Python using NumPy.

## Features

- **Batched Simulation:** Run simulations across multiple batch samples concurrently.
- **Leaky Integrate-and-Fire (LIF) Neurons:** Features leak decay, homeostatic threshold fatigue, and post-spike reset hyperpolarization.
- **Refractory Cooldowns:** Correct biological modeling of neural refractory periods.
- **Dual Learning (Plasticity):**
  - Unsupervised sequence-based learning via **Spike-Timing-Dependent Plasticity (STDP)**.
  - Global reinforcement learning via **Dopamine-modulated eligibility traces**.
- **Synaptic Masking:** Connect arbitrary topologies (dense, sparse, or recurrent).

---

## Installation

### From Source (Local Development)
To install the package in editable mode locally:
```bash
pip install -e .
```

### Build Package for PyPI
To build package distribution files for PyPI:
```bash
python3 -m pip install --upgrade build twine
python3 -m build
```

---

## Quick Start Example

```python
import numpy as np
from devatrix import DevatrixUltimateEngine

# Initialize engine for a batch size of 2, and 5 neurons
engine = DevatrixUltimateEngine(batch_size=2, num_neurons=5, inhibitory_ratio=0.2)

# Connect neuron 0 to neuron 1 with a weight of 1.5
engine.connect(src=0, tgt=1, weight=1.5)

# Input pulse inputs for 2 batch samples
x_batch = np.array([
    [1.5, 0.0, 0.0, 0.0, 0.0],
    [0.0, 0.0, 0.0, 0.0, 0.0]
])

# Step the network forward
spikes = engine.forward(x_batch)
print("Output Spikes:\n", spikes)
```

## License

MIT License
