Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,16 +10,48 @@ license: cc-by-nc-4.0
|
|
| 10 |
|
| 11 |
# ⚡ Nexus-Core Inference API
|
| 12 |
|
| 13 |
-
Fast and efficient chess move prediction
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
| 16 |
|
| 17 |
-
|
| 18 |
-
- **Speed:** Ultra-fast inference (~0.5-1s per move)
|
| 19 |
-
- **Strength:** ~2000-2200 ELO
|
| 20 |
-
- **Architecture:** Pure CNN value network
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
### `POST /get-move`
|
| 25 |
|
|
@@ -43,18 +75,91 @@ Fast and efficient chess move prediction API powered by Nexus-Core v2.0.
|
|
| 43 |
}
|
| 44 |
```
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
## 🔧 Parameters
|
| 47 |
|
| 48 |
-
- **fen** (required): Board position
|
| 49 |
-
- **depth** (optional): 1-6, default 4
|
| 50 |
-
- **time_limit** (optional): Max time in
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
---
|
| 59 |
|
| 60 |
-
Part of GambitFlow
|
|
|
|
| 10 |
|
| 11 |
# ⚡ Nexus-Core Inference API
|
| 12 |
|
| 13 |
+
Fast and efficient chess move prediction powered by Nexus-Core v2.0.
|
| 14 |
|
| 15 |
+
[](https://huggingface.co/GambitFlow/Nexus-Core)
|
| 16 |
+
[](https://huggingface.co/GambitFlow/Nexus-Core)
|
| 17 |
+
[](https://huggingface.co/GambitFlow/Nexus-Core)
|
| 18 |
|
| 19 |
+
## 🎯 Model Details
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
**Nexus-Core** is a lightweight ResNet-based chess engine optimized for speed:
|
| 22 |
+
|
| 23 |
+
- **Model:** [GambitFlow/Nexus-Core](https://huggingface.co/GambitFlow/Nexus-Core)
|
| 24 |
+
- **Parameters:** 13 Million
|
| 25 |
+
- **Architecture:** Pure CNN (ResNet with 10 blocks)
|
| 26 |
+
- **Input:** 12-channel board representation
|
| 27 |
+
- **Training Data:** [GambitFlow/Elite-Data](https://huggingface.co/datasets/GambitFlow/Elite-Data) (5M+ positions)
|
| 28 |
+
- **Strength:** 2000-2200 ELO estimated
|
| 29 |
+
|
| 30 |
+
## 🔬 Search Algorithm
|
| 31 |
+
|
| 32 |
+
Efficient alpha-beta implementation with essential optimizations:
|
| 33 |
+
|
| 34 |
+
### Core Features
|
| 35 |
+
- **Alpha-Beta Pruning** [^1] - Classic minimax with cutoffs
|
| 36 |
+
- **Iterative Deepening** [^2] - Progressive depth increase
|
| 37 |
+
- **Quiescence Search** [^3] - Tactical sequence resolution
|
| 38 |
+
- **Simple Transposition Table** - 100K position cache
|
| 39 |
+
|
| 40 |
+
### Move Ordering
|
| 41 |
+
- **MVV-LVA** [^4] - Most Valuable Victim - Least Valuable Attacker
|
| 42 |
+
- **Promotion prioritization**
|
| 43 |
+
- **Check detection**
|
| 44 |
+
|
| 45 |
+
## 📊 Performance
|
| 46 |
+
|
| 47 |
+
| Metric | Value | Environment |
|
| 48 |
+
|--------|-------|-------------|
|
| 49 |
+
| **Depth 4 Search** | ~0.5-1 second | HF Spaces CPU |
|
| 50 |
+
| **Average Nodes** | 5K-15K per move | Typical positions |
|
| 51 |
+
| **Memory Usage** | ~2GB RAM | Peak inference |
|
| 52 |
+
| **Response Time** | 500-1000ms | 95th percentile |
|
| 53 |
+
|
| 54 |
+
## 📡 API Endpoints
|
| 55 |
|
| 56 |
### `POST /get-move`
|
| 57 |
|
|
|
|
| 75 |
}
|
| 76 |
```
|
| 77 |
|
| 78 |
+
### `GET /health`
|
| 79 |
+
|
| 80 |
+
Health check endpoint.
|
| 81 |
+
|
| 82 |
## 🔧 Parameters
|
| 83 |
|
| 84 |
+
- **fen** (required): Board position in FEN notation
|
| 85 |
+
- **depth** (optional): Search depth (1-6, default: 4)
|
| 86 |
+
- **time_limit** (optional): Max time in milliseconds (1000-10000, default: 3000)
|
| 87 |
+
|
| 88 |
+
## 🚀 Quick Start
|
| 89 |
+
|
| 90 |
+
```python
|
| 91 |
+
import requests
|
| 92 |
+
|
| 93 |
+
response = requests.post(
|
| 94 |
+
"https://YOUR-SPACE.hf.space/get-move",
|
| 95 |
+
json={
|
| 96 |
+
"fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
|
| 97 |
+
"depth": 4
|
| 98 |
+
}
|
| 99 |
+
)
|
| 100 |
+
|
| 101 |
+
data = response.json()
|
| 102 |
+
print(f"Best move: {data['best_move']}")
|
| 103 |
+
print(f"Evaluation: {data['evaluation']}")
|
| 104 |
+
```
|
| 105 |
+
|
| 106 |
+
## 💻 Use Cases
|
| 107 |
|
| 108 |
+
Perfect for:
|
| 109 |
+
- **Online chess platforms** - Fast response times
|
| 110 |
+
- **Training applications** - Consistent ~2000 ELO play
|
| 111 |
+
- **Mobile apps** - Lightweight inference
|
| 112 |
+
- **Rapid/Blitz games** - Quick move generation
|
| 113 |
|
| 114 |
+
## 📚 Research References
|
| 115 |
+
|
| 116 |
+
[^1]: **Alpha-Beta Pruning**: Knuth, D. E., & Moore, R. W. (1975). "An analysis of alpha-beta pruning". *Artificial Intelligence*, 6(4), 293-326.
|
| 117 |
+
|
| 118 |
+
[^2]: **Iterative Deepening**: Korf, R. E. (1985). "Depth-first iterative-deepening: An optimal admissible tree search". *Artificial Intelligence*, 27(1), 97-109.
|
| 119 |
+
|
| 120 |
+
[^3]: **Quiescence Search**: Shannon, C. E. (1950). "Programming a computer for playing chess". *Philosophical Magazine*, 41(314), 256-275.
|
| 121 |
+
|
| 122 |
+
[^4]: **MVV-LVA**: Hyatt, R. M., Gower, A. E., & Nelson, H. L. (1990). "Cray Blitz". *Computers, Chess, and Cognition*, 111-130.
|
| 123 |
+
|
| 124 |
+
## 📖 Related Work
|
| 125 |
+
|
| 126 |
+
- **Stockfish**: https://stockfishchess.org/ - Open-source chess engine
|
| 127 |
+
- **Fruit**: Letouzey, F. (2005). "Fruit 2.1 source code". http://www.fruitchess.com/
|
| 128 |
+
- **Crafty**: Hyatt, R. M. (1996-2023). "Crafty Chess Program". https://www.craftychess.com/
|
| 129 |
+
|
| 130 |
+
## 🏆 Model Lineage
|
| 131 |
+
|
| 132 |
+
**GambitFlow AI Engine Series:**
|
| 133 |
+
1. Nexus-Nano (2.8M) - Ultra-fast baseline
|
| 134 |
+
2. **Nexus-Core (13M)** - Balanced performance ✨
|
| 135 |
+
3. Synapse-Base (38.1M) - State-of-the-art
|
| 136 |
+
|
| 137 |
+
## ⚖️ Comparison
|
| 138 |
+
|
| 139 |
+
| Feature | Nexus-Core | Synapse-Base |
|
| 140 |
+
|---------|------------|--------------|
|
| 141 |
+
| Speed | ⚡⚡⚡ Ultra-fast | ⚡⚡ Fast |
|
| 142 |
+
| Strength | 2000-2200 ELO | 2400-2600 ELO |
|
| 143 |
+
| Tactics | Basic | Advanced |
|
| 144 |
+
| Search Depth | 4-5 | 5-7 |
|
| 145 |
+
| Use Case | Online/Mobile | Tournament |
|
| 146 |
+
|
| 147 |
+
---
|
| 148 |
+
|
| 149 |
+
**Developed by:** [GambitFlow](https://huggingface.co/GambitFlow) / Rafsan1711
|
| 150 |
+
**License:** CC BY-NC 4.0
|
| 151 |
+
**Citation:**
|
| 152 |
+
|
| 153 |
+
```bibtex
|
| 154 |
+
@software{gambitflow_nexus_core_2025,
|
| 155 |
+
author = {Rafsan1711},
|
| 156 |
+
title = {Nexus-Core: Lightweight ResNet Chess Engine},
|
| 157 |
+
year = {2025},
|
| 158 |
+
publisher = {Hugging Face},
|
| 159 |
+
url = {https://huggingface.co/GambitFlow/Nexus-Core}
|
| 160 |
+
}
|
| 161 |
+
```
|
| 162 |
|
| 163 |
---
|
| 164 |
|
| 165 |
+
Part of the **GambitFlow Project** 🚀♟️
|