Skip to content

A simple implementation of the MonteCarlo algorithm in Python

Notifications You must be signed in to change notification settings

AbstractMonkey/SimpleMonteCarlo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

SimpleMonteCarlo

A simple implementation of a MonteCarlo algorithm in Python. A MonteCarlo algorithm utilizes randomization in order to approximate an answer in cases where the perfect answer may be impossible to find.

Feed this a 1-bit (2 color) black and white image like the one below and it will calculate the % area of black color. This allows you to approximate the area of weird 2D shapes not defined by equations. Just multiply the area of the image you feed this by the % result you get at the end, and you'll get an approximation of the weird shape's area.

About

A simple implementation of the MonteCarlo algorithm in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages