Recover continent membership and territory shapes by segmenting map images
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- playwright, python
調査の方向性
#1 の MapTopology モデルとグラフ層から始め、次に /maps の Playwright フローと許可されたマップ画像ルートを調査します。tests/fixtures/game_map1_territories.html を正解データとして使用し、他のマップを処理する前に、セグメンテーションから導出した隣接関係をその 83 本のエッジに対して検証します。完了条件は、マップごとの一致結果が報告され、派生した所属、ポリゴン、隣接関係が、ソース JPEG を再配布することなく生成されることです。
索引モデルが issue の本文から書いたものです。
説明
Blocks the continent-bonus feature family in #1. Split out because it is a self-contained
computer-vision job, not part of the HTML-parsing path.
The problem
D12's markup exposes territory id, name, adjacency, and label coordinates — but not continent
membership. Verified against a real game page (/game/1889, World Classic): 42 territory
anchors, zero occurrences of data-region, region, or continent.
<a href="#5" id="territory-5" class="js_territory" data-territory="5"
data-adjacencies="7,11,66,69" data-x="92" data-y="68" data-name="Northwest Territory">
The catalog reports num_regions per map (6 for World Classic, up to 36 for Land of Rus'), so
the count is known — the per-territory assignment is not. Continent bonuses are central to Risk
strategy, so the bonus-weighted-income feature in #1's position-strength model is blocked without
this.
Approach
Continents are colour-coded on the map artwork itself. Drive the map selection panel with
Playwright, capture each map's image, and segment it.
/mapsis robots-allowed, as are/assets/img/maps/<id>.large.jpgand
/image/map/<id>.large.circles.jpg. The.circlesvariant overlays territory markers.- Topology, by contrast, only exists on
/game/<id>, which robots.txt disallows — so the image
route is the better-founded path, not merely a fallback. - This runs once, over 77 maps, not on any repeating schedule.
Segmentation should yield more than continents:
- Continent membership — cluster territories by the artwork's fill colour at each known
data-x/data-y, or by segmenting regions directly. - Territory polygons — actual boundaries rather than just label points. This is what #1 asks
for when it says "high quality vector (plottable at any resolution) with labeled territories
and connections"; the current renderer draws nodes at label coordinates, which is a weaker
substitute. - Adjacency, as a cross-check — polygons that share a boundary are neighbours.
Validation is available, and should gate this
tests/fixtures/game_map1_territories.html holds ground truth for World Classic straight from
D12: 42 territories, 83 undirected edges, exact adjacency, real names. Segmentation-derived
adjacency must be checked against it rather than trusted. If the pipeline cannot reproduce those
83 edges, it is not ready to run on the other 76 maps.
Report per-map agreement rather than a single aggregate — a method that works on World Classic and
fails on dense 150-territory maps needs to be known as such, not averaged into looking fine.
Notes
- Map artwork is D12's and trademarked. Derived data (adjacency, membership, polygons) is factual
and fine to publish; the source JPEGs are not to be redistributed, and figures must render
our own geometry rather than reproducing their images. region_idalready defaults to 0 throughout the codebase, andcheck_invariantstreats a
wholly region-less map as valid rather than an error (map 77, "Brecourt Manor", genuinely has 0
regions). So this issue is additive — nothing needs restructuring to accept its output.
Depends on
#1 for the MapTopology model and the graph layer.
- 主要言語
- Python
- スター
- 1
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ContextLab/risk-analysis のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
-
basic approachオープン
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
ContextLab/risk-analysis の issue をすべて見る
似ている issue
-
debt
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/vscode-flake8#601 ·
メンテナーはふだん 1 日以内に返信
-
nonews refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Uninett/nav#4255 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 3 日以内に返信
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
EclipseFdn/open-vsx.org#14421 ·
メンテナーはふだん 1 日以内に返信
-
untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ubuntu/ubuntu-project-docs#850 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信