chickadee » aima » write-world-as-dot

write-world-as-dot world agentprocedure
write-world-as-dot world agent stepprocedure
write-world-as-dot world agent step width height font-size titleprocedure

Output the graph-world as in dot-notation (i.e. Graphviz).

world
The graph-world to output
agent
The agent inhabiting the graph-world
step
The current step or false
width
Width of the output
height
Height of the output
font-size
Font-size of the output
title
Title of the output
(define write-world-as-dot
  (case-lambda
    ((world agent) (write-world-as-dot world agent #f))
    ((world agent step)
     (write-world-as-dot
       world
       agent
       step
       (default-width)
       (default-height)
       (default-font-size)
       (default-title)))
    ((world agent step width height font-size title)
     (write-dot-preamble agent step width height font-size title)
     (write-dot-nodes world agent)
     (write-dot-edges world)
     (write-dot-postscript))))