Source code for CodinGame's Spring Challenge 2023 event.
https://www.codingame.com/contests/spring-challenge-2023
Community starter AIs are located here:
https://github.com/CodinGame/SpringChallenge2023/tree/main/starterAIs
Dockerised so non-Java users can easily build it
And image trading can be easier when using a common container registry
docker build -t codingame-brutaltester-spring-2023 .
docker run --name brutaltester --rm \
-v /var/run/docker.sock:/var/run/docker.sock \ # Required so brutaltester container can docker run itself
-v ~/.docker/config.json:/root/.docker/config.json \ # Optional : may need this so docker can have same credentials as host, and pull on private registries
-v /var/log/brutaltester:/var/log/brutaltester \ # Optional : this way you can retrive logs on your local filesystem
codingame-brutaltester-spring-2023
-p1 "first-player-container-name" # container name for first player
-p2 "second-player-container-name" # container name for second player
-lvl 4 # League level : see below (4 is default value)
-n 100 # For example : Number of games to play. Any other usual brutaltester options can be used
- 1 = Wood 2 : Single base, no eggs, no attacking
- 2 = Wood 1 : Eggs appears
- 3 = Bronze : Multiple bases, attacks enabled
- 4 = Silver+ : Score in inputs
For a Java player, sample Dockerfile to convert an "Output.java" to container (change path to your needs) :
FROM eclipse-temurin:11-jdk-alpine AS build
WORKDIR /app
COPY ./Output.java ./
RUN javac Output.java
FROM eclipse-temurin:11-jre-alpine
WORKDIR /app
COPY --from=build ./app/*.class ./
ENTRYPOINT [ "java", "Player" ]
Can be built with
docker build -t my-codingame-2023:latest .
Same kind of dockerfile can easily be created for other languages