from numpy import *
from matplotlib import pylab

order = 34
rand = ones([order+1])
points = 1000
walkers = 10
x = zeros([1000])
for i in range (0,walkers):
    for j in range (1,points):    
        rand[0]=(rand[1]+rand[2]+rand[27]+rand[34])%2
        rand[1:order+1] = rand[0:order]
        if rand[0] == 0:
            x[j]=x[j-1]+1
        else:
            x[j]=x[j-1]-1 
    plot(x)
axis([0,points,-150,150])
show()
