Skip to content

Commit

Permalink
Add Stockfish v16.1 as an option
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakorr committed Oct 3, 2024
1 parent e88510b commit 7e4522c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
23 changes: 23 additions & 0 deletions assets/js/acas-backend-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,29 @@ class BackendInstance {
}, 100);
break;

case 'stockfish-16-1-wasm':
const stockfish2 = new Worker('assets/libraries/stockfish-16.1.wasm/stockfish-16.1.js');
let stockfish2_loaded = false;

stockfish2.onmessage = async e => {
if(!stockfish2_loaded) {
stockfish2_loaded = true;

this.engines.push({
'type': profileChessEngine,
'engine': (method, a) => stockfish2[method](...a),
'sendMsg': msg => stockfish2.postMessage(msg),
'worker': stockfish2,
profile
});

this.engineStartNewGame('chess', profile);
}

msgHandler(e.data);
};
break;

default: // Fairy Stockfish NNUE WASM
const stockfish = new Worker('assets/libraries/fairy-stockfish-nnue.wasm/stockfishWorker.js');
let stockfish_loaded = false;
Expand Down
8 changes: 8 additions & 0 deletions assets/libraries/stockfish-16.1.wasm/stockfish-16.1.js

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<input type="text" additional-type="dropdown" data-key="chessEngine" data-default-value="fairy-stockfish-nnue-wasm" placeholder="Fairy Stockfish NNUE WASM"><div class="dropdown-icon"></div>
<div class="dropdown-list-container">
<div class="dropdown-item" data-value="fairy-stockfish-nnue-wasm">Fairy Stockfish v14 NNUE WASM</div>
<div class="dropdown-item" data-value="stockfish-16-1-wasm">Stockfish v16.1 WASM</div>
<div class="dropdown-item" data-value="lc0">Lc0 v29</div>
</div>
</div></div>
Expand Down

0 comments on commit 7e4522c

Please sign in to comment.