Made a somewhat workable AI