random walks and more about data vizualization class oddfield(field)def __init__(selfnumholesxrangeyrange)field __init__(selfself wormholes {for in range(numholes) random randint(-xrangexrangey random randint(-yrangeyrangenewx random randint(-xrangexrangenewy random randint(-yrangeyrangenewloc location(newxnewyself wormholes[(xy)newloc def movedrunk(selfdrunk)field movedrunk(selfdrunkx self drunks[drunkgetx( self drunks[drunkgety(if (xyin self wormholesself drunks[drunkself wormholes[(xy)figure fields with strange properties when we ran tracewalk((usualdrunkcolddrunkewdrunk) )we got the rather odd-looking plot clearly changing the properties of the field has had dramatic effect howeverthat is not the point of this example the main points arebecause of the way we structured our codeit was easy to accommodate significant change to the situation being modeled just as we could add different kinds of drunks without touching fieldwe can add new kind of field without touching drunk or any of its subclasses (had we been sufficiently prescient to make the field parameter of tracewalkwe wouldn' have had to change tracewalk either while it would have been feasible to analytically derive different kinds of information about the expected behavior of the simple random walk and even the biased random walksit would have been challenging to do so once the wormholes were introduced yet it was exceedingly simple to change the simulation to model the new situation simulation models often enjoy this advantage relative to analytic models