stevenkhan commited on
Commit
1468136
Β·
verified Β·
1 Parent(s): 3f8e91d

Upload RESEARCH_SUMMARY.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. RESEARCH_SUMMARY.md +74 -0
RESEARCH_SUMMARY.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ClashCR Research Summary
2
+
3
+ ## Evaluated Projects and APIs
4
+
5
+ ### KataCR (wty-yy)
6
+ - **Paper**: arXiv:2504.04783 (April 2025)
7
+ - **Code**: https://github.com/wty-yy/katacr
8
+ - **Dataset**: https://github.com/wty-yy/Clash-Royale-Detection-Dataset
9
+ - **What it does**: Full non-embedded AI agent playing Clash Royale via screen capture.
10
+ - **Visual mode**: Live gameplay (mobile screen streamed via scrcpy/V4L2).
11
+ - **Architecture**:
12
+ - YOLOv8-l x2 combo detector for arena units (150 classes, AP50=84.3%).
13
+ - ResNet classifier for own hand cards (Part 3 crop).
14
+ - PaddleOCR for time/elixir text.
15
+ - StARformer-3L RL policy.
16
+ - **Critical finding**: KataCR detects opponent *unit spawns* in the arena via YOLO. It does NOT track opponent hand cards. It uses RL state builder to fuse unit positions/health/classes into game state.
17
+ - **Credibility**: β˜…β˜…β˜…β˜…β˜… β€” Published paper, open dataset, reproducible training code.
18
+ - **Pitfall for opponent tracking**: Only tracks own hand cards via crop + classifier. Opponent cards must be inferred from arena detections.
19
+ - **Dataset staleness**: Last updated May 2024 (Season 59). Missing 2025-2026 cards.
20
+
21
+ ### CR Vision (bytkim)
22
+ - **Repo**: https://github.com/bytkim/cr_vision (active, last commit Feb 2026)
23
+ - **What it does**: Real-time opponent elixir + card cycle tracker.
24
+ - **Visual mode**: Live gameplay (BlueStacks emulator on macOS).
25
+ - **Architecture**:
26
+ - YOLOv8 troop detection on screen capture (mss).
27
+ - Grid-based multi-frame confirmation (TROOP_TRACKER: 3 frames @ 0.6 conf).
28
+ - Wall-clock elixir regeneration model (1 elixir / 2.8s, doubles at 2:00, triples at 3:00+).
29
+ - Card cycle inference from detected troop names mapped to costs.
30
+ - **Credibility**: β˜…β˜…β˜…β˜…β˜† β€” Clean architecture, actively maintained, directly addresses opponent tracking.
31
+ - **Pitfall**: Spells are transient and hard to detect. Missing evolution/hero support in current cost table. ~60 cards covered.
32
+
33
+ ### HuggingFace TV Royale Dataset (chrisrca)
34
+ - **URL**: https://huggingface.co/datasets/chrisrca/clash-royale-tv-replays
35
+ - **Schema**: card (string), png_bytes (binary), x/y (int16), arena (string), replay (string), frame (int16).
36
+ - **Critical finding**: TV Royale replay dataset, not live gameplay. x=-1, y=-1 means card is in hand/not deployed. Usable for unit detection validation, not opponent hand tracking.
37
+ - **Credibility**: β˜…β˜…β˜…β˜†β˜† β€” Large dataset (23 GB), but wrong visual mode for our task.
38
+
39
+ ### RoyaleAPI cr-api-data
40
+ - **URL**: https://royaleapi.github.io/cr-api-data/json/cards.json
41
+ - **Total cards**: 120 (as of dataset snapshot).
42
+ - **Types**: Troop (87), Building (14), Spell (19).
43
+ - **Rarities**: Common, Rare, Epic, Legendary, Champion (6 champions).
44
+ - **Evolution support**: 8 evolution cards (Knight, Barbarians, Skeletons, Royal Giant, Royal Recruits, Bats, Firecracker, Mortar).
45
+ - **Missing cards**: Vines, Spirit Empress, Rune Giant, Berserker, Boss Bandit, Goblinstein, Royal Chef, and all Hero cards (Hero Knight, Hero Musketeer, Hero Giant, etc.).
46
+ - **Credibility**: β˜…β˜…β˜…β˜†β˜† β€” Reliable static data source, but visibly stale for 2025-2026.
47
+
48
+ ### Official Clash Royale API
49
+ - **URL**: https://developer.clashroyale.com/
50
+ - **Endpoint**: /v1/cards
51
+ - **Python client**: clashroyale package
52
+ - **Credibility**: β˜…β˜…β˜…β˜…β˜… β€” Official source of truth. Requires API token.
53
+
54
+ ## Gaps for 2026 Cards/Heroes/Evolutions
55
+
56
+ | Category | KataCR (May 2024) | CR Vision | Needed |
57
+ |----------|-------------------|-----------|--------|
58
+ | Total cards | ~125 | ~60 | 120+ |
59
+ | Evolutions | 17 evolution units | None | All 20+ |
60
+ | Heroes | 6 heroes (missing royal-guardian) | None | All 7+ |
61
+ | New 2025-2026 | dagger-duchess missing | None | Need updates |
62
+ | Spells | Some (zap, fireball effects) | None | All spell visuals |
63
+ | Buildings | Yes | Some | All |
64
+
65
+ ## Final Verdict
66
+
67
+ No existing open-source project provides a complete, working opponent card tracker for live Clash Royale gameplay. The closest is **CR Vision**, which implements the correct architecture (spawn detection + elixir tracking + cycle inference) but lacks evolution/hero support and has limited spell detection. **KataCR** is the most credible academic foundation but focuses on self-play AI, not opponent tracking.
68
+
69
+ To build a working 2026 opponent tracker:
70
+ 1. Fork CR Vision's architecture (spawn detection + cycle logic).
71
+ 2. Retrain YOLO detector with KataCR dataset + new card slices.
72
+ 3. Update unit-to-card mappings for all evolutions and heroes.
73
+ 4. Add spell effect detection (or accept that spells will be missed without more data).
74
+ 5. Use official Clash Royale API to maintain current card list and elixir costs.