Skip to content

codingteam/icfpc-2023

Repository files navigation

icfpc-2023

codingteam's submission for the ICFP Contest 2023.

News: this year, we won the judges' prize:

Finally, the judges prize was attributed to team Codingteam, whose writeup we really enjoyed reading (and the mix of F# and Fortran in their solution was both surprising and fun to see)

https://icfpcontest2023.github.io/

  • July 7th, 12:00 UTC (noon) to July 10th, 12:00 UTC 2023

Team Members

Latest available rating: we've had 51'st place with a score of 97,433,577,912.

Credentials and Tokens

All the credentials and tokens to access the contest resources are stored in a pinned message in our Telegram chat and in the conference topic in the XMPP chat.

⚠ Please save the access token to file token.txt in the solution directory.

Prerequisites

.NET SDK 7.0 is required. Get it for your platform at https://dotnet.microsoft.com/en-us/download (binary installers are available as well as packages for various Linux distributions).

About F#

Build

$ dotnet build

Run

$ dotnet run --project Icfpc2023 -- [arguments here…]
    # or, alternately:
$ cd Icfpc2023 && dotnet run -- [arguments here…]

Visualizer

$ dotnet run --project Icfpc2023.Visualizer [-- <problemNumber>]
    # or, alternately:
$ cd Icfpc2023.Visualizer && dotnet run [-- <problemNumber>]

Commands

HTTP

Download all problems:

$ dotnet run --project Icfpc2023 -- download all

Upload all solutions from the solutions/ directory:

$ dotnet run --project Icfpc2023 -- upload all

Solution

Solve problem 1 using dummy solver:

$ dotnet run --project Icfpc2023 -- solve 1 dummy

Solve all problems using dummy solver:

$ dotnet run --project Icfpc2023 -- solve all dummy

Solve all problems using non-deterministic solvers and save solutions if they improve upon the existing ones:

$ dotnet run --project Icfpc2023 -- solve all best-nondeterministic --preserve-best

It makes sense to re-run that command from time to time because non-deterministic solvers have a chance of finding a better solution.

Solve problem 1 using all solvers and picking the best solution:

$ dotnet run --project Icfpc2023 -- solve all best

Solve problem 1 using dummy solver and preserve best solution if already exists:

$ dotnet run --project Icfpc2023 -- solve 1 dummy --preserve-best

Calculate score for solution 1 on problem 1:

$ dotnet run --project Icfpc2023 -- score 1

Solution improvement

Improve existing solution of problem 1 using lambda solver:

$ dotnet run --project Icfpc2023 -- improve 1 lambda

Improve existing solution of problem 1 using lambda solver, but preserve best solution:

$ dotnet run --project Icfpc2023 -- improve 1 lambda --preserve-best

Oddities

Lambda score showcase (I dunno, see PR #4 for details):

$ dotnet run --project Icfpc2023 -- lambdaScore

Convert Problem+Solutions to INI:

$ dotnet run --project Icfpc2023 -- convertini <all|problemId>

Import solutions from INI:

$ dotnet run --project Icfpc2023 -- vulpes all # no other options supported, sorry!

Legacy

Download first 3 problems:

$ dotnet run --project Icfpc2023 -- download 3

Run Tests

$ dotnet test

How to Develop

See https://dotnet.microsoft.com/en-us/languages/fsharp/tools for the main options.

Fee free to use editor of choice, but the easiest tools to get started are:

  • Visual Studio (Windows-only)

    • Community Edition is free and should be okay for this project
    • Open Infpc2023.sln and then press the Run button
  • Visual Studio Code with Ionide extension (cross-platform)

    • Totally free
    • Open the solution folder (the one with the .sln file), install the Ionide extension, and then use the Run and Debug tool window to execute the project
  • JetBrains Rider (cross-platform)

    • Commercial
    • Free EAP and trial builds are available and are okay to use for this project (I, @ForNeVeR, use EAP myself)
    • Open the .sln file and then hit the green Run button to get started

Other viable options are Vim, Emacs, and any editor with LSP support via FsAutoComplete.

About

codingteam's submission for the ICFP Contest 2023

Resources

License

Stars

Watchers

Forks