Skip to content

prologin/prologin2025

Repository files navigation

Prologin 2025 - Barbotage Glacé

logo prologin 2025

This is the final game (2025 edition) of the French national computing contest Prologin. Candidates are asked to create an AI in 36 hours for this specific game. The final ranking will be determined at the end with a tournament where each AIs compete against each other.

The pdf subject can be found here.

License

Free use of this software is granted under the terms of the GNU General Public License version 3+ (GPLv3+). For details see the LICENSE file.

How to build using Nix

Install Nix on your computer and enable flakes.

Backend

nix profile install git+https://gitlab.com/prologin/tech/tools/stechec2.git#stechec2-all
nix build .#prologin2025

You will find the following files and folders:

  • result/lib/libprologin2025.so The stechec2 library needed to start a match

  • result/share/stechec2/prologin2025 The templates for writing a champion in your language (result of stechec2-generator).

    [!NOTE] result is read-only, if you wish to create a champion you need to copy these files somewhere else. For example:

    cp result/share/stechec2/player/python ./mychampion
    chmod -R +w ./mychampion

Frontend

nix build .#prologin2025-front

This will compile the front files and place it in result/.

You can do cd result && python3 -m http.server to start a server and open http://localhost:8000/ in your browser.

Tip

This is generated by the CI and available on Gitlab Pages, you don't need to build it locally

How to build manually

Backend

  1. Clone stechec2 and clone this repository inside stechec2/games (or create a symlink named 2025)

  2. Install the build dependencies. Using nix-shell:

    nix-shell -p ncurses pkg-config zeromq cppzmq gflags python310 python310Packages.pyyaml python310Packages.jinja2 python310Packages.aiohttp
  3. Configure, build and install:

    ./waf.py configure --prefix=./build --with-games=2025
    ./waf.py build
    ./waf.py install

    This will compile stechec2 and the 2025 game inside ./build/lib/libprologin2025.so.

  4. Generate the player environment

    ./build/bin/stechec2-generator player games/2025/prologin2025.yml player_env

    This will generate templates for champions in all languages in the player_env directory.

More details can be found here.

Frontend

Refer to the README in the gui/front folder.

Writing a champion

To write your own champion, you need stechec2 and the game's files. You can either:

You also need to install language dependencies.

Tip

You can load an environment with all languages at once using this command. Be careful, it it very large and will take a long time to complete.

nix develop git+https://gitlab.com/prologin/tech/tools/stechec2.git#generatorAllLanguages

Creating your champion

Open the template for the language of your choice in player_env or result/share/stechec2/prologin2025. There will be a file named Champion, that's where you must write your champion. Ask the server team for the rules of the game and the documentation of the endpoints.

To build, simply run make, this will create a champion.so file which you will use later.

Running a match

Create a file config.yml and place the following contents:

# if you build with nix
rules: ./result/lib/libprologin2025.so

# if you built manually
rules: ./build/lib/libprologin2025.so
server: ./build/stechec2-server
client: ./build/stechec2-client

# try out different maps!
map: ./maps/santeny.toml

# paths to your champions
clients:
  - ./player_env/python/champion.so
  - ./player_env/python/champion.so
names:
  - Player 1
  - Player 2

dump: dump.toml
verbose: 3

Finally, run stechec2-run config.yml to start the match.

Tip

You can debug your champions with stechec2-run -d 1 config.yml where 1 is the number of the champion you're debugging.