added simple AI solver, needs polishing