docstr: OAC algorithm
  Args:
      model(parl.Model): forward network of actor and critic.
      gamma(float): discounted factor for reward computation
      tau (float): decay coefficient when updating the weights of self.target_model with self.model
      alpha (float): Temperature parameter determines the relative importance of the entropy against the reward
      beta (float): determines the relative importance of sigma_Q
      delta (float): determines the relative changes of exploration`s mean
      actor_lr (float): learning rate of the actor model
      critic_lr (float): learning rate of the critic model
docstr_tok: ["OAC","algorithm","Args",":","model","(","parl.Model",")",":","forward","network","of","actor","and","critic",".","gamma","(","float",")",":","discounted","factor","for","reward","computation","tau","(","float",")",":","decay","coefficient","when","updating","the","weights","of","self.target_model","with","self.model","alpha","(","float",")",":","Temperature","parameter","determines","the","relative","importance","of","the","entropy","against","the","reward","beta","(","float",")",":","determines","the","relative","importance","of","sigma_Q","delta","(","float",")",":","determines","the","relative","changes","of","exploration","`","s","mean","actor_lr","(","float",")",":","learning","rate","of","the","actor","model","critic_lr","(","float",")",":","learning","rate","of","the","critic","model"]
code: def __init__(
      self,
      model,
      gamma=None,
      tau=None,
      alpha=None,
      beta=None,
      delta=None,
      actor_lr=None,
      critic_lr=None,
  ):
      """OAC algorithm
      Args:
          model(parl.Model): forward network of actor and critic.
          gamma(float): discounted factor for reward computation
          tau (float): decay coefficient when updating the weights of self.target_model with self.model
          alpha (float): Temperature parameter determines the relative importance of the entropy against the reward
          beta (float): determines the relative importance of sigma_Q
          delta (float): determines the relative changes of exploration`s mean
          actor_lr (float): learning rate of the actor model
          critic_lr (float): learning rate of the critic model
      """
      # checks
      check_model_method(model, "value", self.__class__.__name__)
      check_model_method(model, "policy", self.__class__.__name__)
      check_model_method(
          model, "get_actor_params", self.__class__.__name__
      )
      check_model_method(
          model, "get_critic_params", self.__class__.__name__
      )
  
      assert isinstance(gamma, float)
      assert isinstance(tau, float)
      assert isinstance(alpha, float)
      assert isinstance(beta, float)
      assert isinstance(delta, float)
      assert isinstance(actor_lr, float)
      assert isinstance(critic_lr, float)
  
      self.gamma = gamma
      self.tau = tau
      self.alpha = alpha
      self.beta = beta
      self.delta = delta
  
      self.actor_lr = actor_lr
      self.critic_lr = critic_lr
  
      device = torch.device(
          "cuda" if torch.cuda.is_available() else "cpu"
      )
      self.model = model.to(device)
      self.target_model = deepcopy(self.model)
      self.actor_optimizer = torch.optim.Adam(
          self.model.get_actor_params(), lr=actor_lr
      )
      self.critic_optimizer = torch.optim.Adam(
          self.model.get_critic_params(), lr=critic_lr
      )
  
file_path: PARL/parl/algorithms/torch/oac.py
imports: import parl
  import torch
  import math
  from torch.distributions import Normal
  import torch.nn.functional
  from parl.utils.utils import check_model_method
  from copy import deepcopy
label_desc: Use image node_id 1 to create a new OAC object from inherited base classes: parl with example: obj = OAC(model, gamma, tau, alpha, beta, delta, actor_lr, critic_lr)