更改

添加12字节 、 2021年7月30日 (五) 17:29
第250行: 第250行:     
==Definitions==
 
==Definitions==
  −
A Monte Carlo method simulation is defined as any method that utilizes sequences of random numbers to perform the simulation.  Monte Carlo simulations are applied to many topics including quantum chromodynamics, cancer radiation therapy, traffic flow, stellar evolution and VLSI design.  All these simulations require the use of random numbers and therefore pseudorandom number generators, which makes creating random-like numbers very important.
  −
  −
蒙特卡罗方法模拟被定义为任何利用随机数序列来执行模拟的方法。蒙特卡罗模拟应用于许多课题,包括量子色动力学,癌症放射治疗,交通流,恒星进化和超大规模集成电路设计。所有这些模拟都需要使用随机数,因此产生类随机数的伪随机数生成器非常重要。
      
There is no consensus on how ''Monte Carlo'' should be defined. For example, Ripley<ref name=Ripley>{{harvnb|Ripley|1987}}</ref> defines most probabilistic modeling as ''[[stochastic simulation]]'', with ''Monte Carlo'' being reserved for [[Monte Carlo integration]] and Monte Carlo statistical tests. [[Shlomo Sawilowsky|Sawilowsky]]<ref name=Sawilowsky>{{harvnb|Sawilowsky|2003}}</ref> distinguishes between a [[simulation]], a Monte Carlo method, and a Monte Carlo simulation: a simulation is a fictitious representation of reality, a Monte Carlo method is a technique that can be used to solve a mathematical or statistical problem, and a Monte Carlo simulation uses repeated sampling to obtain the statistical properties of some phenomenon (or behavior). Examples:
 
There is no consensus on how ''Monte Carlo'' should be defined. For example, Ripley<ref name=Ripley>{{harvnb|Ripley|1987}}</ref> defines most probabilistic modeling as ''[[stochastic simulation]]'', with ''Monte Carlo'' being reserved for [[Monte Carlo integration]] and Monte Carlo statistical tests. [[Shlomo Sawilowsky|Sawilowsky]]<ref name=Sawilowsky>{{harvnb|Sawilowsky|2003}}</ref> distinguishes between a [[simulation]], a Monte Carlo method, and a Monte Carlo simulation: a simulation is a fictitious representation of reality, a Monte Carlo method is a technique that can be used to solve a mathematical or statistical problem, and a Monte Carlo simulation uses repeated sampling to obtain the statistical properties of some phenomenon (or behavior). Examples:
第266行: 第262行:     
卡洛斯和惠特洛克指出,这种区别并不总是容易维持。例如,来自原子的辐射是一种自然的随机过程。它可以直接模拟,也可以用随机方程描述其平均行为,这些随机方程本身可以用蒙特卡罗方法求解。“实际上,同样的计算机代码可以同时被看作是‘自然模拟’或者通过自然抽样解方程。”
 
卡洛斯和惠特洛克指出,这种区别并不总是容易维持。例如,来自原子的辐射是一种自然的随机过程。它可以直接模拟,也可以用随机方程描述其平均行为,这些随机方程本身可以用蒙特卡罗方法求解。“实际上,同样的计算机代码可以同时被看作是‘自然模拟’或者通过自然抽样解方程。”
  −
A simple example of how a computer would perform a Monte Carlo simulation is the calculation of π.  If a square enclosed a circle and a point were randomly chosen inside the square the point would either lie inside the circle or outside it.  If the process were repeated many times, the ratio of the random points that lie inside the circle to the total number of random points in the square would approximate the ratio of the area of the circle to the area of the square.  From this we can estimate pi, as shown in the Python code below utilizing a SciPy package to generate pseudorandom numbers with the MT19937 algorithm.  Note that this method is a computationally inefficient way to numerically approximate π.
  −
  −
计算机进行蒙特卡罗模拟的一个简单实例是 π 的计算。如果一个正方形包含一个圆,一个点在正方形内被随机选择,那么这个点要么在圆内,要么在圆外。如果这个过程重复多次,圆内的随机点与正方形内随机点总数的比值将近似于圆的面积与正方形面积的比值。由此我们可以估算π,如下面的Python代码所示,利用 SciPy 包使用 MT19937算法生成伪随机数生成器。值得注意的是,这种从数值上近似得到π的方法计算效率低下。
      
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
第320行: 第312行:       −
 
+
True area of quarter circle is pi/4 and has N_qtr_circle points within it.
True area of quarter circle is pi/4 and has N_qtr_circle points within it.
      
四分之一圆的真实面积是 π/4,其中有 n _ qtr _ 圆点。
 
四分之一圆的真实面积是 π/4,其中有 n _ qtr _ 圆点。
第327行: 第318行:  
What this means depends on the application, but typically they should pass a series of statistical tests. Testing that the numbers are [[Uniform distribution (continuous)|uniformly distributed]] or follow another desired distribution when a large enough number of elements of the sequence are considered is one of the simplest and most common ones. Weak correlations between successive samples are also often desirable/necessary.
 
What this means depends on the application, but typically they should pass a series of statistical tests. Testing that the numbers are [[Uniform distribution (continuous)|uniformly distributed]] or follow another desired distribution when a large enough number of elements of the sequence are considered is one of the simplest and most common ones. Weak correlations between successive samples are also often desirable/necessary.
   −
True area of the square is 1 and has N points within it, hence we approximate pi with
+
True area of the square is 1 and has N points within it, hence we approximate pi with
    
平方的真实面积是1,并且有 n 个点在其中,因此我们用
 
平方的真实面积是1,并且有 n 个点在其中,因此我们用
        第341行: 第331行:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
</syntaxhighlight >
+
<nowiki></syntaxhighlight ></nowiki>
    
The main idea behind this method is that the results are computed based on repeated random sampling and statistical analysis. The Monte Carlo simulation is, in fact, random experimentations, in the case that, the results of these experiments are not well known. Monte Carlo simulations are typically characterized by many unknown parameters, many of which are difficult to obtain experimentally. Monte Carlo simulation methods do not always require truly random numbers to be useful (although, for some applications such as primality testing, unpredictability is vital). Many of the most useful techniques use deterministic, pseudorandom sequences, making it easy to test and re-run simulations. The only quality usually necessary to make good simulations is for the pseudo-random sequence to appear "random enough" in a certain sense.
 
The main idea behind this method is that the results are computed based on repeated random sampling and statistical analysis. The Monte Carlo simulation is, in fact, random experimentations, in the case that, the results of these experiments are not well known. Monte Carlo simulations are typically characterized by many unknown parameters, many of which are difficult to obtain experimentally. Monte Carlo simulation methods do not always require truly random numbers to be useful (although, for some applications such as primality testing, unpredictability is vital). Many of the most useful techniques use deterministic, pseudorandom sequences, making it easy to test and re-run simulations. The only quality usually necessary to make good simulations is for the pseudo-random sequence to appear "random enough" in a certain sense.
第387行: 第377行:     
A ''Monte Carlo method'' simulation is defined as any method that utilizes sequences of random numbers to perform the simulation.  Monte Carlo simulations are applied to many topics including [[quantum chromodynamics]], cancer radiation therapy, traffic flow, [[stellar evolution]] and VLSI design.  All these simulations require the use of random numbers and therefore [[pseudorandom number generator]]s, which makes creating random-like numbers very important.
 
A ''Monte Carlo method'' simulation is defined as any method that utilizes sequences of random numbers to perform the simulation.  Monte Carlo simulations are applied to many topics including [[quantum chromodynamics]], cancer radiation therapy, traffic flow, [[stellar evolution]] and VLSI design.  All these simulations require the use of random numbers and therefore [[pseudorandom number generator]]s, which makes creating random-like numbers very important.
 +
 +
A Monte Carlo method simulation is defined as any method that utilizes sequences of random numbers to perform the simulation.  Monte Carlo simulations are applied to many topics including quantum chromodynamics, cancer radiation therapy, traffic flow, stellar evolution and VLSI design.  All these simulations require the use of random numbers and therefore pseudorandom number generators, which makes creating random-like numbers very important.
 +
 +
蒙特卡罗方法模拟被定义为任何利用随机数序列来执行模拟的方法。蒙特卡罗模拟应用于许多课题,包括量子色动力学,癌症放射治疗,交通流,恒星进化和超大规模集成电路设计。所有这些模拟都需要使用随机数,因此产生类随机数的伪随机数生成器非常重要。
    
A simple example of how a computer would perform a Monte Carlo simulation is the calculation of [[Pi|π]].  If a square enclosed a circle and a point were randomly chosen inside the square the point would either lie inside the circle or outside it.  If the process were repeated many times, the ratio of the random points that lie inside the circle to the total number of random points in the square would approximate the ratio of the area of the circle to the area of the square.  From this we can estimate pi, as shown in the [[Python (programming language)|Python]] code below utilizing a [[SciPy]] package to generate pseudorandom numbers with the [[Mersenne twister|MT19937]] algorithm.  Note that this method is a computationally inefficient way to [[Numerical approximations of π|numerically approximate π]].
 
A simple example of how a computer would perform a Monte Carlo simulation is the calculation of [[Pi|π]].  If a square enclosed a circle and a point were randomly chosen inside the square the point would either lie inside the circle or outside it.  If the process were repeated many times, the ratio of the random points that lie inside the circle to the total number of random points in the square would approximate the ratio of the area of the circle to the area of the square.  From this we can estimate pi, as shown in the [[Python (programming language)|Python]] code below utilizing a [[SciPy]] package to generate pseudorandom numbers with the [[Mersenne twister|MT19937]] algorithm.  Note that this method is a computationally inefficient way to [[Numerical approximations of π|numerically approximate π]].
 +
 +
A simple example of how a computer would perform a Monte Carlo simulation is the calculation of π.  If a square enclosed a circle and a point were randomly chosen inside the square the point would either lie inside the circle or outside it.  If the process were repeated many times, the ratio of the random points that lie inside the circle to the total number of random points in the square would approximate the ratio of the area of the circle to the area of the square.  From this we can estimate pi, as shown in the Python code below utilizing a SciPy package to generate pseudorandom numbers with the MT19937 algorithm.  Note that this method is a computationally inefficient way to numerically approximate π.
 +
 +
计算机进行蒙特卡罗模拟的一个简单实例是 π 的计算。如果一个正方形包含一个圆,一个点在正方形内被随机选择,那么这个点要么在圆内,要么在圆外。如果这个过程重复多次,圆内的随机点与正方形内随机点总数的比值将近似于圆的面积与正方形面积的比值。由此我们可以估算π,如下面的Python代码所示,利用 SciPy 包使用 MT19937算法生成伪随机数生成器。值得注意的是,这种从数值上近似得到π的方法计算效率低下。
    
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
    
import scipy
 
import scipy
        第435行: 第432行:     
==Applications==
 
==Applications==
  −
Computer simulations allow us to monitor the local environment of a particular molecule to see if some chemical reaction is happening for instance. In cases where it is not feasible to conduct a physical experiment, thought experiments can be conducted (for instance: breaking bonds, introducing impurities at specific sites, changing the local/global structure, or introducing external fields).
  −
  −
计算机模拟使我们能够监测特定分子的局部环境,看看是否正在发生某种化学反应,例如。在无法进行物理实验的情况下,可以进行思维实验(例如: 打破键,在特定位置引入杂质,改变局部/全球结构,或引入外部场)。
      
Monte Carlo methods are especially useful for simulating phenomena with significant [[uncertainty]] in inputs and systems with many [[coupling (physics)|coupled]] degrees of freedom. Areas of application include:
 
Monte Carlo methods are especially useful for simulating phenomena with significant [[uncertainty]] in inputs and systems with many [[coupling (physics)|coupled]] degrees of freedom. Areas of application include:
    
===Physical sciences===
 
===Physical sciences===
  −
Path tracing, occasionally referred to as Monte Carlo ray tracing, renders a 3D scene by randomly tracing samples of possible light paths. Repeated sampling of any given pixel will eventually cause the average of the samples to converge on the correct solution of the rendering equation, making it one of the most physically accurate 3D graphics rendering methods in existence.
  −
  −
路径追踪,偶尔被称为蒙特卡罗光线追踪,通过随机追踪可能光路的样本来呈现一个三维场景。对任何给定像素的重复采样最终将导致样本的平均值收敛到渲染方程的正确解,使其成为现存物理上最精确的3 d 图形渲染方法之一。
      
{{Computational physics}}
 
{{Computational physics}}
第457行: 第446行:     
蒙特卡罗方法在计算物理学、物理化学和相关应用领域中非常重要,并且有各种各样的应用,从复杂的量子色动力学计算到设计热屏和空气动力学形式,以及辐射剂量计算的辐射传输模型。在统计物理学中,蒙特卡罗分子模拟是计算分子动力学的一种替代方法,而蒙特卡罗方法被用来计算简单粒子和聚合物体系的统计场理论。量子蒙特卡罗法方法解决了量子系统的多体问题。在实验粒子物理学中,蒙特卡罗方法被用来设计探测器,了解它们的行为,并将实验数据与理论进行比较。在天体物理学中,它们以各种不同的方式被用来模拟星系演化和微波辐射通过粗糙行星表面的传输。蒙特卡罗方法也用于构成现代天气预报基础的集合模型中。
 
蒙特卡罗方法在计算物理学、物理化学和相关应用领域中非常重要,并且有各种各样的应用,从复杂的量子色动力学计算到设计热屏和空气动力学形式,以及辐射剂量计算的辐射传输模型。在统计物理学中,蒙特卡罗分子模拟是计算分子动力学的一种替代方法,而蒙特卡罗方法被用来计算简单粒子和聚合物体系的统计场理论。量子蒙特卡罗法方法解决了量子系统的多体问题。在实验粒子物理学中,蒙特卡罗方法被用来设计探测器,了解它们的行为,并将实验数据与理论进行比较。在天体物理学中,它们以各种不同的方式被用来模拟星系演化和微波辐射通过粗糙行星表面的传输。蒙特卡罗方法也用于构成现代天气预报基础的集合模型中。
  −
The standards for Monte Carlo experiments in statistics were set by Sawilowsky. In applied statistics, Monte Carlo methods may be used for at least four purposes:
  −
  −
蒙特卡罗方法的统计标准是由 Sawilowsky 制定的。在应用统计学中,蒙特卡罗方法至少可用于四种目的:
      
===Engineering===
 
===Engineering===
第512行: 第497行:     
Computer simulations allow us to monitor the local environment of a particular [[biomolecule|molecule]] to see if some [[chemical reaction]] is happening for instance. In cases where it is not feasible to conduct a physical experiment, [[thought experiment]]s can be conducted (for instance: breaking bonds, introducing impurities at specific sites, changing the local/global structure, or introducing external fields).
 
Computer simulations allow us to monitor the local environment of a particular [[biomolecule|molecule]] to see if some [[chemical reaction]] is happening for instance. In cases where it is not feasible to conduct a physical experiment, [[thought experiment]]s can be conducted (for instance: breaking bonds, introducing impurities at specific sites, changing the local/global structure, or introducing external fields).
 +
 +
Computer simulations allow us to monitor the local environment of a particular molecule to see if some chemical reaction is happening for instance. In cases where it is not feasible to conduct a physical experiment, thought experiments can be conducted (for instance: breaking bonds, introducing impurities at specific sites, changing the local/global structure, or introducing external fields).
 +
 +
计算机模拟使我们能够监测特定分子的局部环境,看看是否正在发生某种化学反应,例如。在无法进行物理实验的情况下,可以进行思维实验(例如: 打破键,在特定位置引入杂质,改变局部/全球结构,或引入外部场)。
    
===Computer graphics===
 
===Computer graphics===
    
[[Path tracing]], occasionally referred to as Monte Carlo ray tracing, renders a 3D scene by randomly tracing samples of possible light paths. Repeated sampling of any given pixel will eventually cause the average of the samples to converge on the correct solution of the [[rendering equation]], making it one of the most physically accurate 3D graphics rendering methods in existence.
 
[[Path tracing]], occasionally referred to as Monte Carlo ray tracing, renders a 3D scene by randomly tracing samples of possible light paths. Repeated sampling of any given pixel will eventually cause the average of the samples to converge on the correct solution of the [[rendering equation]], making it one of the most physically accurate 3D graphics rendering methods in existence.
 +
 +
Path tracing, occasionally referred to as Monte Carlo ray tracing, renders a 3D scene by randomly tracing samples of possible light paths. Repeated sampling of any given pixel will eventually cause the average of the samples to converge on the correct solution of the rendering equation, making it one of the most physically accurate 3D graphics rendering methods in existence.
 +
 +
路径追踪,偶尔被称为蒙特卡罗光线追踪,通过随机追踪可能光路的样本来呈现一个三维场景。对任何给定像素的重复采样最终将导致样本的平均值收敛到渲染方程的正确解,使其成为现存物理上最精确的3 d 图形渲染方法之一。
    
Monte Carlo methods are also efficient in solving coupled integral differential equations of radiation fields and energy transport, and thus these methods have been used in global illumination computations that produce photo-realistic images of virtual 3D models, with applications in video games, architecture, design, computer generated films, and cinematic special effects.
 
Monte Carlo methods are also efficient in solving coupled integral differential equations of radiation fields and energy transport, and thus these methods have been used in global illumination computations that produce photo-realistic images of virtual 3D models, with applications in video games, architecture, design, computer generated films, and cinematic special effects.
第524行: 第517行:     
The standards for Monte Carlo experiments in statistics were set by Sawilowsky.<ref>{{cite journal | last1 = Cassey | last2 = Smith | year = 2014 | title = Simulating confidence for the Ellison-Glaeser Index | url = | journal = Journal of Urban Economics | volume = 81 | issue = | page = 93 | doi =  10.1016/j.jue.2014.02.005}}</ref> In applied statistics, Monte Carlo methods may be used for at least four purposes:
 
The standards for Monte Carlo experiments in statistics were set by Sawilowsky.<ref>{{cite journal | last1 = Cassey | last2 = Smith | year = 2014 | title = Simulating confidence for the Ellison-Glaeser Index | url = | journal = Journal of Urban Economics | volume = 81 | issue = | page = 93 | doi =  10.1016/j.jue.2014.02.005}}</ref> In applied statistics, Monte Carlo methods may be used for at least four purposes:
 +
 +
The standards for Monte Carlo experiments in statistics were set by Sawilowsky. In applied statistics, Monte Carlo methods may be used for at least four purposes:
 +
 +
蒙特卡罗方法的统计标准是由 Sawilowsky 制定的。在应用统计学中,蒙特卡罗方法至少可用于四种目的:
    
The US Coast Guard utilizes Monte Carlo methods within its computer modeling software SAROPS in order to calculate the probable locations of vessels during search and rescue operations. Each simulation can generate as many as ten thousand data points that are randomly distributed based upon provided variables. Search patterns are then generated based upon extrapolations of these data in order to optimize the probability of containment (POC) and the probability of detection (POD), which together will equal an overall probability of success (POS). Ultimately this serves as a practical application of probability distribution in order to provide the swiftest and most expedient method of rescue, saving both lives and resources.
 
The US Coast Guard utilizes Monte Carlo methods within its computer modeling software SAROPS in order to calculate the probable locations of vessels during search and rescue operations. Each simulation can generate as many as ten thousand data points that are randomly distributed based upon provided variables. Search patterns are then generated based upon extrapolations of these data in order to optimize the probability of containment (POC) and the probability of detection (POD), which together will equal an overall probability of success (POS). Ultimately this serves as a practical application of probability distribution in order to provide the swiftest and most expedient method of rescue, saving both lives and resources.
596

个编辑