]> git.sesse.net Git - remoteglot/blob - www/js/hashprobe.proto
Add support for probing the engine hash (requires gRPC-patched Stockfish).
[remoteglot] / www / js / hashprobe.proto
1 syntax = "proto3";
2 package hashprobe;
3
4 message HashProbeRequest {
5         string fen = 1;
6 }
7 message HashProbeResponse {
8         HashProbeLine root = 2;
9         repeated HashProbeLine line = 1;
10 }
11 message HashProbeLine {
12         HashProbeMove move = 1;
13         bool found = 2;
14
15         repeated HashProbeMove pv = 3;
16         HashProbeScore value = 4;  // Dynamic eval (may be inexact, see the "bound" field)
17         HashProbeScore eval = 5;  // Static eval
18         int32 depth = 6;
19
20         enum ValueBound {
21                 BOUND_NONE = 0;
22                 BOUND_UPPER = 1;
23                 BOUND_LOWER = 2;
24                 BOUND_EXACT = 3;
25         };
26         ValueBound bound = 7;
27 }
28
29 message HashProbeMove {
30         string from_sq = 1;  // a1, a2, etc.
31         string to_sq = 2;
32         string promotion = 3;  // Q, R, etc.
33 }
34 message HashProbeScore {
35         enum ScoreType {
36                 SCORE_CP = 0;
37                 SCORE_MATE = 1;
38         }
39         ScoreType score_type = 1;
40         int32 score_cp = 2;
41         int32 score_mate = 3;
42 }
43
44 service HashProbe {
45         rpc Probe(HashProbeRequest) returns (HashProbeResponse) {}
46 }