Reinforcement Learning, Ciencia De Dados, Data Science, Machine Learning.
rewards = {s: -1 if s != 12 else 10 for s in states} lower_edge = [50 + y for y in yr] upper_edge = [10 + y for y in yr] left_edge = [10*x + 1 for x in xr] right_edge = [10*x + 5 for x in xr] def move_left(s): return s-1 if not s in left_edge else s def move_right(s): return s+1 if not s in