Skip to content

Commit

Permalink
Merge pull request #238 from chesslablab/issue/170-Document-the-stock…
Browse files Browse the repository at this point in the history
…fish-command

Documented the /stockfish command
  • Loading branch information
programarivm authored Jan 11, 2024
2 parents d851100 + 4484b16 commit de42d20
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/stockfish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# /stockfish

Uses Stockfish to make a move.

| Name | Description | Required |
| ---- | ----------- | -------- |
| `Skill Level` | The skill level. | Yes |
| `depth` | The number of half moves the engine looks ahead. | Yes |

## Usage

### Example

Start a classical game and ask Stockfish to respond with a move.

```js
ws.send('/start classical stockfish w');
ws.send('/play_lan w e2e4');
ws.send('/stockfish "{\\"Skill Level\\":20}" "{\\"depth\\":12}"');
```

```text
{
"/stockfish": {
"turn": "w",
"pgn": "c5",
"castlingAbility": "KQkq",
"movetext": "1.e4 c5",
"fen": "rnbqkbnr/pp1ppppp/8/2p5/4P3/8/PPPP1PPP/RNBQKBNR w KQkq c6",
"isCapture": false,
"isCheck": false,
"isMate": false,
"isStalemate": false,
"isFivefoldRepetition": false,
"mode": "stockfish",
"variant": "classical"
}
}
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ pages:
- /rematch: rematch.md
- /restart: restart.md
- /inbox: inbox.md
- /stockfish: stockfish.md
theme: readthedocs

0 comments on commit de42d20

Please sign in to comment.