[fixed] ai lua optimizations

Change-Id: I29fc526a5d5fd00f67cf33ac21e77ac065c524c4