Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Official **Java 25 (LTS)** baseline house bot and reference starter template for the [Dice Chess](https://dicechess.net) platform.

Built with [`dicechess-bot-runtime`](https://github.com/rabestro/dicechess-bot-runtime), [`dicechess-engine`](https://github.com/fortemate/dicechess-engine) (JVM API), and Microsoft ONNX Runtime for Java.
Built with [`dicechess-bot-runtime`](https://github.com/fortemate/dicechess-bot-runtime), [`dicechess-engine`](https://github.com/fortemate/dicechess-engine) (JVM API), and Microsoft ONNX Runtime for Java.

## Overview

Expand Down Expand Up @@ -72,7 +72,7 @@ java -jar target/dicechess-bot-java-1.0.5-SNAPSHOT.jar
docker build -t dicechess-bot-java .
docker run -p 8080:8080 \
-e DICECHESS_WEBHOOK_SECRET="your-secret-token" \
ghcr.io/rabestro/dicechess-bot-java:latest
ghcr.io/fortemate/dicechess-bot-java:latest
```

## Registering & Connecting Your Bot ([`bots.jc.id.lv`](https://bots.jc.id.lv))
Expand Down Expand Up @@ -131,7 +131,7 @@ curl -X POST "https://play-api.jc.id.lv/bot/open-to-humans" \
## Creating Custom Strategies

To create a custom bot strategy:
1. Implement the `Strategy` interface in `src/main/java/dicechess/bot/`:
1. Implement the `Strategy` interface in `src/main/java/com/fortemate/dicechess/bot/`:
```java
public class MyCustomStrategy implements Strategy {
@Override
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

This security policy applies to the `dicechess-bot-java` reference house bot service and starter template.
The Dice Chess rules engine and the core platform API/services are governed by the security policies of their respective repositories:
- [dicechess-engine-scala](https://github.com/rabestro/dicechess-engine-scala/security/policy)
- [dicechess-play-api](https://github.com/rabestro/dicechess-play-api/security/policy)
- [dicechess-engine](https://github.com/fortemate/dicechess-engine/security/policy)
- [dicechess-play-api](https://github.com/fortemate/dicechess-play-api/security/policy)

## Reporting a Vulnerability

Expand Down
4 changes: 2 additions & 2 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ description = "Generate Javadoc HTML documentation"
run = "mvn javadoc:javadoc"

[tasks.run]
description = "Run bot application locally"
run = "mvn exec:java -Dexec.mainClass='dicechess.bot.Main'"
description = "Run the Java bot locally (port 8080)"
run = "mvn exec:java -Dexec.mainClass='com.fortemate.dicechess.bot.Main'"
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>lv.id.jc</groupId>
<groupId>com.fortemate</groupId>
<artifactId>dicechess-bot-java</artifactId>
<version>1.0.10-SNAPSHOT</version>
<packaging>jar</packaging>
Expand Down Expand Up @@ -133,7 +133,7 @@
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>dicechess.bot.Main</mainClass>
<mainClass>com.fortemate.dicechess.bot.Main</mainClass>
</transformer>
</transformers>
<filters>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dicechess.bot;
package com.fortemate.dicechess.bot;

import com.sun.net.httpserver.HttpServer;
import lv.id.jc.dicechess.runtime.CustomHandlerServer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dicechess.bot;
package com.fortemate.dicechess.bot;

import ai.onnxruntime.OnnxTensor;
import ai.onnxruntime.OrtEnvironment;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dicechess.bot;
package com.fortemate.dicechess.bot;

import dicechess.engine.domain.GameState;
import dicechess.engine.jvmapi.JvmApi;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dicechess.bot;
package com.fortemate.dicechess.bot;

import lv.id.jc.dicechess.runtime.TurnContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
*
* <h2>Architecture Overview</h2>
* <ul>
* <li>{@link dicechess.bot.Main}: Application entry point. Configures port, loads secrets from env,
* <li>{@link com.fortemate.dicechess.bot.Main}: Application entry point. Configures port, loads secrets from env,
* instantiates evaluator and strategy, and launches the HTTP webhook server.</li>
* <li>{@link dicechess.bot.Strategy}: Core functional interface for decision-making logic.
* <li>{@link com.fortemate.dicechess.bot.Strategy}: Core functional interface for decision-making logic.
* Maps a {@link lv.id.jc.dicechess.runtime.TurnContext} to a list of long algebraic move notations.</li>
* <li>{@link dicechess.bot.OnnxStrategy}: Primary strategy implementation. Parses DFEN via
* <li>{@link com.fortemate.dicechess.bot.OnnxStrategy}: Primary strategy implementation. Parses DFEN via
* {@link dicechess.engine.jvmapi.JvmApi}, expands full multi-move turns via {@link dicechess.engine.jvmapi.JvmApi#legalTurns},
* and scores candidate positions using {@link dicechess.bot.OnnxEvaluator}.</li>
* <li>{@link dicechess.bot.OnnxEvaluator}: Manages ONNX Runtime sessions ({@code OrtSession}) to evaluate
* and scores candidate positions using {@link com.fortemate.dicechess.bot.OnnxEvaluator}.</li>
* <li>{@link com.fortemate.dicechess.bot.OnnxEvaluator}: Manages ONNX Runtime sessions ({@code OrtSession}) to evaluate
* board positions via neural network models (e.g. {@code baseline.onnx}). Falls back gracefully
* to {@link dicechess.engine.jvmapi.JvmApi#evaluate} engine heuristic evaluation if no model file is provided.</li>
* </ul>
Expand All @@ -32,4 +32,4 @@
* @see lv.id.jc.dicechess.runtime.CustomHandlerServer
* @see lv.id.jc.dicechess.runtime.WebhookHandler
*/
package dicechess.bot;
package com.fortemate.dicechess.bot;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dicechess.bot;
package com.fortemate.dicechess.bot;

import lv.id.jc.dicechess.runtime.TurnContext;
import org.junit.jupiter.api.AfterEach;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dicechess.bot;
package com.fortemate.dicechess.bot;

import com.sun.net.httpserver.HttpServer;
import lv.id.jc.dicechess.runtime.CustomHandlerServer;
Expand Down