Recover continent membership and territory shapes by segmenting map images
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- playwright, python
- Lĩnh vực
- computer-vision
Hướng nghiên cứu
Bắt đầu với mô hình MapTopology và lớp đồ thị từ #1, sau đó kiểm tra luồng Playwright cho /maps và các route ảnh bản đồ được cho phép. Sử dụng tests/fixtures/game_map1_territories.html làm nguồn dữ liệu chuẩn và xác thực tính kề nhau được suy ra từ phân đoạn dựa trên 83 cạnh của tệp này trước khi xử lý các bản đồ khác. Được xem là hoàn tất khi mức độ khớp theo từng bản đồ được báo cáo, membership, các polygon và tính kề nhau được suy ra được tạo ra mà không phân phối lại các JPEG nguồn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 1
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ContextLab/risk-analysis
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
-
basic approachĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Tất cả issue của ContextLab/risk-analysis
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pgvector/pgvector-python#169 ·
-
ChaosEngine: backup-remote doctor row passes while consumer mode hides bot memory from gitCó thể đã có người làm @MohabMohie đã nhận hôm nay. Đang mởagentic
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ShaftHQ/SHAFT_ENGINE#7263 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
huggingface/smolagents#3045 ·
Maintainer thường phản hồi trong vòng 1 ngày