Finished computer hard artificial intelligence

added error handling and other code cleanups