Implemented serialization for actions and AI (temporary for map).