feat: add gameplay stats and restore Zenith rollout depth
Build and Push Docker Container / build-and-push (push) Successful in 3m6s
Build and Push Docker Container / build-and-push (push) Successful in 3m6s
- Add read-only gameplay statistics with filters and opponent comparisons. - Report move-trace latency percentiles and external timeout counts. - Pair engine latency with the preceding turn to separate timing stages. - Adjust Zenith rollout deepening for its larger timeout reserve. - Bump Zenith to 1.2.0 and document the fix and snake-stats command. - Cover statistics, trace aggregation, rollout depth, and verdict budgets.
This commit is contained in:
@@ -4,6 +4,10 @@ from time import perf_counter
|
||||
from snakes.engine.survival_search import CompactSurvivalSearch
|
||||
|
||||
class BitboardSurvivalMixin:
|
||||
# Remaining budget above which rollouts against at most two enemies may look
|
||||
# one turn deeper. Snakes with a larger timeout reserve lower this threshold.
|
||||
_rollout_deepen_ms = 250.0
|
||||
|
||||
def _future_rollout_bonus(
|
||||
self, move: str, safe_moves: dict, my_body: list, other_snakes: list,
|
||||
food_set: set, is_constrictor: bool, width: int, height: int,
|
||||
@@ -36,7 +40,7 @@ class BitboardSurvivalMixin:
|
||||
depth = min(self._planning_depth, 2 if len(other_snakes) > 1 else 3)
|
||||
if remaining < 90:
|
||||
depth = min(depth, 2)
|
||||
elif remaining > 250 and len(other_snakes) <= 2:
|
||||
elif remaining > self._rollout_deepen_ms and len(other_snakes) <= 2:
|
||||
depth = min(4, depth + 1)
|
||||
raw = self._survival_search_context.search_selected(
|
||||
my_body=my_body,
|
||||
|
||||
Reference in New Issue
Block a user