Skip to content

"go" function never returns when passed "searchmoves" option #31

@chrisbibat

Description

@chrisbibat

Hello, I have been trying to use the "go" function with various options, and whenever I pass the "searchmoves" option, the function never returns.

I have been trying to get the "searchmoves" option to work with the example code:

import { Engine } from "node-uci"

// async/await
const engine = new Engine("C:/Program Files/Stockfish/stockfish-windows-x86-64-avx2/stockfish/stockfish-windows-x86-64-avx2.exe")
await engine.init()
await engine.isready()
await engine.position("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1")
//console.log('engine ready', engine.id, engine.options)
const result = await engine.go({ depth: 3/*, searchmoves: ["e2e4"]*/ })
console.log("result", result)
await engine.quit()

In the above code, the "searchmoves" options is commented out, and the program prints the results as expected. When I uncomment the "searchmoves" option, the function does not return.

I am passing the "searchmoves" option as an array of strings, as I have read in the documentation. I am using Windows 11, and nodemon, if that info helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions