Update ai.js to assume deterministic, more smooth