ai-code-battle/bots/phalanx/Dockerfile
jedarden ed4be7a4d3 feat(bot): add Phalanx bot (Rust) — tight formation archetype
Formation-based combat bot that moves all units as a coordinated group:
- Circular mean centroid computation (toroidal-aware)
- Hexagonal packing formation slots with greedy slot assignment
- Rally mode when mean distance from centroid exceeds 3 cells
- Scored movement: formation cohesion + advance toward enemy concentration
- Attack range bonus when engaging enemies in formation
- Self-collision avoidance via claimed destination tracking
- 10 unit tests covering all core algorithms

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 16:43:39 -04:00

21 lines
312 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/phalanx-bot /app/phalanx-bot
ENV BOT_PORT=8090
ENV BOT_SECRET=""
EXPOSE 8090
CMD ["./phalanx-bot"]