Recover continent membership and territory shapes by segmenting map images
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 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 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ContextLab/risk-analysis 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 5/5 一周以上 新手友好度 30/100
-
basic approach未关闭
难度 5/5 一周以上 新手友好度 20/100
查看 ContextLab/risk-analysis 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
mihai-vlc/sublime-jsfmt#56 ·
-
comp/cli comp/plugins P2 type/bug
难度 2/5 1-3 小时 新手友好度 75/100
NousResearch/hermes-agent#141917 · 1 条评论 ·
维护者通常 1 天内回复
-
Go device SDK: Whisper transcriber keeps buffering and transcribing audio appended after Stop()可能已有人在做 @apoorvdarshan 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
BasedHardware/omi#22770 ·
维护者通常 1 天内回复
-
bug needs-acceptance wg/router-models-inference-runtime
难度 2/5 1-3 小时 新手友好度 66/100
vllm-project/semantic-router#5295 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
huggingface/huggingface_hub#5210 ·
维护者通常 1 天内回复