HEAT:History-Enhanced Dual-phase Actor-Critic Algorithm with A Shared Transformer