Solver for the 2023 InformatiCup challenge „Profit“
cargo build --release [--features stats]
If the stats
feature is activated, the solver will print the number of calculated solutions per
second.
Note: For competition, the solver shall be run as docker container.
docker build -t .
docker run -i [OPTIONS] <
The project consists of multiple packages:
Solver for puzzles
target/release/solver
--time [runtime in seconds]
--cores [number of threads to use]
[--print] # prints the final solution to stdout
[--stats] # prints evaluation stats (score and turn, when score was achieved) to stdout
< some_task.json
Test runner for a fixed set of tasks.
target/release/qa
Binary to read task and solution files and print resulting map
target/release/printer -- < some_task.json
Binary for running a simulation from a task/solution file
target/release/simulator -- < some_task.json
Model instances for task/solution files and basic building objects
cargo bench --bench benchmarks
To create profiling data:
cargo build --profile=profiling
valgrind --tool=callgrind ./target/profiling/solver --time x --cores y < inputs/003.task.json
To view profiling data (w/ qcachegrind)
qcachegrind callgrind.out.xxxx
A JSON object that contains the tasks basic information and given objects (may also include non-landscape objects. In that case the task is split into task description and solution).