Skip to main content
gamedev.net
🔒 Locked

Monte Carlo LES algorithm

Started by HellCreator Jan 18, 2007 at 11:27 AM 3 replies 1k views
Original Post
HellCreator
HellCreator
Hi Please I need some code or idea on how to implement solvation of ( ax=b )system of linear equations by Monte Carlo methods. any idea will be apreciated. i just can't imagine on where to start think :( i've found a tons stuff including implementation about integral solvation and some complicated stuf such non linear system etc but i need 3x3 or 4x4 matrix solvation method using MC some iterative thing such Jacobian or Gauss Zeidel is done and inserted into mine mind but same stuff by MC not yet also error estimation method for MC just trying and cant start at any point
Can't be root?Reboot!mount -r /home/hell
grhodes_at_work
grhodes_at_work
I don't believe I've ever heard of using MC method to solve a linear system. Typically MC would be used to simulate some uncertain system, say figuring out where a tossed baseball will come to rest. The idea is to run a deterministic baseball sim many times, each time randomizing the initial position, velocity, and spin. Within each run you might have to solve ax=b, but that would be independent of the MC sim. Then, as the runs are computed, accumulate statistics such as the mean position where the ball comes to rest, standard deviation of position from that mean. But, MC typically sits outside of the actual linear system solve.

Now....If the a or b in ax=b are themselves uncertain, then I could possibly imagine coming up with some statistical linearization of the problem that would yield a solution, x, that directly characterizes its uncertainties. We have a group here at my office who focus on probabilistic methods and I am certain they do something along these lines for some problems. Given my better-than-many but still-novice-level understanding of probabilistic and numerical methods, this is an entirely different approach than MC.

I have no idea if this helps. But I hope it does!
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
HellCreator
HellCreator
nop :( it isn't helps
I have some idea
please examine and give Your remarks

lets say in integration (S finding)
we have N summations of function with random parameter in range [a,b]

the function f(x) is an 1-ns dimension but probably not linear
let say the function we try to integrate is linear
y=Ax+B where A,B-scalars
then lets applay integration on left and right sides
sigma Axi+B for i parts in range[a,b] defines integral (S) of linear function
or y-Ax=B in other way then
S(linear function) - sigma (Axi) = B*i
so we can apply MC integration and in each step with same xi to find Axi
and since B is scalar and i known and defined by our err meaning
and if we have two equations with hard dependency
and this makes them system of linear equations in 2-nd dimension
at end we can find the mean y=S/i and the mean x= (S-B*i)/A*i
this make definition of MC method for 2x2 matrix
????

do i miss some thing or completly out ? :(
Can't be root?Reboot!mount -r /home/hell
grhodes_at_work
grhodes_at_work
You may not be far off. Your description is brief and lacking some details, but I see now that you are talking about Monte Carlo integration, rather than the simple Monte Carlo simulations that I am familiar with. I'm not really familiar with Monte Carlo integration from a theoretical point-of-view, and so I have to say I'm uncomfortable trying to advise whether you have it right or wrong. Perhaps someone else will reply, when they see the thread bumped. Good luck!
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
taby
taby
I have a feeling I'm kind of missing what you're asking... How would the following apply to your work?

Poisson equation solving using MC integration

Either way, I'd be interested to see how it works out for you compared to the relaxation techniques that you mentioned are already implemented -- Gauss-Seidel, Jacobian.

Another really straightforward explanation of Monte Carlo integration is found in C for Scientists and Engineers by Johnsonbaugh and Kalin.

Here's the main part of their explanation:

The function e^(-(x^2/2)) has no antiderivative which consists of plain old functions and expressions. So, one must numerically integrate in order to approximate the area below its curve.

Monte Carlo integration is when one samples random points inside of an area to determine if the x-y position satisfies the equation.

To integrate over the range 0 <= x <= 1 and 0 <= y <= 1 (a surface area of 1 unit squared):
a) Choose a random point within the integration area
b) If y for this point <= e^(-(x^2/2)), then the point is within the area below the curve -- considered to be a "hit"
c) Repeat a) and b) n times
d) Final integrated area = (hit count) / n * (sample area)

Another easy example is the y = x equation. If one takes enough random points within the 1x1 sample area as used above, one will find that exactly half of the sample points lie above the function line. As the number of samples increases, the answer should converge slowly but surely to be 0.5, and the sample point cloud will also actually begin to visually represent which half of the sample area is considered to be above or below the function line.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.