Phase 2 Implementation: - HMAC authentication for engine-to-bot communication - Request signing with timestamp anti-replay - Response signing for integrity verification - HTTP bot client with timeout and crash detection - Per-turn 3s timeout, 10 consecutive failure crash threshold - Move validation (position ownership, direction validity) - Integration tests for HTTP match execution - 6 strategy bots in 6 languages: - RandomBot (Python): Random valid moves - rating floor - GathererBot (Go): Energy-focused with combat avoidance - RusherBot (Rust): Aggressive core rushing via BFS - GuardianBot (PHP): Defensive core protection - SwarmBot (TypeScript): Formation-based group combat - HunterBot (Java): Target isolation and hunting All bots include: - HMAC signature verification - Dockerfile for containerization - README documentation All engine tests passing (32+ tests) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
309 B
Docker
21 lines
309 B
Docker
# Build stage
|
|
FROM rust:1.85-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
COPY Cargo.toml ./
|
|
COPY src ./src
|
|
|
|
RUN cargo build --release
|
|
|
|
# Runtime stage
|
|
FROM alpine:3.21
|
|
|
|
WORKDIR /app
|
|
COPY --from=builder /app/target/release/rusher-bot /app/rusher-bot
|
|
|
|
ENV BOT_PORT=8082
|
|
ENV BOT_SECRET=""
|
|
|
|
EXPOSE 8082
|
|
|
|
CMD ["./rusher-bot"]
|