Comments (4)
Definitely good ideas - thank you. I think I can do chained /standard
requests to construct some prefix of the mainline so that no change in the API is needed. The first 3-5 moves should be enough for any reasonable use-case I think.
from lila-tablebase.
The rate limiting on this endpoint is quite strict (currently one request per minute with bursts of 5), because computing the mainline is fairly expensive. It needs to hit the tablebase for (just about) every legal move at every step, which can mean hundreds or thousands of probes.
To clarify, do you need the entire line, or just the best move?
from lila-tablebase.
Thanks for the clarification.
The first couple of moves would be best, but I'm doing a workaround now:
- If I don't get rate limited, then I'm giving the full line
- If I get rate limited, I give the line as only the best move from the response from
/standard
endpoint
I'm planning to push the update soon so I can monitor how is it doing.
from lila-tablebase.
Sounds good. Another idea would be adding a new parameter like ?limit=5
for /standard/mainline
(and I will, if you would use that), but the rate limiting is done outside of this server (by nginx), so it can't really take that into account.
Alternatively, how about always just doing sth like 5 /standard
requests in sequence? It's a little bit of HTTP overhead, but avoids the expensive full mainline probes and works with the existing limits.
from lila-tablebase.
Related Issues (8)
- Atomic Tablebases Incorrectly Assessing Insufficient Mating Material HOT 1
- What's the rate limit for `/standard` endpoint? HOT 2
- `maybe-win` and `maybe-loss` categories HOT 2
- Problems with connection to tablebaseserver HOT 2
- feature request HOT 1
- Feature Request -> Multiple positions with one request HOT 1
- Consistency between /standard and /standard/mainline endpoints HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lila-tablebase.