The big white box above is the chip-firing interface. Here's how to use it:
Add a vertex: double-click on the canvas
Add an edge: shift-drag on the canvas
Move something: drag it around
Delete something: click it and press the delete key (not the backspace key). On a mac, this is fn+delete.
Type numeric subscript: put an underscore before the number (like "S_0")
Type greek letter: put a backslash before it (like "\beta")
There is also the option to add pre-set graphs instead of drawing your own:
Draw Path: Click on this button and enter the number of vertices that you would like to have in the path. The maximum number of vertices allowed is 15.
Draw Cycle: Click on this button and enter the number of vertices that you would like to have in the cycle. The maximum number of vertices allowed is 15.
Draw Complete: Click on this button and enter the number of vertices that you would like to have in the complete graph. The maximum number of vertices allowed is 15.
Draw Complete Bipartite: Click on this button and enter the number of vertices that you would like to have on each side of the complete bipartite graph. The maximum number of vertices allowed per side is 8.
Draw Ralph's Favorite Graph: Click on this button to draw Ralph's favorite critter.
This also includes functionality used for simulating chip-firing games. When in chip firing mode, the following happen:
Adding or deleting vertices or edges is disabled
Clicking a vertex "fires" that vertex, giving away 1 chip from that vertex to each vertex it connects to
Undo: Shift clicking undoes the "firing" of that vertex (performs a borrowing move).
Empty vertices are treated as having zero chips on them
An edge with a numerical label indicates the "weight" of the edge, causing that many chips to be fired along that edge instead of only one
Dhar's Burning Algorithm: Click on a vertex to run Dhar’s burning algorithm on that vertex. This determines whether there is a legal firing set to move more chips onto that vertex. The legal firing set is highlighted or a message appears to tell you that there is no legal firing set.
q-reduce: Click on a vertex. This function moves all debt to that vertex and then performs all possible legal firing moves to arrive at a divisor that is q-reduced. If all debt is eliminated, the divisor is winnable. If there is still debt on q, the divisor is unwinnable. The firing script is automatically cleared and then recorded when you choose to q-reduce.
Firing: Fire individual vertices (as described above) by clicking on them.
Set Create: Click on vertices to group them together in a firing set.
Set Fire: Click on a created set to remove it as a firing option.
Clear Firing Set: Click on this button to clear the firing set that you created in set create mode.
Record Firing Script: When this box is checked, the firing/borrowing moves that you perform are recorded. The script is automatically cleared and then recorded when you choose to q-reduce on a vertex or run the greedy algorithm.
Greedy Algorithm: Click to run the Greedy algorithm to determine if your divisor is winnable. This attempts to borrow from every vertex and if a winnable divisor is reached first, that is returned, otherwise it signals that the divisor is unwinnable. The firing script is automatically cleared and then recorded when you choose to run the greedy algorithm.
Gonality: Click to determine the Gonality of the given graph. Will play the Gonality Game on all possible divisors of degree 1, then degree 2, and so until either the Gonality is determined or the program hits divisors with degree equal to the number of vertices in the graph. Does not preserve current node values. *WARNING: May take a very long time on large graphs.*
Multiplicity Free Gonality: Click to determine the rth-Multiplicity Free Gonality of the given graph.
Rank: Click to determine the rank of the given divisor. This attempts to subtract every possible divisor of degree 1, then degree 2, and so on until it fails. At this point the rank is returned as the previous degree. *WARNING: May take a very long time on large graphs.*
Genus: Click to determine the genus of the given graph. This calculates the number of edges minus the number of vertices plus 1.
This was made in HTML5 and JavaScript using the canvas element.
Acknowledgements: Thanks to Ralph Morrison, Yoav Len, Josse van Dobben de Bruyn, Shefali Ramakrishna, Robin Huang, and MATH 435 (2021) for the feedback and suggestions. Ralph Morrison was supported by NSF Grant DMS-2011743.