Implement a new Java bot that applies multi-player game theory: in N>2 games, always direct all units toward the current score leader rather than the nearest enemy. This creates a natural kingmaker dynamic that prevents any single bot from running away with the game. Strategy: - Identify all visible opponents and their scores (cores count as proxy) - Pick primary target: opponent with highest inferred score (tiebreak: nearest) - Send all bots toward primary target's centroid (mean of visible bots + cores) - Exception: if own core is under threat (enemy bot within 6 tiles), detach 2 bots to defend - In 2-player games: fall back to straight aggressor strategy Novelty: No current bot does multi-player score-aware target selection. Most bots target nearest enemy, which lets a distant leader accumulate score unmolested. Leader-targeter explicitly models the N-player problem. Co-Authored-By: Claude <noreply@anthropic.com>
23 lines
456 B
Docker
23 lines
456 B
Docker
# Build stage
|
|
FROM eclipse-temurin:21-jdk-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
COPY pom.xml ./
|
|
COPY src ./src
|
|
|
|
# Install Maven and build
|
|
RUN apk add --no-cache maven && \
|
|
mvn clean package -DskipTests
|
|
|
|
# Runtime stage
|
|
FROM eclipse-temurin:21-jre-alpine
|
|
|
|
WORKDIR /app
|
|
COPY --from=builder /app/target/leader-targeter-bot-1.0.0.jar /app/leader-targeter-bot.jar
|
|
|
|
ENV BOT_PORT=8085
|
|
ENV BOT_SECRET=""
|
|
|
|
EXPOSE 8085
|
|
|
|
CMD ["java", "-jar", "leader-targeter-bot.jar"]
|