fixes to computer AI algorithm