
    &`i                     `    d dl Zd dlmZmZmZ d dlmZ dZdZ	dZ
 G d dej                  ZdS )	    N)BoxDictDiscrete)Repeated         c                   ,    e Zd ZdZd ZddddZd ZdS )	SimpleRPGai  Example of a custom env with a complex, structured observation.

    The observation is a list of players, each of which is a Dict of
    attributes, and may further hold a list of items (categorical space).

    Note that the env doesn't train, it's just a dummy example to show how to
    use spaces.Repeated in a custom model (see CustomRPGModel below).
    c           	         d| _         t          d          | _        t          d          | _        t	          ddd          | _        t          t	          dd	d
          t	          ddd          t          | j        t                    t          | j        t                    d          | _
        t          | j
        t                    | _        d S )Nr   r      i(#  i'  )r   )shapeid   )r	      )
   )max_len)locationstatusitemseffects)cur_posr   action_space
item_spacer   effect_spacer   r   	MAX_ITEMSMAX_EFFECTSplayer_spaceMAX_PLAYERSobservation_space)selfconfigs     ~/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/rllib/examples/envs/classes/simple_rpg.py__init__zSimpleRPG.__init__   s    $QKK #1++  d$777 !c666b!5111!$/9EEE#D$5{KKK	 
 
 "*$*;[!Q!Q!Q    N)seedoptionsc                8    | j                                         i fS )Nr    sample)r!   r&   r'   s      r#   resetzSimpleRPG.reset-   s    %,,..22r%   c                 >    | j                                         dddi fS )Nr   TFr)   )r!   actions     r#   stepzSimpleRPG.step0   s"    %,,..4BBr%   )__name__
__module____qualname____doc__r$   r+   r.    r%   r#   r   r      sd         R R R. !$ 3 3 3 3 3C C C C Cr%   r   )	gymnasiumgymgymnasium.spacesr   r   r   ray.rllib.utils.spaces.repeatedr   r   r   r   Envr   r3   r%   r#   <module>r9      s        0 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4 	%C %C %C %C %C %C %C %C %C %Cr%   