In Management Science we were doing Decision Analysis, specifically Decision Trees. Decision Trees is a way of modelling decisions and states of nature to compute the "most efficient "best" choice based on probabilities of states of nature. I've built a simple Decision Tree renderer for a custom language used to describe the trees. I may develop it further so that it actually calculates best paths, but for now it simply draws them.

The graphs are fairly ugly but that's a limitation of the graphics library really, and I don't want to spent too much time adapting it to a better one.

Generate Your Own

After reading through the examples try generating your own decision trees:

The Language

[Node Name] Square Brackets Represent Decision Nodes
(Node Name) Paranthesis represent States-of-Nature Nodes
Angle brackets represent Leaf nodes
-> Arrows represent sub-nodes
{ Node, Node, Node } Braces represent a comma-separated list of nodes

Examples

[Buy Or Sell]->{ <Buy>, <Sell> } Produces:
[Company Strategy]->{ (Sell)->{ <Strong Market = 500,000 eur>, <Weak Market = 320,000 eur> }, (Buy Competitor)->{ <Strong Market = -400,000 eur>, <Weak Market = -120,000 eur> } } Produces:
[What To Do]->{ (Expand)->{ [Strong]->{ (Build At Home)->{ [Land Is Good]->{ <Build>, <Do Not Build> }, [Land Is Bad]->{ <Build>, <Do Not Build> } }, (Build Abroad)->{<Get Planning>,<No Planning>} } , <Weak> }, (Keep)->{ <Strong>, [Weak]->{ [Sell Business]->{ <Sell Abroad>, <Sell At Home> }, <Get Loan> } }, (Sell)->{ <Strong>, <Weak> } } Produces: