Massive update

Updated AI.py, added cache.py