Upload units.py with huggingface_hub
Browse files
units.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Canonical unit-class taxonomy shared by cache, models, and evals.
|
| 2 |
+
|
| 3 |
+
STATIC_CLASSES are persistent structures the spatial AE compresses.
|
| 4 |
+
TRANSIENT_CLASSES (mobile/projectile) bypass the AE: they are few, exact,
|
| 5 |
+
and fully described by (owner, type, position, target) — the policy reads
|
| 6 |
+
them raw instead of through a lossy latent.
|
| 7 |
+
"""
|
| 8 |
+
|
| 9 |
+
UNIT_CLASSES = [
|
| 10 |
+
"City",
|
| 11 |
+
"Port",
|
| 12 |
+
"Defense Post",
|
| 13 |
+
"Missile Silo",
|
| 14 |
+
"SAM Launcher",
|
| 15 |
+
"Factory",
|
| 16 |
+
"Warship",
|
| 17 |
+
"Transport",
|
| 18 |
+
"Trade Ship",
|
| 19 |
+
"Atom Bomb",
|
| 20 |
+
"Hydrogen Bomb",
|
| 21 |
+
"MIRV",
|
| 22 |
+
]
|
| 23 |
+
UNIT_CLASS_INDEX = {name: i for i, name in enumerate(UNIT_CLASSES)}
|
| 24 |
+
|
| 25 |
+
STATIC_CLASSES = [
|
| 26 |
+
"City",
|
| 27 |
+
"Port",
|
| 28 |
+
"Defense Post",
|
| 29 |
+
"Missile Silo",
|
| 30 |
+
"SAM Launcher",
|
| 31 |
+
"Factory",
|
| 32 |
+
]
|
| 33 |
+
STATIC_INDICES = [UNIT_CLASS_INDEX[n] for n in STATIC_CLASSES]
|
| 34 |
+
|
| 35 |
+
TRANSIENT_CLASSES = [
|
| 36 |
+
"Warship",
|
| 37 |
+
"Transport",
|
| 38 |
+
"Trade Ship",
|
| 39 |
+
"Atom Bomb",
|
| 40 |
+
"Hydrogen Bomb",
|
| 41 |
+
"MIRV",
|
| 42 |
+
]
|