"""Manual judgments made from pilot_blind.json before viewing outcomes.

These are a single reader's evidence labels, not independent reliability estimates.
The narrower interaction label requires an explicit dependency between configurable
parts or between a chosen part and a stated trigger/context. General gameplay
novelty and mere different attacks do not establish that label.
"""
import hashlib
from common import *
# case, label, mechanism, explicit interaction, supporting paraphrase
LABELS = [
(0,'concrete','probability_editing',False,'Editing individual die faces, including making every face identical, changes the randomness of the roll.'),
(1,'generic','',False,'Drafting, minion positioning and synergies are promised, but no particular placement effect or dependency is explained.'),
(2,'concrete','sacrifice_and_position',False,'A card reaching the enemy base before victory is permanently removed from the run deck.'),
(3,'concrete','rule_transformation',False,'Effects keep tiles revealed, add reveals, and permit otherwise mismatched pairs to match.'),
(4,'generic','',False,'Decks, books and equipment are customizable; specific effects or dependencies are not given.'),
(5,'concrete','deck_editing_cost',False,'Sacrificing cards can seek a replacement or trim unwanted cards from the deck.'),
(6,'unclear','',False,'Directional treasure placement and Feng Shui rules are named, but the actual placement effects are not stated.'),
(7,'generic','',False,'Card and daemon counts plus a promise of synergies, without a worked rule.'),
(8,'concrete','elemental_composition',True,'Fire, Water and Grass form a counter cycle used for elemental critical hits; each character also supplies an exclusive card pool.'),
(9,'concrete','dual_use_resource',True,'Cards spent in machine slots cannot remain in the poker hand; unused pairs heal while other unused combinations provide different benefits.'),
(10,'generic','',False,'Lists of equipment, variants and hand types do not explain a specific interaction.'),
(11,'unclear','',False,'Order, placement, mutations and cutting cards in half are advertised, but no resulting effect is specified.'),
(12,'unclear','',False,'Zones reshape decisions through modifiers, but no modifier or unit-zone dependency is specified.'),
(13,'generic','',False,'Creature capture, fusion, equipment and mutation are listed without explaining inheritance or combined effects.'),
(14,'concrete','attack_geometry',False,'The player sets emitters and changes their angles, speed, rotation and spread to design firing patterns.'),
(15,'generic','',False,'Items and skills have effects and can combine, but no actual effect or interaction is described.'),
(16,'generic','',False,'Offensive and defensive teams and targeting front or back lines are possible, but component effects are unspecified.'),
(17,'generic','',False,'Towers, upgrades and enemy types are listed; the detailed wave-weight system does not explain build dependencies.'),
(18,'generic','',False,'Traits, boons, formations and evolution are named without a specific trait threshold or effect.'),
(19,'concrete','roster_constraint',False,'The roster permits two Gold, two Silver and four Bronze players, limiting simultaneous use of the strongest tier.'),
(20,'concrete','sacrifice_resource_loop',True,'Deaths on either side generate blood for spells and summons; players can sacrifice their own units when blood is scarce.'),
(21,'generic','',False,'A large skill and body-part inventory and positioning are advertised, but no positional or skill interaction is explained.'),
(22,'concrete','status_grafting',True,'Drones with different attack patterns can carry sacrifice elements including stun, knockback, execute and silence.'),
(23,'concrete','behavior_assignment',False,'The same army can assign slimes to hold a defensive position or roam freely, changing how it responds to attackers.'),
(24,'concrete','projectile_transformation',True,'Weapon modifications add projectiles or explosive bullets; equipped android allies can also become spare player bodies.'),
(25,'unclear','',False,'Items grant passive powers, including a named Firewalking power, but its behavior or weapon interaction is not explained.'),
(26,'concrete','combination_unlock',True,'Ascended Synergies appear after owning both requisite upgrades and meeting their level requirements.'),
(27,'generic','',False,'Heroes, spells and permanent stat boosts are listed without a configuration interaction.'),
(28,'generic','',False,'Gear and abilities are advertised; day-night timing is a world rule, not a stated build dependency. A quoted review supplies the strongest build wording.'),
(29,'generic','',False,'Named weapons have different attacks; relic chain reactions are promised without explaining one.'),
(30,'generic','',False,'Classes, area spells and moddability are emphasized, but no specific configuration rule is provided.'),
(31,'generic','',False,'Tail movement is a concrete core mechanic; the cards that modify it remain unspecified.'),
(32,'concrete','equipment_roles',False,'Loadout categories have stated roles: guns kill, shields shove and melee knocks enemies out, in a claimed counter triangle.'),
(33,'concrete','weight_and_firing_geometry',True,'Hull plates trade weight for survival; port/starboard weapons fire when the chosen broadside has a target in its arc.'),
(34,'concrete','conditional_ability',True,'The Last Rites ability is usable only below ten HP and provides one revive per run.'),
(35,'concrete','combination_unlock',True,'An evolution requires a maxed core ability plus the matching keystone card.'),
(36,'concrete','opponent_wave_investment',False,'Purchased monsters join every subsequent wave faced by all opponents, competing with investment in personal defense and income.'),
(37,'concrete','ordered_modifiers',True,'Every modifier to the left of a projectile affects that projectile; bouncing projectiles can grow on each bounce.'),
(38,'concrete','cross_ability_trigger',True,'With Energy Sense unlocked, magic waves contacting electromagnetic fields spawn a ring of smaller waves.'),
(39,'concrete','logistics_dependency',True,'Buildings produce, transport and consume resources that are needed to train defenders; supply lines are part of army configuration.'),
(40,'generic','',False,'Building and weapon upgrades offer strategies without specifying a dependency.'),
(41,'unclear','',False,'Irreversible drafting and tower-modifier interference are described, but the interfering effects and Surge rules are unspecified.'),
(42,'concrete','proximity_support',True,'Support towers enhance nearby defenses, making their placement relative to other towers consequential.'),
(43,'generic','',False,'The main pitch names elemental combinations and socketed skills without an explicit interaction rule. A very long multilingual keyword appendix is not treated as evidence.'),
(44,'generic','',False,'Summoning cats and upgrading a resource factory explain basic progression; equipment combinations and gem effects remain unspecified.'),
(45,'concrete','power_network',True,'Collectors power and expand an interconnected defensive network; faulty placement can leave a sector without power.'),
(46,'generic','',False,'Random upgrades, unit combinations and settlement expansion without a stated build dependency.'),
(47,'concrete','moving_layout',False,'Towers are placed on rotating rings, so the chosen orbital layout continually changes defensive positions.'),
(48,'concrete','cross_class_transfer',True,'Learned abilities remain usable after changing jobs, allowing abilities from different jobs to combine.'),
(49,'concrete','adjacency_and_exposure',True,'Cards attack adjacent enemies at round end; the lord is also a deployable card, creating a choice between exposing its strength and protecting it.'),
(50,'generic','',False,'The growth claim says learned skills tailor playstyle, but no skills or configuration rule are described.'),
(51,'generic','',False,'Unrestricted skill mixing and equipment effects are advertised without specifying an interaction.'),
(52,'concrete','enemy_ability_acquisition',False,'Absorbed enemy forms become molds used for throws, projectiles, stuns or summons.'),
(53,'generic','',False,'Character, class and customizable weapon counts with unspecified combos.'),
(54,'generic','',False,'Tarot cards have abilities layered on poker, but the abilities are not explained.'),
(55,'generic','',False,'Modular ships and power management are named without a power constraint or module dependency.'),
(56,'generic','',False,'Equipment and unique builds are promised without an example.'),
(57,'unclear','',False,'Mutation effects are named but not explained. The detailed co-op tether is a tactical rule, not evidence of a configurable interaction.'),
(58,'concrete','copying_components',True,'Dice faces can be replaced and cats can copy other cats, creating a direct dependency on which other cat is present.'),
(59,'concrete','opponent_card_manipulation',True,'Chosen skills target visible enemy intent cards to steal block, reduce damage or cancel intent; defeated enemy cards can be added to the deck.'),
]
if __name__=='__main__':
    pilot=json.loads((R/'pilot_blind.json').read_text())
    assert [x[0] for x in LABELS]==list(range(60))
    labels=[]
    for (i,label,mechanism,interaction,evidence),case in zip(LABELS,pilot):
        labels.append(dict(appid=case['appid'],name=case['name'],family=case['family'],period=case['period'],label=label,mechanism=mechanism,explicit_interaction=interaction,evidence=evidence))
    save_json('pilot_labels.json',labels)
    save_json('pilot_labels_frozen.json',dict(sha256=hashlib.sha256((R/'pilot_labels.json').read_bytes()).hexdigest(),outcomes_seen=False,reader='single assistant; no independent inter-rater audit',decision='Do not scale a universal regex or claim a mechanism premium. Clear examples are heterogeneous; six cases remain ambiguous and many generic descriptions could conceal real interactions. Use case-level evidence plus explicitly exploratory sample outcomes.'))
    print(pd.DataFrame(labels).groupby(['family','label']).size().unstack(fill_value=0).to_string())
