ShinkaEvolveのCircle PackingをWindowsで動かす

初めに

開発環境

環境構築

まずはuvで環境構築を行います

uv venv -p 3.11
.\.venv\Scripts\activate

次に関連ライブラリをインストールします

uv pip install -e .

OpenAIのAPIが必要なので、.envAPIキーを登録します

OPENAI_API_KEY="api key"

サンプルの実行

そのままだと実行できなかったので、configs > config.yaml の設定を 以下に 書き換えます

task@_global_: circle_packing
variant@_global_: default

サンプルの Circle Packing を実行するには、以下を実行します

python shinka\launch_hydra.py +variant=circle_packing_example evo_config.num_generations=5

結果として以下のようになりました

[2025-09-27 02:46:43,050][shinka.core.summarizer][INFO] - Wrote meta output to results\shinka_circle_packing\2025.09.27024320_default\meta_5.txt
[2025-09-27 02:46:43,050][shinka.core.summarizer][INFO] - Final meta summary completed (cost: $0.0323)
[2025-09-27 02:46:43,051][shinka.core.summarizer][INFO] - Saved meta state to results\shinka_circle_packing\2025.09.27024320_default\meta_memory.json: 0 unprocessed programs, summary: Yes, scratchpad: Yes, recommendations: Yes, history: 1 items
        Program Database Summary                   Cost & Stats Summary
╭────────────────────┬─────────────────╮ ╭─────────────────────────┬────────────╮
│ Metric             │ Value           │ │ Metric                  │ Value      │
├────────────────────┼─────────────────┤ ├─────────────────────────┼────────────┤
│ Overall Best Score │ 0.00            │ │ Total API Cost          │ $0.03      │
│ Total Programs     │ 9               │ │ Total Embedding Cost    │ $0.00      │
│ Correct Programs   │ 0 / 9 (0%)      │ │ Total Novelty Cost      │ $0.00      │
│ Archived Programs  │ 0 / 40 (0%)     │ │ Total Meta Cost         │ $0.00      │
│ Island Populations │ I0: 5 | I1: 1 | │ │ Total Combined Cost     │ $0.03      │
│                    │ I2: 1 | I3: 1 | │ │ Avg $/Program           │ $0.00      │
│                    │ I4: 1           │ │ Total Compute           │ 0h 0m 58s  │
│ Migration Policy   │ 10G, 10%(E)     │ │ Avg Score               │ 0.00       │
╰────────────────────┴─────────────────╯ │ Best Score              │ 0.00       │
                                         │ Median Score            │ 0.00       │
                                         ╰─────────────────────────┴────────────╯
No programs with scores in the database to display.
[2025-09-27 02:46:43,064][shinka.core.runner][INFO] - Evolution completed! 5 generations
[2025-09-27 02:46:43,064][shinka.core.runner][INFO] - ================================================================================
[2025-09-27 02:46:43,064][shinka.core.runner][INFO] - Evolution run ended at 2025-09-27 02:46:43
[2025-09-27 02:46:43,064][shinka.core.runner][INFO] - ================================================================================

しかし、5世代分だとうまくいきませんでした

WebUIでGUI上で確認

以下を実行することで WebUIで経過や結果を見ることができます

python shinka\shinka_visualize --port 8080 --open

こちらにて SelectUIで結果が選択できない場合は、URLから結果のsliteのパスを直接指定します

以下のようなURLを開くと結果を確認することができます

[http://localhost:8080/viz_tree.html?db_path=results/shinka_circle_packing/2025.09.27024320_default/evolution_db.sqlite]