Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse cli arguments and use them as UCI commands #370

Merged
merged 4 commits into from
Aug 21, 2023
Merged

Conversation

eduherminio
Copy link
Member

Parse cli arguments and feed them to the engine as if they were uci commands.
This allows to easily do:

dotnet run -c Release "position fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" "perft 5"

dotnet run -c Release "position startpos" "go depth 6"

./Lynx.Cli.exe bench

# etc.

There's a catch: you can't pass "exit" to terminate the execution at the end since LynxDriver reads the commands asynchronously in case a stop (or 'quit') are requested by GUIs, so that would happen immediately.
So can't really create an action with this

eduherminio and others added 4 commits August 21, 2023 02:18
Each argument (surrounded by " if they have more than one word) will be executed secuentially
@eduherminio eduherminio changed the title Parse cli arguments Parse cli arguments and use them as UCI commands Aug 21, 2023
@eduherminio eduherminio changed the title Parse cli arguments and use them as UCI commands Parse cli arguments and use them as UCI commands Aug 21, 2023
@eduherminio eduherminio marked this pull request as ready for review August 21, 2023 00:53
@eduherminio eduherminio merged commit f97e38c into main Aug 21, 2023
@eduherminio eduherminio deleted the accept-args branch August 21, 2023 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant