A small shared dense policy, usable inside existing JavaScriptAI behaviours.
Model weights are copied on construction. Supply a seeded random callback to sample
softmax scores; omit it for the first highest-scoring legal action. All-masked is idle.
Async batches return detached results, never mutate game state; callers must discard
results whose scene or position changed while awaiting them.
A small shared dense policy, usable inside existing JavaScriptAI behaviours. Model weights are copied on construction. Supply a seeded random callback to sample softmax scores; omit it for the first highest-scoring legal action. All-masked is idle. Async batches return detached results, never mutate game state; callers must discard results whose scene or position changed while awaiting them.
Example