original_docstring: Policy evaluation implementation (step 2 of algorithm at page 80)
  
      :return: None
      
docstring: Policy evaluation implementation (step 2 of algorithm at page 80)
docstring_tokens: Policy evaluation implementation ( step 2 of algorithm at page 80 )
code: def policy_evaluation():
      """Policy evaluation implementation (step 2 of algorithm at page 80)
  
      :return: None
      """
      delta = 1
      while delta > THETA:
          delta = 0
          old_values = copy.deepcopy(values)
          for state in STATES:
              values[state] = expected_value(old_values, state, policy[state])
              delta = max(delta, abs(values[state] - old_values[state]))
code_tokens: def policy_evaluation ( ) : delta = 1 while delta > THETA : delta = 0 old_values = copy . deepcopy ( values ) for state in STATES : values [ state ] = expected_value ( old_values , state , policy [ state ] ) delta = max ( delta , abs ( values [ state ] - old_values [ state ] ) )
short_docstring: Policy evaluation implementation (step 2 of algorithm at page 80)
short_docstring_tokens: Policy evaluation implementation ( step 2 of algorithm at page 80 )
comment: """Policy evaluation implementation (step 2 of algorithm at page 80)
  
      :return: None
      """