# macop.callbacks.policies — macop v1.0.5 documentation

# macop.callbacks.policies

UCB policy Checkpoint class implementation

Classes

`UCBCheckpoint`(every, filepath) | UCB checkpoint is used for loading previous Upper Confidence Bound data and start again after loading checkpoint Need to be the same operators used during previous run (see macop.policies.reinforcement.UCBPolicy for more details)

class `macop.callbacks.policies.``UCBCheckpoint`(every, filepath)

  UCB checkpoint is used for loading previous Upper Confidence Bound data and start again after loading checkpoint Need to be the same operators used during previous run (see macop.policies.reinforcement.UCBPolicy for more details)

  `algo`

    {Algorithm} – main algorithm instance reference

  `every`

    {int} – checkpoint frequency used (based on number of evaluations)

  `filepath`

    {str} – file path where checkpoints will be saved

  `load`()

    Load backup lines as rewards and occurrences for UCB

  `run`()

    Check if necessary to do backup based on every variable