From d782a192bc8b32bfa8a531b4f2800e29551135f9 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 4 Jan 2023 13:29:10 -0800 Subject: [PATCH] [ci-force] add line about seed --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 3b7aa54..a704cf5 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,19 @@ setting the environment variable `D2_LAYOUT`. D2_LAYOUT=tala d2 in.d2 out.svg ``` +### Seeds + +Optimal placements of nodes that minimizes distance and crossings is an NP-hard problem. +TALA searches with heuristics to get an approximation. This search space has some +randomness at each step. Choosing a different seed for this randomness can have signficant +impact on the overall layout, as it may converge on an entirely different one. + +For advanced usage of TALA, you may specify the seed to get a different layout: + +```d2 +d2 --layout tala --tala-seed 44 input.d2 +``` + ### Add API token (optional) You may skip this step if you are just evaluating.