Condenced ai and rpsMid.js