Skip to content

Commit

Permalink
html update
Browse files Browse the repository at this point in the history
  • Loading branch information
OneBST committed Oct 16, 2024
1 parent 3af03b3 commit 3f4490e
Show file tree
Hide file tree
Showing 12 changed files with 409 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _sources/introduction_to_gacha/foundations.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
简单保底抽卡模型
------------------------

如果一个简单抽卡模型获得道具所需抽数是具有 **有限支持** finite support的,即随机变量的概率分布在有限个值上的取值不为零,有限个值之外的所有其他值上,概率分布为零。则将这种抽卡模型称为 **简单保底抽卡模型**。
如果一个简单抽卡模型获得道具所需抽数是具有 **有限支持** (finite support)的,即随机变量的概率分布在有限个值上的取值不为零,有限个值之外的所有其他值上,概率分布为零。则将这种抽卡模型称为 **简单保底抽卡模型**。
常见带保底的抽卡模型大都可以归类为简单保底抽卡模型。例如原神获取五星物品的模型,每次获得五星物品所耗费抽数都是独立同分布的,并在有限抽内一定能获得五星物品。

简单保底抽卡模型的性质
Expand Down
42 changes: 42 additions & 0 deletions _sources/start_using/check_gacha_plan.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
检查抽卡计划可行性
========================

在现实中,玩家会因为游戏中道具会分时间段开放抽取,不同时间段抽卡资源投放也不同,经常需要评估一个抽卡规划的可行性。
我们可以用在限制条件下能有多大概率达成目标来描述计划的可行性。

.. admonition:: 抽卡问题例子
:class: note

以绝区零为例,假设1.0版本可以获得200抽,这时候计划在1.0版本下半抽一个限定S级角色加一个限定S级武器,
1.1版本上半可获得74抽,计划在抽一个限定S级角色,1.1版本下半可获得40抽,计划此时再抽一个限定S级角色加一个限定S级武器,
那么按照计划把这些武器和角色都抽出来的概率有多大?

在这个问题中要计算多大概率可以达到目标,本质上是计算能在各个阶段的抽数限制下都能达成目标的玩家占比,
只需要 **在每个阶段中剔除超出抽数限制部分玩家对应概率空间** 即可。
以下代码给出了计算刚才例子中抽卡计划达成概率的可能性及达成计划的玩家中抽数花费的分布。

.. code:: Python
from GGanalysis import FiniteDist
import GGanalysis.games.zenless_zone_zero as ZZZ
# 设定要抽的角色数量/武器数量以及阶段预算
tasks = [
[1, 1, 200],
[1, 0, 74],
[1, 1, 40],
]
total_c = 0
total_w = 0
total_pulls = 0
ans_dist = FiniteDist([1])
for (num_c, num_w, task_pulls) in tasks:
total_c += num_c
total_w += num_w
total_pulls += task_pulls
ans_dist *= ZZZ.up_5star_character(num_c) * ZZZ.up_5star_weapon(num_w)
ans_dist.dist = ans_dist.dist[:total_pulls+1]
print("成功概率", sum(ans_dist.dist))
ans_dist.p_normalization() # 归一化
print("成功玩家期望抽数消耗", ans_dist.exp)
full_dist = ZZZ.up_5star_character(total_c)*ZZZ.up_5star_weapon(total_w)
print("获得计划道具期望", full_dist.exp)
1 change: 1 addition & 0 deletions _sources/start_using/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
basic_concepts
use_predefined_model
custom_gacha_model
check_gacha_plan
stationary_distribution
quick_visualization

1 change: 1 addition & 0 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
<li class="toctree-l2"><a class="reference internal" href="start_using/basic_concepts.html">基本概念</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/use_predefined_model.html">使用预定义的抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/custom_gacha_model.html">自定义抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/check_gacha_plan.html">检查抽卡计划可行性</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/stationary_distribution.html">平稳分布时概率的计算工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/quick_visualization.html">快速可视化</a></li>
</ul>
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
<li class="toctree-l2"><a class="reference internal" href="start_using/basic_concepts.html">基本概念</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/use_predefined_model.html">使用预定义的抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/custom_gacha_model.html">自定义抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/check_gacha_plan.html">检查抽卡计划可行性</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/stationary_distribution.html">平稳分布时概率的计算工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/quick_visualization.html">快速可视化</a></li>
</ul>
Expand Down Expand Up @@ -264,6 +265,7 @@ <h1>欢迎使用 GGanalysis 工具包!<a class="headerlink" href="#gganalysis" t
<li class="toctree-l2"><a class="reference internal" href="start_using/basic_concepts.html">基本概念</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/use_predefined_model.html">使用预定义的抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/custom_gacha_model.html">自定义抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/check_gacha_plan.html">检查抽卡计划可行性</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/stationary_distribution.html">平稳分布时概率的计算工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/quick_visualization.html">快速可视化</a></li>
</ul>
Expand Down
4 changes: 3 additions & 1 deletion introduction_to_gacha/foundations.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
<li class="toctree-l2"><a class="reference internal" href="../start_using/basic_concepts.html">基本概念</a></li>
<li class="toctree-l2"><a class="reference internal" href="../start_using/use_predefined_model.html">使用预定义的抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="../start_using/custom_gacha_model.html">自定义抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="../start_using/check_gacha_plan.html">检查抽卡计划可行性</a></li>
<li class="toctree-l2"><a class="reference internal" href="../start_using/stationary_distribution.html">平稳分布时概率的计算工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="../start_using/quick_visualization.html">快速可视化</a></li>
</ul>
Expand All @@ -185,6 +186,7 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../games/arknights/index.html">明日方舟抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="../games/zenless_zone_zero/index.html">绝区零抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="../games/azur_lane/index.html">碧蓝航线抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="../games/wuthering_waves/index.html">鸣潮</a></li>
<li class="toctree-l2"><a class="reference internal" href="../games/blue_archive/index.html">蔚蓝档案</a></li>
Expand Down Expand Up @@ -259,7 +261,7 @@ <h2>简单抽卡模型<a class="headerlink" href="#id2" title="此标题的永
</section>
<section id="id3">
<h2>简单保底抽卡模型<a class="headerlink" href="#id3" title="此标题的永久链接">#</a></h2>
<p>如果一个简单抽卡模型获得道具所需抽数是具有 <strong>有限支持</strong> finite support的,即随机变量的概率分布在有限个值上的取值不为零,有限个值之外的所有其他值上,概率分布为零。则将这种抽卡模型称为 <strong>简单保底抽卡模型</strong>
<p>如果一个简单抽卡模型获得道具所需抽数是具有 <strong>有限支持</strong> (finite support)的,即随机变量的概率分布在有限个值上的取值不为零,有限个值之外的所有其他值上,概率分布为零。则将这种抽卡模型称为 <strong>简单保底抽卡模型</strong>
常见带保底的抽卡模型大都可以归类为简单保底抽卡模型。例如原神获取五星物品的模型,每次获得五星物品所耗费抽数都是独立同分布的,并在有限抽内一定能获得五星物品。</p>
</section>
<section id="id4">
Expand Down
1 change: 1 addition & 0 deletions introduction_to_gacha/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
<li class="toctree-l2"><a class="reference internal" href="../start_using/basic_concepts.html">基本概念</a></li>
<li class="toctree-l2"><a class="reference internal" href="../start_using/use_predefined_model.html">使用预定义的抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="../start_using/custom_gacha_model.html">自定义抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="../start_using/check_gacha_plan.html">检查抽卡计划可行性</a></li>
<li class="toctree-l2"><a class="reference internal" href="../start_using/stationary_distribution.html">平稳分布时概率的计算工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="../start_using/quick_visualization.html">快速可视化</a></li>
</ul>
Expand Down
Binary file modified objects.inv
Binary file not shown.
1 change: 1 addition & 0 deletions search.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
<li class="toctree-l2"><a class="reference internal" href="start_using/basic_concepts.html">基本概念</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/use_predefined_model.html">使用预定义的抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/custom_gacha_model.html">自定义抽卡模型</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/check_gacha_plan.html">检查抽卡计划可行性</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/stationary_distribution.html">平稳分布时概率的计算工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="start_using/quick_visualization.html">快速可视化</a></li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

Loading

0 comments on commit 3f4490e

Please sign in to comment.