Post

CodeCup 2025 - Box

I participated in CodeCup 2025. In 2025, the game for the context is Box. This was my first time participating in CodeCup.

CodeCup provides a system called Caia that allows contestants to test and improve their bots for the test and final competitions. As a fun little side project, I built an unofficial online multiplayer version that allowed contestants to have their programs (bots) play against other programs online without having to share their source code or program binaries - their programs ran locally on their own systems and only the game moves were transmitted to the other players.

The application was built as a Node.js application and here is how the overall architecture looked like:

box-online-multiplayer-architecture Architecture for the Online Multiplayer version

Here is a sample of how the user interface at the client side looked like after starting the Node.js application:

box-online-multiplayer-client-ui A sample of the Client side UI

All the code for this is open sourced and more details about this can be found in my cc25-box-online-multiplayer GitHub repo. Tapani Utriainen, a fellow contestant contributed the code for calculating the ELO rating and Maks Verver, another fellow contestant contributed code to support reverse proxies.

My own submission for the contest can be found in the following gist. It was a pretty basic version with weights based on the overall geometric structure with negative weights against all other colors till the opponent color is guessed. A lot of other contestants also shared their code in the CodeCup forum and there was a lot I learnt from them.

This post is licensed under CC BY 4.0 by the author.