Hello,
Only ideas on the fly :
For an a.i you may can use a random stream for all your random choices and set it again to have same choices done
For a player, you may save only actions with a save added on events and when mouse current move is modified only, this would reduce significantly the lag as no more tick.