Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Running a simulation - expected outcome

by hippo (Curate)
on Oct 01, 2012 at 16:46 UTC ( #996693=note: print w/ replies, xml ) Need Help??


in reply to Re: Running a simulation - expected outcome
in thread Running a simulation - expected outcome

That isn't my reading of his algorithm. It looks to me like it can only choose 1 out of 24 squares - there isn't the possibility of moving diagonally. Also the mod means that the edge effects (should) disappear.

The difference between the two simulations is as you say, however: he is constrained to the limited path but Cristoforo is not.


Comment on Re^2: Running a simulation - expected outcome
Re^3: Running a simulation - expected outcome
by BrowserUk (Pope) on Oct 01, 2012 at 18:41 UTC
    That isn't my reading of his algorithm.

    You are probably right.

    I took cristoforo's description of the algorithm -- which includes this passage "moving randomly 1 to 6 cells" -- as correct. Looking back to the originator's code, I do not know where than came from, but I didn't look very hard now, or at all before posting.

    there isn't the possibility of moving diagonally.

    Hm. It depends how you interpret the phrase: moving randomly 1 to 6 cells, (up, down, left or right),, that not quite the same as "not diagonally". I took to mean that move 5 UP and 1 LEFT was a valid move. Hence I came up with my "13 x 13 diamond pattern" and 1:84:

    ......X...... .....XXX..... ....XXXXX.... ...XXXXXXX... ..XXXXXXXXX.. .XXXXXXXXXXX. XXXXXX.XXXXXX .XXXXXXXXXXX. ..XXXXXXXXX.. ...XXXXXXX... ....XXXXX.... .....XXX..... ......X......

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    RIP Neil Armstrong

      Yes, the specs say either of 1 way (up 1 to 6, right 1 to 6, down 1 to 6 or left 1 to 6, where a number is randomly chosen from 1 to 6 for each step).

        My misreading or overthinking.

        But I think that my main point still applies: because the originator was following a path, his choices at each step are far restricted compared to your pick a random start point each time.

        On average, random walks tend to cover far less than the full field of play, which if the infected squares are randomly distributed means the odds of infection are lessened.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        RIP Neil Armstrong

        network sites:

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996693]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2014-12-22 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (113 votes), past polls