JesseM1024

snowball_chunkload_random_process雪球加载末地这一随机过程的概率分析

May 5th, 2025
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 8.68 KB | Gaming | 0 0
  1. \documentclass{article}
  2. \usepackage{graphicx} % Required for inserting images
  3. \usepackage{amsmath}
  4. \usepackage{amssymb}
  5. \usepackage{xeCJK}
  6. \usepackage{tikz}
  7. \usepackage{booktabs}
  8. \usepackage{geometry}
  9. \usepackage{pgfplots}
  10. \pgfplotsset{compat=1.18}
  11.  
  12. \usetikzlibrary{arrows.meta, positioning, decorations.pathreplacing,calc}
  13.  
  14. \title{雪球加载末地这一随机过程的概率分析}
  15. \author{JesseM1024}
  16. \date{May 2025}
  17.  
  18. \begin{document}
  19.  
  20. \maketitle
  21.  
  22. \section{雪球初速随机过程}
  23.  
  24. 使用 $a$ 为左端点, $c$ 为折点, $b$ 为右端点的三角分布,有如下概率函数
  25.  
  26. \[
  27. TriangPDF(x,a,b,c) = \left\{
  28. \begin{array}{ll}
  29. 0 & \text{for } x < a, \\[1.2ex]
  30. \frac{2(x - a)}{(b - a)(c - a)} & \text{for } a \leq x < c, \\[1.2ex]
  31. \frac{2}{b - a} & \text{for } x = c, \\[1.2ex]
  32. \frac{2(b - x)}{(b - a)(b - c)} & \text{for } c < x \leq b, \\[1.2ex]
  33. 0 & \text{for } b < x
  34. \end{array}
  35. \right.
  36. \]
  37. \[
  38. TriangCDF(x,a,b,c) = \left\{
  39. \begin{array}{ll}
  40. 0 & \text{for } x \leq a, \\[1.2ex]
  41. \frac{(x - a)^2}{(b - a)(c - a)} & \text{for } a < x \leq c, \\[1.2ex]
  42. 1 - \frac{(b - x)^2}{(b - a)(b - c)} & \text{for } c < x < b, \\[1.2ex]
  43. 1 & \text{for } b \leq x
  44. \end{array}
  45. \right.
  46. \]
  47. 发射器向下发射时,由于目标向量标准化后为$(0,-1,0)$,有$power=1.1$, $uncertainty = 6$,很明显$v_{x}, v_{z}$速度分量应当为
  48. \[
  49. v_{x} \sim power \cdot TriangPDF(x,-0.0172275 uncertainty,0.0172275 uncertainty,0)
  50. \]
  51. \[
  52. v_{x} \sim TriangPDF(x,-0.1137015,0.1137015,0)
  53. \]
  54. \[
  55. v_{z} \sim TriangPDF(x,-0.1137015,0.1137015,0)
  56. \]
  57. 使用雪人时,目标轴向近似为$(0,0,1)$,有$power=1.6, uncertainty = 12$,很明显$v_{x}, v_{z}$速度分量应当为
  58. \[
  59. v_{x}\sim triang(-0.330768,0,0.330768)
  60. \]
  61. \[
  62. v_{z}\sim triang(1.269232,1.6,1.930768)
  63. \]
  64.  
  65. \newpage
  66. \section{水中运动学模型}
  67.  
  68. 对于玩家投掷的雪球,$t=0$在水中生成后,$t=1$仍使用空气阻力计算速度增量、位移,$t=2$才开始使用水中阻力;而雪人很明显需要在空气中,同样的$t=1$空阻,$t=2$水阻。使发射的雪球在使雪球生成时间刻为$t=0$,在$\mathbf{x}_{0} = (x_{0},y_{0},z_{0})$处,有初速$\mathbf{v}_{0} = (v_{x0},v_{y0},v_{z0})$,则:
  69. \[
  70. \mathbf{v}_{t}=\left\{
  71. \begin{array}{ll}
  72. 0.8\mathbf{v}_{t-1} & \text{for } t > 1, \\[1.2ex]
  73. 0.99\mathbf{v}_{t-1} & \text{for } t = 1
  74. \end{array}
  75. \right.
  76. \]
  77. \[
  78. \mathbf{x}_{t} = \mathbf{x}_{0}+\sum_{i=1}^{t} \mathbf{v}_{t}
  79. \]
  80. 对于初速$v_{x0}$,则最终相对于起始点$x0$,轴向位移$x_{final}$
  81. \[x_{final} = v_{x0}\times(0.99+0.99\times(\sum_{i=1}^{\infty} 0.8^{i})) = 4.95 v_{x0}\]
  82.  
  83. \section{推导落点分布}
  84. \subsection{发射器}
  85. 对于方块坐标在$(x,y,z)$的发射器,发射器向下发射雪球时,雪球会在$(x+0.5,y-0.1,z+0.5)$处生成,并立即计算速度,更新位移。创建的雪球在世界上可探测的第0刻,已经偏移生成点。无法通过统计学证明其初速度在可探测时已经被应用了一次0.99倍风阻系数。$x$轴在一格水阻尼通道中撞击壁面的概率$p_{fail}$如下
  86. \[
  87. v_{x} \sim TriangPDF(x,-0.1137015,0.1137015,0)
  88. \]
  89. \[
  90. v_{z} \sim TriangPDF(x,-0.1137015,0.1137015,0)
  91. \]
  92. \[P (x_{final} < -0.5\text{ or }x_{final} > 0.5) = 2 P(x_{final} < -0.5)\]
  93. \[ = 2 P(4.95 v_{x} < -0.5)= 2 P(v_{x} < \frac{-10}{99})\]
  94. \[CDF(x) = \frac{(x-a)^{2}}{(b-a)(c-a)}\]
  95. \[CDF(\frac{-10}{119}) = \frac{(\frac{-10}{99}+0.1137015)^{2}}{(0.1137015+0.1137015)(0.1137015)} = 0.006229549\]
  96. \[p_{fail} = P (x_{final} < -0.5\text{ or }x_{final} > 0.5) = 1.2459098\%\]
  97.  
  98. 使用一格水阻尼通道,考虑$x,z$两轴,发射一颗雪球在两轴上均未撞击壁面,速度成功归零$(<10^{-6}m/t)$的概率为
  99. \[P(|x_{final}| < 0.5 \text{ and } |z_{final}| < 0.5) = (1-p_{fail})^{2} = 97.52370331229736\%\]
  100. \newpage
  101. \subsection{雪傀儡}
  102. 生成雪球时$ power=1.6, uncertainty=12, $假设经过标准化后$direction = <0,0,1>$
  103. ,则有
  104. \[
  105. v_{x}\sim triang(-0.330768,0,0.330768)
  106. \]
  107. \[
  108. v_{z}\sim triang(1.269232,1.6,1.930768)
  109. \]
  110. \[\text{final } x\text{ displacement interval} = 4.95\times(-0.330768, 0.330768) = (-1.6373016,  1.6373016)\]
  111. \[\text{final } z\text{ displacement interval} = 4.95\times(1.269232, 1.930768) = (6.2826984, 9.5573016)\]
  112.  
  113. 当使用与末地门一样的3格宽减速水,$x$轴偏移概率为
  114. \[p_{failx}=P (x_{final} < -1.5 \text{ or } x_{final} > 1.5) = 2 P(x_{final} < -1.5) \]
  115. \[= 2 P(4.95 v_{x} < -1.5)= 2 P(v_{x} < -\frac{10}{33}) \]
  116. \[CDF(-\frac{10}{33}) = \frac{(-\frac{10}{33}+0.330768)^{2}}{(0.330768+0.330768)(0.330768)} = 0.0035161211314931745234\]
  117. \[p_{failx} = 2\times0.0035161211314931745234 = 0.007032242262986349 \]
  118. \[p_{success}=P(\text{雪傀儡发射雪球在最终分布中心$3\times3$格内})=(1-p_{failx})^{2}\]
  119. \[= 0.9859849679\]
  120. 但是$z$轴分布中心不为$3\times3$开口的方块中心,对于目标方向$<0,0,1>$对应的$v_{z}$,从雪傀儡脚下方块算1格,若第7格开始开3宽的开口,实际概率如下
  121.  
  122. \begin{align*}
  123. p_{failz}
  124. &=P(z_f < 6.5) + P(z_f > 9.5) \\
  125. &= \frac{(6.5 - 6.2826984)^2}{(9.5573016 - 6.2826984)\left(\frac{9.5573016 + 6.2826984}{2} - 6.2826984\right)} \\
  126. &\quad + 1 - \left(1 - \frac{(9.5573016 - 9.5)^2}{(9.5573016 - 6.2826984)\left(\frac{9.5573016 - 6.2826984}{2}\right)}\right) \\
  127. &= 0.0094196280363306427143
  128. \end{align*}
  129. \[P_{real\_succ} = (1-p_{failx})(1-p_{failz}) = 0.9836143708\]
  130.  
  131. 发射器接一格水阻尼通道其实不是必要的,真要规定$x,z$轴最终偏移,可以用$3\times3$通道,或者将发射器放的离门近一些,均可确保雪球进入末地门。但是若使用雪傀儡,则即使使用水阻尼减速,$3\times3$的开口也无法确保所有雪球落入末地门。
  132.  
  133. 考虑水平状态下的最坏情况$direction = <0,0.2,1>$,此时
  134. \[
  135. v_{z}\sim (triang(-0.0172275\times 12,0,0.0172275\times 12)+0.980581)\times 1.6
  136. \]
  137. \[v_{z}\sim triang(1.23816, 1.56893, 1.8997)\]
  138. 自然有$z$最终落点分布
  139. \[z_{final}\sim triang(6.12889, 7.7662, 9.40352)\]
  140.  
  141. 新的$z$轴撞墙概率为
  142. \begin{align*}
  143. p_{failz}
  144. &=P(z_f < 6.5) \\
  145. &= \frac{(6.5 - 6.12889)^2}{(9.40352 - 6.12889)\left(\frac{9.40352 + 6.12889}{2} - 6.12889\right)}\\
  146. &=0.0256868492757
  147. \end{align*}
  148. 代入该概率求得雪球进门概率下界
  149. \[P_{real\_succ} = (1-p_{failx})(1-p_{failz}) = 0.9674615446\]
  150.  
  151.  
  152. \newpage
  153. \section{末地卸载概率}
  154. \subsection{马尔可夫过程定义}
  155. 计算雪球连续未通过末地门次数,单次未通过为伯努利过程,成功(未通过)概率 $p$,失败概率 $q = 1 - p$。要求$n$次伯努利试验中出现至少$k$次连续成功的概率,需创建马尔可夫过程,状态集定义为:
  156.  
  157. \[
  158. \mathcal{S} = \{S_0, S_1, S_2, \dots, S_k\}
  159. \]
  160.  
  161. \begin{center}
  162. \begin{tikzpicture}[->, node distance=2cm, thick, >=stealth, every node/.style={scale=0.9}]
  163.  \node (S0) [circle, draw] {$S_0$};
  164.  \node (S1) [circle, draw, right of=S0] {$S_1$};
  165.  \node (S2) [circle, draw, right of=S1] {$S_2$};
  166.  \node (S3) [circle, draw, right of=S2] {$S_{...}$};
  167.  \node (Sk) [circle, draw, right of=S3] {$S_k$};
  168.  
  169.  \draw (S0) to[bend left] node[above] {$p$} (S1);
  170.  \draw (S1) to[bend left] node[above] {$p$} (S2);
  171.  \draw (S2) to[bend left] node[above] {$p$} (S3);
  172.  \draw (S3) to[bend left] node[above] {$p$} (Sk);
  173.  
  174.  \draw (S1) to[bend left] node[above] {$q$} (S0);
  175.  \draw (S2) to[bend left] node[below=4pt] {$q$} (S0);
  176.  \draw (S3) to[bend left] node[below] {$q$} (S0);
  177.  \draw (Sk) edge[loop right] node[right] {1} (Sk);
  178. \end{tikzpicture}
  179. \end{center}
  180.  
  181. 其中:
  182.  
  183. \begin{itemize}
  184.  \item $S_0$ 为未出现连续成功;
  185.  \item $S_i$ 为已连续成功 $i$ 次,末地平台正在靠15s加载票的剩余时间加载,$1 \leq i \leq k-1$
  186.  \item $S_k$ 吸收态,已出现连续 $k$ 次成功,末地平台成功卸载,储电设备可能损坏。
  187. \end{itemize}
  188.  
  189. \subsection{转移矩阵与状态向量}
  190.  
  191. 有转移概率矩阵 $P \in \mathbb{R}^{(k+1)\times (k+1)} $,行和为1
  192.  
  193. \[
  194. P =
  195. \begin{bmatrix}
  196. q & p & 0 & 0 & \cdots & 0 & 0 \\
  197. q & 0 & p & 0 & \cdots & 0 & 0 \\
  198. q & 0 & 0 & p & \cdots & 0 & 0 \\
  199. \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\
  200. q & 0 & 0 & 0 & \cdots & 0 & p \\
  201. 0 & 0 & 0 & 0 & \cdots & 0 & 1
  202. \end{bmatrix}
  203. \]
  204.  
  205. \begin{itemize}
  206.  \item 失败:$q$,从除 $S_k$态转移到 $S_0$,否则不变——卸载已经发生;
  207.  \item 成功:$p$,从 $S_i$ 转移到 $S_{i+1}$
  208.  \item $S_k$ 卸载已经发生。
  209. \end{itemize}
  210.  
  211. 有初始态向量
  212. \[
  213. \boldsymbol{\pi}^{(0)} = [1, 0, 0, \dots, 0] \in \mathbb{R}^{k+1}
  214. \]
  215. \[
  216. \boldsymbol{\pi}^{(n)} = \boldsymbol{\pi}^{(0)} \cdot P^n
  217. \]
  218.  
  219. $\boldsymbol{\pi}^{(n)}[k]$$n$ 次试验中至少一次出现连续 $k$ 次成功的概率,即为卸载概率。
  220.  
  221. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment