Zovo Decision Tree

v1.0.0
io.github.theluckystrike/decision-tree Checked 14 hours ago Published 24 days ago

Solves and draws a decision tree for business choices from your own numbers.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

make_decision_tree Make decision tree

Use this when the user wants a decision tree drawn or solved: options of a decision, chance events with probabilities, and payoffs, for example "which option has the higher expected value" or "draw a decision tree for launching this product". Takes the tree as an indented outline or a JSON node list, the objective (max or min), a unit, decimals, a page size and a title. Rolls the tree back with fractions: the expected value of each node, the chosen option at each decision (ties listed), branch costs applied by a stated rule, and the risk profile of the chosen strategy. Refuses a tree whose cha…

ParameterTypeDescription
decimalsintegerDecimals shown in the drawing and summary, 0 to 6 (default 2), e.g. 2. The CSV also has the fraction.
nodesarrayThe tree as a JSON list instead of outline: each node has id, parent (not for the root), label, and p, cost or payoff as needed, e.g. [{"id":"r","label":"Launch?"},{"id":"a","parent":"r","label":"Do n…
objectivestringmax (default): choose the option with the highest expected value, for profit or gain. min: choose the lowest, when payoffs are costs, losses or time. Example: max.
outlinestringThe tree as indented text, one node per line, children indented under their parent (spaces or tabs, "- " bullets allowed). The first line is the root. Fields after the label: p=<probability> on branch…
page_sizestringPDF page: letter (default) or a4. Landscape unless portrait needs fewer pages.
titlestringTitle printed on the drawing and used in file names, up to 80 characters, e.g. "Product launch".
unitstringUnit or currency shown with values, up to 12 characters, e.g. "$", "EUR" or "hours".

check_tree Check decision tree

Use this when the user wants a decision tree checked without a drawing, for example "do my probabilities add up to 1" or "is anything missing in this tree". Takes the same outline or node list and objective as make_decision_tree. Returns, for each chance node, the sum of its branch probabilities as a fraction and whether it is 1; end nodes without a payoff; probabilities on decision options; payoffs on nodes that have branches; single-option decisions; duplicate branch names; and the depth and node counts against the limits. When nothing is wrong it also gives the root expected value. Refuses…

ParameterTypeDescription
nodesarrayThe tree as a JSON list instead of outline: each node has id, parent (not for the root), label, and p, cost or payoff as needed, e.g. [{"id":"r","label":"Launch?"},{"id":"a","parent":"r","label":"Do n…
objectivestringmax (default): choose the option with the highest expected value, for profit or gain. min: choose the lowest, when payoffs are costs, losses or time. Example: max.
outlinestringThe tree as indented text, one node per line, children indented under their parent (spaces or tabs, "- " bullets allowed). The first line is the root. Fields after the label: p=<probability> on branch…