File size: 5,072 Bytes
a3ed31f f1c1749 a3ed31f 474be13 a3ed31f f1c1749 474be13 f1c1749 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
---
title: Nexus-Nano Inference API
emoji: π
colorFrom: yellow
colorTo: red
sdk: docker
pinned: false
license: gpl-3.0
---
# π Nexus-Nano Inference API
Ultra-lightweight chess engine for instant responses.
[](https://huggingface.co/GambitFlow/Nexus-Nano)
[](https://huggingface.co/GambitFlow/Nexus-Nano)
[](https://huggingface.co/GambitFlow/Nexus-Nano)
## π― Model Details
**Nexus-Nano** is the fastest model in the GambitFlow series:
- **Model:** [GambitFlow/Nexus-Nano](https://huggingface.co/GambitFlow/Nexus-Nano)
- **Parameters:** 2.8 Million
- **Architecture:** Compact ResNet (6 blocks)
- **Input:** 12-channel board representation
- **Training Data:** [GambitFlow/Elite-Data](https://huggingface.co/datasets/GambitFlow/Elite-Data) (5M+ positions)
- **Strength:** 1800-2000 ELO estimated
## π¬ Search Algorithm
Ultra-minimal implementation for maximum speed:
### Core Features
- **Pure Alpha-Beta Pruning** [^1] - Classic minimax
- **Simple MVV-LVA Ordering** [^2] - Capture prioritization
- **No Transposition Table** - Zero memory overhead
- **Iterative Deepening** - Anytime algorithm
### Design Philosophy
- **Minimal overhead** - Direct evaluation calls
- **Speed over strength** - Optimized for response time
## π Performance
| Metric | Value | Environment |
|--------|-------|-------------|
| **Depth 3 Search** | ~0.2-0.5 seconds | HF Spaces CPU |
| **Average Nodes** | 2K-5K per move | Typical positions |
| **Memory Usage** | ~1GB RAM | Peak inference |
| **Response Time** | 200-500ms | 95th percentile |
## π‘ API Endpoints
### `POST /get-move`
**Request:**
```json
{
"fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
"depth": 3
}
```
**Response:**
```json
{
"best_move": "e2e4",
"evaluation": 0.18,
"depth_searched": 3,
"nodes_evaluated": 2847,
"time_taken": 234
}
```
### `GET /health`
Health check endpoint.
## π§ Parameters
- **fen** (required): Board position in FEN notation
- **depth** (optional): Search depth (1-5, default: 3)
## π Quick Start
```python
import requests
response = requests.post(
"https://YOUR-SPACE.hf.space/get-move",
json={
"fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
"depth": 3
}
)
data = response.json()
print(f"Best move: {data['best_move']} (took {data['time_taken']}ms)")
```
## π» Use Cases
Perfect for:
- **Bullet chess (1+0, 2+1)** - Lightning-fast moves
- **Chess tutorials** - Instant move suggestions
- **Mobile applications** - Minimal resource usage
- **Live analysis** - Real-time position evaluation
- **Casual play** - Good enough for beginners/intermediate
## π Research References
[^1]: **Alpha-Beta Pruning**: Knuth, D. E., & Moore, R. W. (1975). "An analysis of alpha-beta pruning". *Artificial Intelligence*, 6(4), 293-326.
[^2]: **MVV-LVA**: Hyatt, R. M., Gower, A. E., & Nelson, H. L. (1990). "Cray Blitz". *Computers, Chess, and Cognition*, 111-130.
## π Minimalist Design Inspiration
- **MicroMax** - Mulder, H. G. (2007). "1433-byte chess program". https://home.hccnet.nl/h.g.muller/max-src2.html
- **Sunfish** - Fiekas, N. (2013). "Simple chess engine in Python". https://github.com/thomasahle/sunfish
- **Stockfish Lite** - Simplified versions for embedded systems
## π Model Lineage
**GambitFlow AI Engine Series:**
1. **Nexus-Nano (2.8M)** - Ultra-fast baseline β¨
2. Nexus-Core (13M) - Balanced performance
3. Synapse-Base (38.1M) - State-of-the-art
## βοΈ Comparison Table
| Feature | Nexus-Nano | Nexus-Core | Synapse-Base |
|---------|------------|------------|--------------|
| **Speed** | β‘β‘β‘β‘ Lightning | β‘β‘β‘ Ultra-fast | β‘β‘ Fast |
| **Strength** | 1800-2000 ELO | 2000-2200 ELO | 2400-2600 ELO |
| **Memory** | 1GB | 2GB | 5GB |
| **Depth** | 3-4 | 4-5 | 5-7 |
| **Response** | 200-500ms | 500-1000ms | 1000-2000ms |
| **Best for** | Bullet/Mobile | Online/Rapid | Tournament/Analysis |
## π― When to Use
Choose **Nexus-Nano** if:
- β
Speed is critical (bullet games, live demos)
- β
Resource-constrained environment (mobile, embedded)
- β
Playing against beginners/intermediate (1800-2000 ELO)
- β
You need instant move suggestions
Choose **Nexus-Core** if:
- β‘ You want balanced speed and strength
- β‘ Playing online rapid/blitz games
Choose **Synapse-Base** if:
- π Maximum strength is priority
- π Tournament-level play
- π Deep position analysis needed
---
**Developed by:** [GambitFlow](https://huggingface.co/GambitFlow) / Rafsan1711
**License:** GPL v3 (GNU General Public License Version 3)
**Citation:**
```bibtex
@software{gambitflow_nexus_nano_2025,
author = {Rafsan1711},
title = {Nexus-Nano: Ultra-Lightweight Chess Engine},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/GambitFlow/Nexus-Nano}
}
```
---
Part of the **GambitFlow Project** β‘βοΈ |