This repository contains a standalone undirected vertex geography solver.
The solver:
- parses a versioned
UVG1graph format, - reproduces the same game-state transition rules,
- solves positions with a matching-based exact criterion for undirected vertex geography.
cmake -S . -B build-root -DCMAKE_BUILD_TYPE=Release -DUVG_WARNINGS_AS_ERRORS=ON && cmake --build build-root -j
./build-root/uvg_solver evaluate data/graphs/iau_constellations/iau_constellations_88_point.uvg --initial And --final Cas
./build-root/uvg_solver analyze data/graphs/iau_constellations/iau_constellations_88_point.uvg --random --with-final --min-dist 2 --seed 42Prerequisites:
- CMake
3.22+(project minimum inCMakeLists.txt) - C++23-capable compiler — CI-tested with GCC
13+and Clang17+on Linux; MSVC may work but is not CI-verified
cmake -S . -B build-root -DCMAKE_BUILD_TYPE=Release -DUVG_WARNINGS_AS_ERRORS=ON
cmake --build build-root -jBinary:
build-root/uvg_solver
cmake -S . -B build-root -DCMAKE_BUILD_TYPE=Release -DUVG_WARNINGS_AS_ERRORS=ON
cmake --build build-root -j
ctest --test-dir build-root --output-on-failureTest executables:
cross_check_random_graphs— random small-graph cross-checks (matchingvsminimax) for verification. Uses multiple families (degree-controlled Erdos-Renyi, tree+extra edges, cycle+chords, grid+deletions) up ton=14. Default deterministic profile: seeds183517,271828,314159,100graphs per seed,20positions per graph (6000checked positions). Cross-check profile can be overridden with environment variables:UVG_CROSS_CHECK_SEEDS(CSV),UVG_CROSS_CHECK_GRAPHS,UVG_CROSS_CHECK_POSITIONS,UVG_CROSS_CHECK_MAX_VERTICES.graph_parser_validation— deterministic unit tests forUVG1graph parsing and error handling.game_state_transitions— deterministic unit tests forGameStatetransitions and terminal cases.matching_unit— deterministic unit tests for the maximum matching algorithm.solver_unit— deterministic unit tests for solver depth computation, node-budget abort, depth limits, and vertex-count rejection.random_game_initializer_unit— deterministic unit tests for random state construction, distance constraints, and reproducibility.
Additionally, CTest includes smoke tests for CLI commands (evaluate, analyze, duel, state), option validation, help output, and UVGSTATE notation handling.
Optional stricter warning profile:
cmake -S . -B build-root -DCMAKE_BUILD_TYPE=Release -DUVG_WARNINGS_AS_ERRORS=ON -DUVG_ENABLE_SIGN_CONVERSION=ON
cmake --build build-root -jClean rebuild (removes previous build artifacts):
rm -rf build-root && cmake -S . -B build-root -DCMAKE_BUILD_TYPE=Release -DUVG_WARNINGS_AS_ERRORS=ON
cmake --build build-root -jClang-tidy check (requires clang-tidy and run-clang-tidy):
cmake -S . -B build-root -DCMAKE_BUILD_TYPE=Release -DUVG_WARNINGS_AS_ERRORS=ON
run-clang-tidy -p build-root -header-filter="(include|src|tests)/" "/(src|tests)/.*\.cpp$"For exact command syntax and options:
./build-root/uvg_solver --helphelp, -h, and --help are accepted aliases.
For release/build identification:
./build-root/uvg_solver --version- Architecture and solver model:
docs/architecture.md - CLI reference and examples:
docs/cli.md - UVGSTATE format and validation:
docs/uvgstate.md - Graph format and bundled datasets:
docs/graph-format.md - Sample data notes:
docs/sample-data.md
This project is licensed under the Apache License 2.0. See LICENSE.