Visualising machines

Saving visualization to files

To save a machine into an image file you can use save_img()

m.save_img(filename,format="jpg")

To create a gif animation of a machine procesing a specific word use save_gif()

m.save_gif(word,filename)

At this moment the filename has to include “.gif” extension.

Visualizing in Notebooks

To display a machine into an interactive notebook use graph()

m.graph()

To simulate a machine into an interactive notebook use Simulation

from maquinas.simulation import Simulation

s=Simulation(m,word)
s.run()