add AI unit, evalfunction by state, stacks become public