Conversation
Resolve nimby.lock / coworld/dependencies.lock to bassy 669a7c4 (a descendant of Metta-AI#72's 2c54d82, so it keeps DATA arrays + metered callbacks and adds string restarts), and keep both Metta-AI#72's addNeuralFunctions() and main's mailbox host functions in every bots.nim. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Header first so the training lane can bind against it; the Nim implementation follows in native_env.nim. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e seats - sim.nim: split tickWorld into tickWorldBegin/tickWorldFinish (pure refactor), planRoute (side-effect-free route probe), HeroVm.neural, and training-only counters behind -d:gotaTrainingStats. - bots.nim: contract host procs routed through issue* procs (same recording/metrics order) plus interception hooks for neural seats; neural package seats (ZIP) in loadBots. - neural_contract.nim: observation v1 (1407 floats), action v1 decoder and demonstration encoder, SHA-256 pinned contract texts. - neural_actor.nim: GOTANET1 = PWNET001 layout, MinGRU FP32 actor. - neural_package.nim: strict gota-neural-basic/1 package parser. - native_env.nim + tools/native_env.py: the native_env.h ABI. - neural/policy.bas: glue (draft/shop/level/buyback from base.bas). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ipted seats - Per-world scratch (sim vision/path/walk scratch, pathing A* scratch, bots activeGame) is thread-local; map/lane/sight globals are built once per map; the edge cache is warmed before threads search; hero data slots bind once. Single-threaded behaviour is unchanged. - native env: map template + process lock for create/reset; documented build --mm:atomicArc --threads:on -d:useMalloc (destroy from any thread). - tools/test_native_concurrency.py: 8 handles x 4 threads x 200 steps, handles migrating between threads, == serial hashes/obs/rewards/labels. - gota_seat_orders reports the previous window (lastLabel); it was being wiped by the next decision's frame (train lane bug report). - tools/mapping_ceiling.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tests - gota_set_seat_shadow: a learner seat's expert script runs on the same frames with every world-changing host call absorbed; its contract commands become gota_seat_orders labels. - coworld/gota/runtime/neural_package.py: staging validator + builder mirroring neural_package.nim (same rejections, tested). - tools/test_native_env.py: label coverage, capture identity, shadow no-op, goals-before-reset, reward == delta score, package-vs-ABI parity for w64/w128/w256, validator agreement. - native_env.h: document shadow, record/capture, save_replay, last_error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…metry in native env A paused native world could finish its tick with the navigation world of another handle stepped meanwhile on the same thread (worlds drifted apart after ~1500 decisions). tickWorldFinish now rebinds it (a no-op for the unsplit tickWorld). Native env samples replay metrics per tick so gota_save_replay works; tools/parity_upstream.sh (item 5a). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…), proofs tool Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… sampled instruction peak Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rity beyond sampled matches) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pty_targets) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k_mode), proofs tool Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ead-safe gota_create, isolation tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l seats get the plain per-tick BASIC budget; metrics use each seat's own limit; lastError thread-local doc; goal parity test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on RNG by kind) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…serve (hosted order; fixes native != hosted package play); replay_diff tool; goal/hosted parity test covers default goals Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ats saw maxTicks 0: time features and telemetry wrong) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rWidth; validator, tests, docs) ActorWidths = [64, 128, 256, 384, 512]. w384 = 2,048,256 ops/inference, w512 = 3,124,224, both under the 4,000,000/tick budget and the 2,000,000-parameter cap. infer's stack buffers are sized from MaxActorWidth (static-asserted = the largest width), so w64-w256 compute is unchanged. neural_package.py WIDTHS matches. test_native_env.py: package parity at all five widths and a new width test (both loaders accept exactly the five widths, reject the rest). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR builds on treeform's Metta-AI#72 (DATA arrays plus metered
linear/relu/argmax) and adds the part Metta-AI#72 deferred: external weights. It adds a GotA neural package tier and a native training environment. Both share one decoder and one contract, so what a trainer learns is exactly what the hosted seat plays. Plain.bassubmissions don't change.Spec:
examples/gods_of_the_arena/neural_basic.md. C ABI:examples/gods_of_the_arena/native_env.h.What's in it
bots.nimkeeps both the neural and the mailbox host functions.sim.nim, all changes behaviour-preserving:tickWorldis split intotickWorldBegin/tickWorldFinish, so an env can pause at the heroes' turn.planRouteis a side-effect-free route probe.HeroVm.neuralis added.-d:gotaTrainingStats.bots.nim: contract host procs now go throughissue*procs, with the same recording and metrics order. Neural seats get interception hooks. ZIP packages load inloadBots.coworld.nimreads packages up to 16 MiB; the bounded read for plain BASIC is unchanged.neural_contract.nim):gota-neural-basic/1: a ZIP of exactlymanifest.json,policy.basandmodel.bin(GOTANET1, the PWNET001 FP32 MinGRU). The strict parser rejects unknown keys.coworld/gota/runtime/neural_package.pyis a staging validator that mirrors it.gota_act,run_neural_net,neuralObservation/Logits/State/Model.neural: peak_ops=… budget=… model=w… ticks=….native_env.nim):gota_set_seat_goal.set_seat_script, BC labels (seat_orders), a ceiling override, and DAgger shadow scripts.gota_net_*for G0 parity.--mm:atomicArc --threads:on -d:useMalloc).Evidence
All runs used Linux, Nim 2.2.10, on a RunPod cpu3c 32-vCPU box.
tools/parity_upstream.sh)tools/test_native_env.py)-d:coworldserver, 5 random-weight w128 packages + 5 base.bas, 28,800 ticks (tools/canary.py)peak_ops=486144 budget=4000000 model=w128 ticks=28797 inferences=7200on every neural seat, replay re-simulates (9197/9197 actions, 0 mismatches)tools/mapping_ceiling.py)tools/test_native_concurrency.py)tools/test_native_env.py)Residual track: defer script (Amendment 3; 0567391, eb02c0e, c2bbdba, 66ead03)
deferConsultin neural_host_hooks.nim).gota_set_seat_defer_script(h, seat, path|NULL)andgota_seat_defer_stats(h, seat, int64[2] = {defer, override}).gota_seat_ordersreturns the script's commands (issued or absorbed) as labels. The call and a shadow expert clear each other."decoder": {"defer_script": true}, with policy.bas = the script. The Nim parser andneural_package.pyboth accept the key (boolean only), andbuild --defer-scriptsets it.tools/test_defer.py, metta1 job 16184, lib 66ead03, full 28,800 ticks)gota_net_infervs package seattools/test_native_env.py(full)Action mask (ef62695 header, 446b734 impl, ba8c255 docs)
gota_action_mask(h, seat, uint8[187])returns verb[8], castTarget ability[4] and 7 target rows × 25 for the paused frame.isEnemyTarget."decoder": {"mask_empty_targets": true, "mask_mode": "conditional"|"static"}. Default off.tools/test_mask.py, job 16281, full length):Open items / caveats
🤖 Generated with Claude Code