Last active
August 29, 2015 14:01
-
-
Save stevecooperorg/9fb7b55eb069ce100655 to your computer and use it in GitHub Desktop.
Scooby Doo Vs The Illuminati
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConspiracyTheory | |
{ | |
class ScoobyDooVsTheIlluminati | |
{ | |
static void Main(string[] args) | |
{ | |
// what's the chance an act of conspiracy will be uncovered by the scooby gang? | |
var secrecy = 0.01d; | |
// how many acts does the illuminati perpetrate every year? | |
var numberOfSecretsPerYear = 10; | |
// how many years before no-one cares about that conspiracy any more? | |
var yearsBeforeFading = 20; | |
// so how many secrets could the scooby gang discover? | |
var numberOfOpenSecrets = numberOfSecretsPerYear * yearsBeforeFading; | |
// how many conspiracies per year would the scooby gang need to reveal for the public to | |
// believe it? | |
var thePublicNowBelieves = 0.25d; | |
// when were the illuminati formed? | |
var yearOfFoundation = 1600; | |
var peskyKids = new Random(); | |
double conspiraciesPerYear; | |
var discoveries = 0; | |
do | |
{ | |
discoveries = 0; | |
var year = yearOfFoundation; | |
while (year < 2014) | |
{ | |
for (var i = 0; i < numberOfOpenSecrets; i++) | |
{ | |
var gottenAwayWithItToo = peskyKids.NextDouble() > secrecy; | |
if (!gottenAwayWithItToo) | |
{ | |
//Console.WriteLine("And I would have gotten away with it, too, in {0}", year); | |
discoveries++; | |
} | |
} | |
year++; | |
} | |
conspiraciesPerYear =1.0d * discoveries / (2014.0d - yearOfFoundation); | |
Console.WriteLine("The scooby gang discovered {0} conspiracies, at a rate of {1} per year at a secrecy rate of {2}!", discoveries, conspiraciesPerYear, secrecy); | |
secrecy = secrecy * 0.8; | |
} while (conspiraciesPerYear > thePublicNowBelieves); | |
Console.WriteLine("The illuminati win with {0} discovered conspiracies, at a rate of {1} per year, at a secrecy rate of {2}", discoveries, conspiraciesPerYear, secrecy); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment