cm-engine-runner 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -10
- package/package.json +1 -1
- package/src/StockfishRunner.js +2 -2
package/README.md
CHANGED
|
@@ -1,21 +1,30 @@
|
|
|
1
|
-
# cm-
|
|
1
|
+
# cm-engine-runner
|
|
2
|
+
|
|
3
|
+
A JavaScript module to act as a framework for running chess engines in the browser.
|
|
2
4
|
|
|
3
5
|
## Working engines
|
|
4
6
|
|
|
7
|
+
### Stockfish 10
|
|
8
|
+
|
|
9
|
+
- File: `engines/stockfish-v10-niklasf.js`
|
|
10
|
+
- Type: WebWorker
|
|
11
|
+
- Stockfish version: 10
|
|
12
|
+
- Latest Version with WebWorker
|
|
5
13
|
- https://github.com/niklasf/stockfish.js
|
|
6
|
-
- File: [engines/stockfish-v10-niklasf.js]()
|
|
7
|
-
- Type: WebWorker
|
|
8
|
-
- Stockfish version: 10
|
|
9
|
-
- Latest Version with WebWorker
|
|
10
14
|
|
|
15
|
+
### Polyglot opening books
|
|
16
|
+
|
|
17
|
+
- An engine to play moves from a polyglot (.bin) openings file.
|
|
11
18
|
- https://github.com/shaack/cm-polyglot
|
|
12
|
-
- An engine to play moves from a polyglot (.bin) openings file.
|
|
13
19
|
|
|
14
|
-
###
|
|
20
|
+
### Stockfish 14
|
|
21
|
+
|
|
22
|
+
Not implemented yet, does not work in Safari as of 2021-12-12
|
|
23
|
+
|
|
24
|
+
- Type: WASM
|
|
25
|
+
- Stockfish version: 14
|
|
26
|
+
- Latest js version, multithreaded
|
|
15
27
|
- https://github.com/nmrugg/stockfish.js
|
|
16
|
-
- Type: WASM
|
|
17
|
-
- Stockfish version: 14
|
|
18
|
-
- Latest js version, Multithreadded
|
|
19
28
|
|
|
20
29
|
## Stockfish Skill Levels
|
|
21
30
|
|
|
@@ -43,3 +52,7 @@ And depth to ELO: https://chess.stackexchange.com/questions/8123/stockfish-elo-v
|
|
|
43
52
|
- https://www.chessprogramming.org/Opening_Book#Formats
|
|
44
53
|
- https://github.com/evilwan/stakelbase
|
|
45
54
|
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
Find more high quality JavaScript modules from [shaack.com](https://shaack.com)
|
|
58
|
+
on [our projects page](https://shaack.com/works).
|
package/package.json
CHANGED
package/src/StockfishRunner.js
CHANGED
|
@@ -80,8 +80,8 @@ export class StockfishRunner extends EngineRunner {
|
|
|
80
80
|
}
|
|
81
81
|
this.score = tmpScore
|
|
82
82
|
}
|
|
83
|
-
// match = line.match(/^bestmove ([a-h][1-8])([a-h][1-8])([
|
|
84
|
-
match = line.match(/^bestmove ([a-h][1-8])([a-h][1-8])([
|
|
83
|
+
// match = line.match(/^bestmove ([a-h][1-8])([a-h][1-8])([qrbn])?/) // ponder is not always included
|
|
84
|
+
match = line.match(/^bestmove ([a-h][1-8])([a-h][1-8])([qrbn])?( ponder ([a-h][1-8])?([a-h][1-8])?)?/)
|
|
85
85
|
if (match) {
|
|
86
86
|
this.engineState = ENGINE_STATE.READY
|
|
87
87
|
if (match[4] !== undefined) {
|