ó
ÌÄiQc           @   s   d  d d „  ƒ  YZ  d S(   t   Environmentc           B   s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s   t  d S(   s:   
        Returns the current state of enviornment
        N(   t   abstract(   t   self(    (    sU   C:\Users\Nicholas\Desktop\CS188X Berkeley\05 Projects\03 Reinforcement\environment.pyt   getCurrentState   s    c         C   s   t  d S(   sª   
          Returns possible actions the agent
          can take in the given state. Can
          return the empty list if we are in
          a terminal state.
        N(   R   (   R   t   state(    (    sU   C:\Users\Nicholas\Desktop\CS188X Berkeley\05 Projects\03 Reinforcement\environment.pyt   getPossibleActions   s    c         C   s   t  d S(   s£   
          Performs the given action in the current
          environment state and updates the enviornment.

          Returns a (reward, nextState) pair
        N(   R   (   R   t   action(    (    sU   C:\Users\Nicholas\Desktop\CS188X Berkeley\05 Projects\03 Reinforcement\environment.pyt   doAction   s    c         C   s   t  d S(   s?   
          Resets the current state to the start state
        N(   R   (   R   (    (    sU   C:\Users\Nicholas\Desktop\CS188X Berkeley\05 Projects\03 Reinforcement\environment.pyt   reset'   s    c         C   s+   |  j  ƒ  } |  j | ƒ } t | ƒ d k S(   sn   
          Has the enviornment entered a terminal
          state? This means there are no successors
        i    (   R   R   t   len(   R   R   t   actions(    (    sU   C:\Users\Nicholas\Desktop\CS188X Berkeley\05 Projects\03 Reinforcement\environment.pyt
   isTerminal-   s    (   t   __name__t
   __module__R   R   R   R   R   (    (    (    sU   C:\Users\Nicholas\Desktop\CS188X Berkeley\05 Projects\03 Reinforcement\environment.pyR       s
   						N(    (   R    (    (    (    sU   C:\Users\Nicholas\Desktop\CS188X Berkeley\05 Projects\03 Reinforcement\environment.pyt   <module>   s    