I've been playing with calculating the value and stopping points for loss rebates. I started with roulette which has been written about and my numbers match so then I thought I would apply the same approach to craps.
I must have an bug with my code because the EV is just way too big. (I'm expecting craps to be less good than roulette for loss rebates.) Would anyone mind reviewing what I have and pointing out what I have wrong?
The following is a snippet of MATLAB code I'm using for value iteration. Initially I have a vector v(w) = q(w) where q(w) is the quitting function of a 10% loss rebate for win values -1000 to 1000 units. So before iterating v(1 unit loss) = -0.9 and so on. Then I feed that into the following:
function o = lr_craps_iteration(v,odds)
o = v;
for w = 1:numel(v)
if w < 2 + odds || w > (size(v, 2) - 1 - 2*odds)
o(w) = v(w);
else
o(w) = max(v(w), (2/9)*v(w+1) + (1/9)*v(w-1) + ...
(1/6)*((1/3)*v(w+1+2*odds) + (2/3)*v(w-1-odds)) +...
(2/9)*((2/5)*v(w+1+(3/2)*odds) + (3/5)*v(w-1-odds)) +...
(5/18)*((5/11)*v(w+1+(6/5)*odds) + (6/11)*v(w-1-odds)));
end
end
end

