Package com.fortemate.dicechess.bot
package com.fortemate.dicechess.bot
Dice Chess Java Bot Starter Template & Reference Implementation.
This package provides an end-to-end reference implementation for writing Dice Chess bots
in Java 25+. It demonstrates how to interface with the dicechess-bot-runtime Webhook server,
parse game positions and generate legal turns using the dicechess-engine JvmApi facade,
and evaluate positions using an ONNX neural network model or built-in engine heuristics.
Architecture Overview
Main: Application entry point. Configures port, loads secrets from env, instantiates evaluator and strategy, and launches the HTTP webhook server.Strategy: Core functional interface for decision-making logic. Maps aTurnContextto a list of long algebraic move notations.OnnxStrategy: Primary strategy implementation. Parses DFEN viaJvmApi, expands full multi-move turns viaJvmApi.legalTurns(GameState), and scores candidate positions usingOnnxEvaluator.OnnxEvaluator: Manages ONNX Runtime sessions (OrtSession) to evaluate board positions via neural network models (e.g.baseline.onnx). Falls back gracefully toJvmApi.evaluate(GameState, int)engine heuristic evaluation if no model file is provided.
Environment Variables
| Variable | Default | Description |
|---|---|---|
DICECHESS_WEBHOOK_SECRET | Empty | HMAC secret key for verifying incoming webhook requests. |
MODEL_PATH | models/baseline.onnx | Path to the ONNX model file on disk. |
PORT | 8080 | HTTP server binding port for incoming webhook deliveries. |
- See Also:
-
ClassDescriptionEntry point for the Dice Chess Java bot starter template.Evaluates board positions using an ONNX value model or falls back to engine heuristics.Strategy implementation using an ONNX value model (or fallback engine evaluation) over every legal full turn available from the current position, via the engine's
JvmApifacade.Common functional interface for Java bot strategies mapping a TurnContext to move notations.