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

Add new HTTP parameters player-away and opponent-away #26

Open
carsten-wenderdel opened this issue Mar 12, 2024 · 0 comments
Open

Add new HTTP parameters player-away and opponent-away #26

carsten-wenderdel opened this issue Mar 12, 2024 · 0 comments
Labels
rust Needs programming in Rust

Comments

@carsten-wenderdel
Copy link
Owner

carsten-wenderdel commented Mar 12, 2024

Currently all the moves returned via the HTPP API are optimized for money games (via get_move in web_api.rs)
All moves via the C-API are currently optimized for 1-pointers (via best_move in wildbg_api.rs)

In match games we might have different best moves, depending on whether the player should optimize for gammons and backgammons, or not. So we need HTTP parameters for that.

I propose to introduce two new optional parameters player-away and opponent-away (or x-away and o-away). Default value would be 0. If both values are 0, this would indicate money game. If both values are bigger than 0, this would indicate match play. So if we have a 7-pointer and the player on turn has 5 points and the opponent has 4 points, then player-away would be 2 and opponent-away would be 3.

Right now we only have logic for money game and one pointers, so right now we could return the values for 1-pointers once those HTTP parameters are not 0.

This task may need several PRs. Also the web crate might need some refactorings. The logic, which move is best should be handled in the crate logic, so that it could also be used by the C API one day.

@carsten-wenderdel carsten-wenderdel added the rust Needs programming in Rust label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Needs programming in Rust
Projects
None yet
Development

No branches or pull requests

1 participant