some important structural changes in AI.h