初手に発動可能な朱光の宣告者がある確率
from 望ましい手札が得られる確率
朱光の宣告者+天使族をペアで引いている確率
3 9 41
1枚+以外の天使族少なくとも1枚
3 * (38*37*36*35 - 29*28*27*26 ) / 24
2枚以上
3 * 38*37*36 / 6
38*37 / 2
code:jl
h = 3
f = 9
d = 41
p1 = 3(binomial(d-h, 4) - binomial(d-(h+f), 4))
p2 = 3binomial(d-h, 3)
p3 = binomial(d-h, 2)
a = binomial(d, 5)
(p1+p2+p3) / a * 100
from 望ましい手札が得られる確率をシミュレーションで得る
手札の異なる位置に、バーデクと天使族が存在する
同名カードの重複は認めるが、同一1枚は認めない
code:jl
function condition_require_distinct(hand::Vector{String}, target_name::String, is_target_atr::Function)
idx_target = findall(x -> x == target_name, hand)
idx_target_atr = findall(is_target_atr, hand)
for i in idx_target, j in idx_target_atr
if i != j
return true
end
end
return false
end
target_cards = Dict("朱光の宣告者/天使族" => 3,
"天使族" => 9)
is_target_atr = card -> contains(card, "天使族")
probability = simulate(
deck_size = 41,
initial_draw = 5,
target_cards = target_cards,
condition = hand -> condition_require_distinct(hand, "朱光の宣告者/天使族", is_target_atr),
iterations = 100_000
)
println("$(probability * 100)%")
テキスト検索関数
contains(s, pattern)
startswith(s, prefix)
endswith(s, suffix)
look for a needle in a haystack
needle: 針: 探し物
haystack: 干し草の山
バーミリオンハゥフ天使なしでネピリムが当たった場合もおもしろそうあんも.icon
3枚落とし
ネピリム
ネピリムクォーツ
なし
code:jl
target_cards = Dict(
"朱光の宣告者/天使族" => 3,
"天使族" => 5,
"ハゥフニス" => 1,
"ネピリム/天使族" => 3,
"クォーツ/天使族" => 1
)
is_target_atr = card -> contains(card, "天使族")
probability = simulate(
deck_size = 41,
initial_draw = 5,
target_cards = target_cards,
condition = hand -> condition_require_distinct(hand, "朱光の宣告者/天使族", is_target_atr),
iterations = 100_000
)
println("$(probability * 100)%")