self avoiding in two dimension. i dont know how can i choose succed walkers?

asked 2015-12-12 16:27:06 +0100

Nazila gravatar image
 for j in range(5):"number of walkers"
        x = 0; y = 0 
        k=0
        sites=[]
        x points=[]
        y points=[]
        for i in range(6):"number of walks"
            p=rand range(4)
            if p==0:
                x+=1
             elf p==1:
                y+=1
             elf p==2:
                x-=1
             elf p==3:
                y-=1
             sites.append([x,y])
             x points.append(x)
             y points.append(y)
            print sites
edit retag flag offensive close merge delete

Comments

What is your question ?

tmonteil gravatar imagetmonteil ( 2015-12-13 14:38:31 +0100 )edit