
    &`i                     B    d Z ddlmZ ddlmZmZ  G d de          ZdS )a  
[1] Mastering Diverse Domains through World Models - 2023
D. Hafner, J. Pasukonis, J. Ba, T. Lillicrap
https://arxiv.org/pdf/2301.04104v1.pdf

[2] Mastering Atari with Discrete World Models - 2021
D. Hafner, T. Lillicrap, M. Norouzi, J. Ba
https://arxiv.org/pdf/2010.02193.pdf
    )Learner)5OverrideToImplementCustomLogic_CallToSuperRecommendedoverridec                   T     e Zd ZdZe ee           fd                        Z xZS )DreamerV3LearnerzDreamerV3 specific Learner class.

    Only implements the `after_gradient_based_update()` method to define the logic
    for updating the critic EMA-copy after each training step.
    c                    t                                          |           | j        j                                        D ]0\  }}|                                j                                         1d S )N)	timesteps)superafter_gradient_based_updatemodule_rl_modulesitems	unwrappedcritic
update_ema)selfr	   	module_idr   	__class__s       /home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/rllib/algorithms/dreamerv3/dreamerv3_learner.pyr   z,DreamerV3Learner.after_gradient_based_update   su     	++i+@@@ "&!8!>!>!@!@ 	3 	3Iv%002222	3 	3    )	__name__
__module____qualname____doc__r   r   r   r   __classcell__)r   s   @r   r   r      sd          ;Xg3 3 3 3  ;:3 3 3 3 3r   r   N)r   ray.rllib.core.learner.learnerr   ray.rllib.utils.annotationsr   r   r    r   r   <module>r      s     3 2 2 2 2 2       3 3 3 3 3w 3 3 3 3 3r   