Monday, December 08, 2008

Another porno-post

After learning some strange new I decided to do a primitive program in MatLab to solve a Bellman equation through the value iteration algorithm.

This program solves the equation v(x)=max_y {F(x,y)+beta*v(y)} where F is here.

Note that the program is not using any fancy routine to maximize, I just took the maximum at every iteration. I think it is ok. But feedback would be appreciated. Ha ha. This is the plot. I plot the value function after each iteration, the convergence seems to be clear.

No comments: