0

To debug a Tic Tac Toe AI I wrote, I need to visualize the tree of the game it builds for the mini max algorithm. To do this, I use jgrapht and its GraphMLExporter. It generates me a file that I can open with GraphViz.

As Tic Tac Toe has many turn combinations, the tree is very wide but has a low height. This squeezes it and when I zoom in in the png output, I can only see pixels.

So here is my question: How can I make GraphViz use the full screen height? It does not matter to me how wide the graph is, I just want to set something like a minimum height. Thanks for helping, vat

vatbub
  • 2,713
  • 18
  • 41
  • Can you share the file and the command you are using? Otherwise it's pure speculation. – vaettchen Jan 01 '16 at 19:59
  • Please take a look an my [answer using the unflatten utility](http://stackoverflow.com/a/11136488/63733) to break down wide graphs. That's the graphviz tool to handle this problem. If this doesn't apply to your problem, tell me why not and I may reopen the question. – marapet Jan 02 '16 at 20:55
  • @vaettchen: Since I did not find a possibility right now to upload it directly, I put it into my dropbox: https://www.dropbox.com/s/xqynt6yqqyrwt4g/gameTreeAsVisioFile.dot?dl=0 – vatbub Jan 02 '16 at 23:05
  • Actually, I do appreciate it, that all nodes of equal level are next to each other, I just want to scale the graph up so that it uses the entire screen height. – vatbub Jan 02 '16 at 23:13
  • And so far, I used the GUI of GraphViz and I opened the file and tried it with different settings including... graph[fontsize="12"] graph[dpi="8000"] node[fontsize="12"] edge[fontsize="12"] graph[defaultdist="80"] edge[penwidth="5"] I also experimented with size and the exclamation mark ! but it did not do the trick. – vatbub Jan 02 '16 at 23:15
  • Keeping nodes of equal level next to each other, but scale the graph up to use the entire screen height - this would result in nodes with a small width but a very high height, correct? – marapet Jan 04 '16 at 15:48
  • Yep, but width does not matter to me,. it can be as wide as it wants to – vatbub Jan 05 '16 at 22:55
  • While I could not yet fix the prob in my TicTacToe AI, I found a solution to my graph problem. I can open the GraphML with a software called yEd (its free). It has very useful layout algorithms and I managed to visualize the tree in it. – vatbub Jan 06 '16 at 13:36

0 Answers0