AI Updates

Basics of the new AI setup are in.
The tasks and actions serialise correctly. No UI.