Monte Carlo method
ڕێگای مۆنتی کارلۆ
Proposed Kurdish term — under reviewزاراوەی پێشنیارکراو — لە ژێر پێداچوونەوەدایە Definitionپێناسە
Estimating a number by running many random simulations and counting the results.
خەمڵاندنی ژمارەیەکە بە ئەنجامدانی ژمارەیەکی زۆر هەڕەمەکی و ژماردنی ئەنجامەکان.
Exampleنموونە
Throw random points into a square: the share that falls inside the quarter circle, times 4, approaches π.
خاڵی هەڕەمەکی بخەرە نێو چوارگۆشەیەکەوە: ڕێژەی ئەوانەی دەکەونە نێو چارەکە بازنەکەوە، جاران 4، لە π نزیک دەبێتەوە.
import random
n = 100_000
inside = sum(random.random()**2 + random.random()**2 <= 1 for _ in range(n))
print(4 * inside / n) # about 3.14Note on the Kurdish termتێبینی دەربارەی زاراوە کوردییەکە
ڕێگا (method) + the name. Proposed.