Created
August 27, 2019 22:28
-
-
Save usptact/fc928d57c44698edd2f219ddb9cac94d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Microsoft.ML.Probabilistic.Models; | |
namespace twodice | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Variable<int> six = Variable.DiscreteUniform(6); | |
Variable<int> eight = Variable.DiscreteUniform(8); | |
Variable<bool> eight_larger = eight > six; | |
InferenceEngine engine = new InferenceEngine(); | |
Console.WriteLine("Probability eight-sided dice rolled bigger number: " + engine.Infer(eight_larger)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment