Rafs-an09002 commited on
Commit
f1c1749
Β·
verified Β·
1 Parent(s): 6dd05e0

Update README.md

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