This program is an online version of branched, which computes minimal position and intersection number for curves on surfaces. It definitely works correctly for surfaces with boundary, and there is conjectured support for closed surfaces.
The relator in the group is always of the form [commutators][boundaries], so a genus two surface with two boundaries is presented as <a,b,c,d,e,f | abABcdCDef>. Note this means the gluing pattern of the polygon will be of the form aBAbcDCde_Ef_F, where _ is an unglued edge. Input is always rewritten as unique geodesics. In the case of boundary, the last boundary is rewritten as a product of the other generators.