Feb-03-2017, 12:15 PM
(Feb-03-2017, 11:33 AM)Larz60+ Wrote: You need to set a seed. See https://docs.python.org/3.6/library/random.html
the syntax is
random.seed()
That really shouldn't be the issue. The random module is seeded initially regardless (with a call to the systems clock I believe). Subsequent calls to random.randint shouldn't give the same value because of this. Providing your own seed is generally only needed if you want to be able to have deterministic behavior.
I think the issue here is simply typos:
u1move = u1step + u1jump u1step = u1move u2move = u2step + u1jump u2step = u2move u3move = u3step + u1jump u3step = u3moveI'm guessing those u1jump's should be u2jump and u3jump for u2move and u3move respectively.