第十二课:Introducing to Simulation and Random Walks

回顾:Person -> MIT Person -> UG/G

Yield is a generator.

A generator is a function that remembers the point in function body where last returned, plus all the local variable.

Analytic methods:

—-predict behavior given some initial conditions and some parameters.

Simulation methods:

—-systems not mathematically tractable

—-successively refining series of simulations

—-easier to extract useful intermediate results


Build a model

—-gives useful information about behavior of  a system

—-approximation to reality

—simulation models are descriptive , not prescriptive


Brownian motion is an example of a random walk.


step distance probability

1 1 1

2 0||根号2||2    1/4||2/4||1/4

3 1||1|| 3 ||根号5||1||根号5  1/4||1/4||1/16||1/4||1/16||1/8

每步距离平均数1 1,1 1.2,3 1.4



第十三课:Some Basic Probablity and Plotting Data



Causal non-determinism 因果不确定性

Predictive non-determinism  对现世观测的不准确导致无法精确预测未来

Stochastic processes 随机过程 Next state depends upon previous states & some random elements.

python random.choice—>random.random

Each roll is independent.

What fraction of possible results have property. (0-1)



电子邮件地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.