AI updates

#1 more complex AI #2 simplified code