Skip to content

pankdm/icfpc-2023

Repository files navigation

ICFPC-2023

Team: Snakes, Monkeys and Two Smoking Lambdas

Write-up: https://pankdm.github.io/icfpc-2023.html

image

Installation

  1. Create .env file with access creds to ICFPC API
# example .env
ICFPC_USER_EMAIL="team@email.com"
ICFPC_USER_PASSWORD="password"
  1. If you have Docker and Docker Compose installed - you're done!
  2. Otherwise, use make to install dependencies.

Running locally

If you have Docker and Docker Compose:

  • make start-docker to start everything at once locally,

...otherwise:

  • make start-server to start utility server
  • make start-ui to start the visuzliser.

Usage

  • To check server authentication with ICFPC API, do this:
curl -X POST localhost:8000/check-auth
  • Download all problems:
curl localhost:8000/problems/download
  • Submit a solution:
curl -X POST localhost:8000/solutions/<username>/<task_id>
  • Submit all solutions:
curl -X POST localhost:8000/solutions/username
  • Show problems stats:
python3 ./scripts/problem_stats.py

Scripts

  • Run leaderboard monitoring and post updates to slack:
bash ./scripts/monitor_leaderboard.sh
  • Update all metadata scores for solutions:
zsh ./scripts/update_metadata_scores.sh
  • Update scores and previews for loks_best:
zsh ./scripts/update_best_meta_and_push.sh
  • Update solution in best_loks depending on local folder:
make compile && ./main.solver -mode update -solution dm_border2
  • Submit all solutions from a folder:
for i in `jot - 1 90`; do bash scripts/submit.sh loks_best $i; done

Repo Structure

  • ./problems - problem descriptions
  • ./solutions - all solutions
    • ./solutions/_base - best solutions
    • ./solutions/$USERNAME - personal sandboxes
  • ./solvers - all solvers
    • ./solvers/cpp - C++
    • ./solvers/cpp/*.solver - binaries for C++ solvers
    • ./solvers/python - Python
  • ./solvers/python/*.py -- python sources
  • ./server -- python flask server. Uses ICFPC API: download leaderboard, upload solutions, provides files for UI
  • ./ui -- UI: visualizer, scoreboard, leaderboard