【Python 編程】2D 隨機游走 2D Random Walk
By: Tao Steven Zheng (鄭濤)
A random walk is a stochastic process that describes a path that consists of a succession of random steps on some mathematical space such as the integers. The following Python code generates three 2-dimensional random walks and plots them.
隨機游動(random walk)是一種隨機過程(stochastic process),它描述了在某些數(shù)學空間(如整數(shù))上由一系列隨機步驟組成的隨機游動。以下的 Python 代碼生成三個二維隨機游動并繪制它們。
Results?

Looks like Brownian motion!
看上去像布朗運動!
Animate the 2D random walk
標簽: