Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -327,8 +327,18 @@ class MagAgent:
|
|
| 327 |
import chess
|
| 328 |
import chess.engine
|
| 329 |
name = "stockfish_analysis"
|
| 330 |
-
description = "Analyzes chess position using Stockfish"
|
| 331 |
-
inputs = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 332 |
output_type = "string"
|
| 333 |
|
| 334 |
def forward(self, fen: str) -> str:
|
|
|
|
| 327 |
import chess
|
| 328 |
import chess.engine
|
| 329 |
name = "stockfish_analysis"
|
| 330 |
+
description = "Analyzes chess position using Stockfish and returns best move"
|
| 331 |
+
inputs = {
|
| 332 |
+
"fen": {
|
| 333 |
+
"type": "string",
|
| 334 |
+
"description": "FEN string of the current chess position"
|
| 335 |
+
},
|
| 336 |
+
"time_limit": {
|
| 337 |
+
"type": "number",
|
| 338 |
+
"description": "Analysis time in seconds",
|
| 339 |
+
"nullable": True
|
| 340 |
+
}
|
| 341 |
+
}
|
| 342 |
output_type = "string"
|
| 343 |
|
| 344 |
def forward(self, fen: str) -> str:
|