Update ai.js to weight earlier scores more