Skip to content

Conversation

@gandalfsaxe
Copy link

@gandalfsaxe gandalfsaxe commented Jul 5, 2018

  1. Gaussians missing parenthesis around sigma**2. Tuned Gaussian parameters slightly so it still looks like old example.
  2. Switched around indices in G in plot title to get correct reward function, i.e. G[int(w[1]), int(w[0])] instead of G[int(w[0]), int(w[1])].

1. Gaussians missing parenthesis around `sigma**2`. Tuned Gaussian parameters slightly so it still looks like old example.
2. Switched around indices in G in plot title to get correct reward function, i.e. `G[int(w[1]), int(w[0])]` instead of `G[int(w[1]), int(w[0])]`.
@cfong32
Copy link

cfong32 commented Sep 27, 2018

I don't quite understand one point:
Why should we use G[int(wi[1]), int(wi[0])] (first [1] then [0]) in calculating the rewards? As far as I can see, wi[0] are corresponding to the x-coordinates and wi[1] are to the y-coordinates. Shouldn't we have the reward function written as G(x, y)? Why was it put as G(y, x)?

@gandalfsaxe
Copy link
Author

I can't remember it clearly anymore, but you can see that further up he defines:

R = np.array([G[int(wi[1]), int(wi[0])] for wi in wp])

So that's of course also the way it should be when displayed in the plot.

I think the x/y mix up stems from the np.meshgrid that has 0,0 in upper left corner and positive x is right, positive y is down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants