in reply to Running a simulation - expected outcome
The difference is that at any step point, his algorithm can only chose from a maximum (less when near edges) of 84 squares -- a 13 x 13 diamond pattern -- surrounding his current position.
Your code, by virtue of not tracing a path, but simply picking any random square from the full set, has the full 10,000 choices each time.
To correctly calculate his odds, you would need to factor in the odds of one or more of those 84 possibilities being contaminated, and then 1:84 chance that he will pick one of them.
Ie. His odds of contamination are less, because he has less chance of reaching all of the cells. Or rather, any given contaminated cell.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Running a simulation - expected outcome
by BillKSmith (Monsignor) on Sep 30, 2012 at 04:00 UTC | |
by BrowserUk (Patriarch) on Sep 30, 2012 at 05:35 UTC | |
|
Re^2: Running a simulation - expected outcome
by hippo (Archbishop) on Oct 01, 2012 at 16:46 UTC | |
by BrowserUk (Patriarch) on Oct 01, 2012 at 18:41 UTC | |
by Cristoforo (Curate) on Oct 01, 2012 at 20:59 UTC | |
by BrowserUk (Patriarch) on Oct 01, 2012 at 21:28 UTC |