code wiki / _hdl_build / nx_futurist.nx

nx_futurist.nx source

↩ module page · 47 lines · 2363 B

1// nx_futurist.nx -- the NISHI FUTURIST: looks FORWARD on what's coming so the team prepares BEFORE 2// it arrives (operator). The team is good at grading what it HAS; the Futurist asks where the frontier 3// is HEADING. It tracks a trend (a metric over time), projects its TRAJECTORY, estimates the ETA to 4// the next milestone, and checks the team's READINESS -- flagging incoming shifts the team is NOT 5// ready for as PREPARE-NOW roadmap items. e.g. weight bits trend 16->8->4->2 -> 1-bit/ternary is 6// coming; context length trends up -> long-context tooling. composes the Researcher's roadmap + feeds 7// the layered backlog. RACI: Futurist forecasts; Researcher/Builder prepare; Examiner grades readiness. 8// license_tier: ORIGINAL Refs: trend extrapolation; the research roadmap (Toom/Schonhage, BitNet, MLA). 9 10import "nx_syscalls.nx" 11 12// the trend RATE (per-step change) from a time series. negative = decreasing (e.g. bits/weight). 13func fut_rate(series: *i64, n: i64) -> i64 { 14 if n < 2 { return 0 } 15 return (series[n - 1] - series[0]) / (n - 1) 16} 17 18// FORECAST: project the current value forward by `horizon` steps at the trend rate. 19func fut_forecast(current: i64, rate: i64, horizon: i64) -> i64 { return current + rate * horizon } 20 21// ETA (steps) until the trend reaches `target` from `current`; -1 if the trend moves away or is flat. 22func fut_eta(current: i64, target: i64, rate: i64) -> i64 { 23 if rate == 0 { return 0 - 1 } 24 let gap: i64 = target - current 25 if gap == 0 { return 0 } 26 // gap and rate must share a sign (the trend is moving toward the target) 27 if gap > 0 { if rate < 0 { return 0 - 1 } } 28 if gap < 0 { if rate > 0 { return 0 - 1 } } 29 var steps: i64 = gap / rate 30 if steps < 0 { steps = 0 - steps } 31 if steps == 0 { steps = 1 } 32 return steps 33} 34 35// READINESS: is the team ready for an arriving shift? 1 = ready (has the capability); 0 = PREPARE-NOW. 36func fut_ready(team_has_capability: i64, arriving: i64) -> i64 { 37 if arriving == 1 { if team_has_capability == 0 { return 0 } } 38 return 1 39} 40 41// is this a PREPARE-NOW item? (an arriving shift the team is not ready for, soon enough to matter). 42func fut_prepare_now(team_has_capability: i64, eta: i64, horizon: i64) -> i64 { 43 if team_has_capability == 1 { return 0 } 44 if eta < 0 { return 0 } 45 if eta <= horizon { return 1 } 46 return 0 47}