Chess player AI written in JavaScript