Skip to content

Instantly share code, notes, and snippets.

@thunderInfy
Created October 9, 2019 20:11
Show Gist options
  • Save thunderInfy/f224c6d68adc8d15ac5fc8e786120693 to your computer and use it in GitHub Desktop.
Save thunderInfy/f224c6d68adc8d15ac5fc8e786120693 to your computer and use it in GitHub Desktop.
# adding reward for moving cars from one location to another (which is negative)
if action <= 0:
ψ = ψ + jcp.moving_reward() * abs(action)
else:
ψ = ψ + jcp.moving_reward() * (action - 1) #one car is moved by one of Jack's employees for free
# adding reward for second parking lot (which is also negative)
if new_state[0] > 10:
ψ = ψ + jcp.second_parking_lot_reward()
if new_state[1] > 10:
ψ = ψ + jcp.second_parking_lot_reward()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment