What I'm more interested in here than in the result of the simulation, is the process of creating it.
然后你们可以进行思考,我对这些过程,比对仿真程序的结果更感兴趣。
So the moral here, again, is whenever you're doing an implementation of a simulation, you do need to have some underlying theory about the model.
所以这里的寓意还是,不管你在做什么东西的仿真程序,你需要有一个,模型的底层程序。
When we did the spring, we had this theory of Hooke's Law that told us something, and we built a simulation, or built some tools around that theory.
当我们写弹簧程序的时候,我们有胡克定律来告诉我们原理,然后我们建立了一个仿真模型,或者说是在这个理论基础上建立了一些工具。
And so now we're going to try and see if we can write a simulation that will give us some insight as to which of these might be better or worse.
现在我们回来看看我们能否,写一个程序来看看,哪一种选择会更好。
After all, I'm going to try and build a simulation of the stock market, so I might as well have the notion of a market, and probably the notion of a stock.
不管怎样,我得建立一个股票市场的仿真程序,所以我最好要有股票的概念,和股市的概念。
So in fact, it is the case, if you look at data, and by the way, that's the way I ended up setting a lot of these parameters and playing with it, was comparing what my simulation said to historical stock data.
所以实际上,在这个例子中,如果你看到数据,顺便说一下,这就是我设置很多变量,然后编程的方式,也就是把我的仿真程序得到的结果,和历史股票数据进行比较。
And as an added incentive for you to pay attention, I'm going to warn you that this particular simulation will appear in the final or a variant of it.
作为提高你们注意力的激励,我要警告你们,这个特殊的仿真程,或者它的变种会再期末考试出现。
And it would take at least an hour do a perfect simulation of the stock market.
而要做一个完美的股市仿真,至少要1个小时。
应用推荐