Search code examples
xmllatexdata-visualizationmontecarlograph-visualization

How to visualize big Monte Carlo Tree


I have implemented a Monte Carlo Tree Search for a project and now want to visualize the giant non-binary tree that I receive from the algorithm for a presentation and for the understanding of what is happening.

I have exported the tree into XML form, but haven't found a good program which can draw the tree in 2D instead of a TreeListView. I tried to put the tree into a default LaTeX qtree, but it produces errors when the dimensions get too big (>1000 or something). Also the tree is very horizontal, even if it only has numbers like "99/300".

I am searching for something that can draw a 2D non-binary tree diagram with nodes that have some small text in it/on them and edges that have some longer text on them. The edge text could alternatively be put to the node text, but that would probably only make the diagram wider.

1k - 10k nodes would be ideal, if I don't find anything I have to resort back to ~100 and can use normal LaTeX again then, but only if necessary.

Does somebody know a program or a method to help me visualize this?


Solution

  • You could try Graphviz:

    1. Write XSLT to map from your XML to DotML, an XML representation of the DOT graph description language. You can validate DotML against the DotML schema.
    2. Run generate-svg-graphics.bash, which uses generate-svg-graphics.xsl, to convert from DotML to SVG.

    See also Michael Kay's DotML ant build.