rename ai_up.js, fix bug where d is chosen before r if l isn't a valid move.