Skip to content

Commit

Permalink
Documented the /extract command
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Jan 28, 2025
1 parent c5ac6fd commit 2c1bee6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
42 changes: 42 additions & 0 deletions docs/extract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# /extract

Extracts knowledge from a game by using the Steinitz evaluation.

## `variant`

The chess variant as per these options.

- `classical` chess, also known as standard or slow chess.
- `960` is the same as classical chess except that the starting position of the pieces is randomized.
- `dunsany` is an asymmetric variant in which Black has the standard chess army and White has 32 pawns.
- `losing` chess, the objective of each player is to lose all of their pieces or be stalemated.
- `racing-kings` consists of being the first player to move their king to the eighth row.
- `capablanca` incorporates two new pieces, the archbishop and the chancellor, and is played on a 10×8 board.
- `capablanca-fischer` is a mix of Capablanca chess and Chess960.

## `movetext`

The sequence of moves played in the game.

---

### Usage

#### Example

```js
ws.send('/extract "{\"variant\":\"classical\",\"movetext\":\"1.e4 e5 2.Nf3 Nc6 3.Bc4\"}"');
```

```text
{
"/extract": [
0,
0.5,
0,
1,
0.25,
1
]
}
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ nav:
- /takeback: takeback.md
- Parameterized:
- /accept: accept.md
- /extract: extract.md
- /heuristic: heuristic.md
- /leave: leave.md
- /legal: legal.md
Expand Down

0 comments on commit 2c1bee6

Please sign in to comment.